Added Vector and Matrix to forward declarations

release/4.3a0
dellaert 2014-11-29 20:01:48 +01:00
parent fb8283cf11
commit e2ab47b610
2 changed files with 7 additions and 1 deletions

View File

@ -27,6 +27,7 @@ namespace wrap {
std::string name;
bool isVirtual;
ForwardDeclaration() : isVirtual(false) {}
ForwardDeclaration(const std::string& s) : name(s), isVirtual(false) {}
};
}
}

View File

@ -416,6 +416,11 @@ void Module::parseMarkup(const std::string& data) {
// Create type attributes table and check validity
typeAttributes.addClasses(expandedClasses);
typeAttributes.addForwardDeclarations(forward_declarations);
// add Eigen types as template arguments are also checked ?
vector<ForwardDeclaration> eigen;
eigen.push_back(ForwardDeclaration("Vector"));
eigen.push_back(ForwardDeclaration("Matrix"));
typeAttributes.addForwardDeclarations(eigen);
typeAttributes.checkValidity(expandedClasses);
}