unfinished attempt to add typedef for matlab wrapper
parent
e73d8a9742
commit
2d527f0fc2
|
@ -242,6 +242,8 @@ void Module::parseMarkup(const std::string& data) {
|
|||
// Create type attributes table and check validity
|
||||
typeAttributes.addClasses(expandedClasses);
|
||||
typeAttributes.addForwardDeclarations(forward_declarations);
|
||||
for (const TypedefPair p: typedefs)
|
||||
typeAttributes.addType(p.newType);
|
||||
// add Eigen types as template arguments are also checked ?
|
||||
vector<ForwardDeclaration> eigen;
|
||||
eigen.push_back(ForwardDeclaration("Vector"));
|
||||
|
|
|
@ -42,6 +42,13 @@ const TypeAttributes& TypeAttributesTable::attributes(const string& key) const {
|
|||
}
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
void TypeAttributesTable::addType(const Qualified& cls) {
|
||||
if (!table_.insert(make_pair(cls.qualifiedName("::"), TypeAttributes(false)))
|
||||
.second)
|
||||
throw DuplicateDefinition("types " + cls.qualifiedName("::"));
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
void TypeAttributesTable::addClasses(const vector<Class>& classes) {
|
||||
for(const Class& cls: classes) {
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
namespace wrap {
|
||||
|
||||
// Forward declarations
|
||||
class Qualified;
|
||||
class Class;
|
||||
|
||||
/** Attributes about valid classes, both for classes defined in this module and
|
||||
|
@ -57,6 +58,7 @@ public:
|
|||
}
|
||||
|
||||
void addClasses(const std::vector<Class>& classes);
|
||||
void addType(const Qualified& types);
|
||||
void addForwardDeclarations(
|
||||
const std::vector<ForwardDeclaration>& forwardDecls);
|
||||
|
||||
|
|
Loading…
Reference in New Issue