<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
If I'm using a typedef with a MappedType, and a container that's a MappedType,  it seems like I have to use a #define to tell SIP that the specific typedef is the same as the MappedType.<br>E.g.<br><br>I've wrapped std::string with MappedType, so it's type is<br>sipType_std_string<br><br>and I've also wrapped std::set in a MappedType where template<TYPE> std::set<TYPE> is defined.<br><br>If I do a typedef in my C++ code as:<br>// C++ file...<br>namespace foo {<br>    typedef std::string NameType<br>}<br><br>And also in my SIP file, create an equivalent typedef<br>// SIP module file<br>namespace foo {<br>    typedef std::string NameType;<br>    typedef std::set<foo::NameType> SetOfNames; // Aside, it'd be great if SIP knew that NameType was already a member of foo, and I didn't have to explicitly qualify it!<br>};<br><br>SIP will come back with a compile error like this when using NameType in my MappedType for std::set<br>python/util/set.sip(73): error: identifier "sipType_foo_NameType" is undefined<br>              foo::NameType *copy = reinterpret_cast<foo::NameType *>(sipConvertToType(item, sipType_foo_NameType, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr))<br><br>I was able to get rid of the compile error by adding a #define to my %ModuleHeaderCode section of the SIP file like this<br>%ModuleHeaderCode<br>...<br>#define sipType_foo_NameType sipType_std_string<br><br>It seems to me that this is fragile.  If I change the namespace of where NameType lives, I'd have to manually change all of the #defines, typedefs in the SIP files, etc.  Also, requiring this 'hint' to SIP seems erroneous to me.  Shouldn't the typedef be sufficient for creating a new sipType in the API file?<br>Or, am I doing something wrong? :)<br>Thanks,<br>-Nate<br>                                        </body>
</html>