Fixed pointer issue
parent
7d4f5a4820
commit
e9a58ff225
|
@ -276,14 +276,14 @@ map<string, METHOD> expandMethodTemplate(const map<string, METHOD>& methods,
|
|||
BOOST_FOREACH(const ReturnValue& retVal, method.returnVals) {
|
||||
ReturnValue instRetVal = retVal;
|
||||
if (retVal.type1.name == templateArg) {
|
||||
instRetVal.type1 = qualifiedType;
|
||||
instRetVal.type1.rename(qualifiedType);
|
||||
} else if (retVal.type1.name == "This") {
|
||||
instRetVal.type1 = expandedClass;
|
||||
instRetVal.type1.rename(expandedClass);
|
||||
}
|
||||
if (retVal.type2.name == templateArg) {
|
||||
instRetVal.type2 = qualifiedType;
|
||||
instRetVal.type2.rename(qualifiedType);
|
||||
} else if (retVal.type2.name == "This") {
|
||||
instRetVal.type2 = expandedClass;
|
||||
instRetVal.type2.rename(expandedClass);
|
||||
}
|
||||
instMethod.returnVals.push_back(instRetVal);
|
||||
}
|
||||
|
@ -309,10 +309,10 @@ Class Class::expandTemplate(const string& templateArg,
|
|||
|
||||
/* ************************************************************************* */
|
||||
vector<Class> Class::expandTemplate(const string& templateArg,
|
||||
const vector<Qualified >& instantiations) const {
|
||||
const vector<Qualified>& instantiations) const {
|
||||
vector<Class> result;
|
||||
BOOST_FOREACH(const Qualified& instName, instantiations) {
|
||||
Qualified expandedClass = (Qualified)(*this);
|
||||
Qualified expandedClass = (Qualified) (*this);
|
||||
expandedClass.name += instName.name;
|
||||
Class inst = expandTemplate(templateArg, instName, expandedClass);
|
||||
inst.name = expandedClass.name;
|
||||
|
@ -359,8 +359,8 @@ void Class::comment_fragment(FileWriter& proxyFile) const {
|
|||
BOOST_FOREACH(ArgumentList argList, m.argLists) {
|
||||
proxyFile.oss << "%";
|
||||
argList.emit_prototype(proxyFile, m.name);
|
||||
proxyFile.oss << " : returns "
|
||||
<< m.returnVals[0].return_type(false) << endl;
|
||||
proxyFile.oss << " : returns " << m.returnVals[0].return_type(false)
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -371,8 +371,8 @@ void Class::comment_fragment(FileWriter& proxyFile) const {
|
|||
BOOST_FOREACH(ArgumentList argList, m.argLists) {
|
||||
proxyFile.oss << "%";
|
||||
argList.emit_prototype(proxyFile, m.name);
|
||||
proxyFile.oss << " : returns "
|
||||
<< m.returnVals[0].return_type(false) << endl;
|
||||
proxyFile.oss << " : returns " << m.returnVals[0].return_type(false)
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,8 +34,9 @@ struct ReturnType: Qualified {
|
|||
isPtr(false), category(CLASS) {
|
||||
}
|
||||
|
||||
ReturnType(const Qualified& q) :
|
||||
Qualified(q), isPtr(false), category(CLASS) {
|
||||
void rename(const Qualified& q) {
|
||||
name = q.name;
|
||||
namespaces = q.namespaces;
|
||||
}
|
||||
|
||||
/// Check if this type is in a set of valid types
|
||||
|
@ -78,12 +79,12 @@ struct ReturnValue {
|
|||
|
||||
std::string matlab_returnType() const;
|
||||
|
||||
void wrap_result(const std::string& result, FileWriter& file,
|
||||
void wrap_result(const std::string& result, FileWriter& wrapperFile,
|
||||
const TypeAttributesTable& typeAttributes) const;
|
||||
|
||||
void wrapTypeUnwrap(FileWriter& wrapperFile) const;
|
||||
|
||||
void emit_matlab(FileWriter& file) const;
|
||||
void emit_matlab(FileWriter& proxyFile) const;
|
||||
};
|
||||
|
||||
} // \namespace wrap
|
||||
|
|
Loading…
Reference in New Issue