Massive edit: new Qualified type groups namespaces with name, eliminates a lot of clutter.

release/4.3a0
dellaert 2014-11-12 02:46:49 +01:00
parent 2ab5e17cd8
commit 6f333965a9
1 changed files with 10 additions and 6 deletions

View File

@ -46,13 +46,17 @@ namespace wrap {
void TypeAttributesTable::checkValidity(const vector<Class>& classes) const {
BOOST_FOREACH(const Class& cls, classes) {
// Check that class is virtual if it has a parent
if(!cls.qualifiedParent.empty() && !cls.isVirtual)
throw AttributeError(cls.qualifiedName("::"), "Has a base class so needs to be declared virtual, change to 'virtual class "+cls.name+" ...'");
if (!cls.qualifiedParent.empty() && !cls.isVirtual)
throw AttributeError(cls.qualifiedName("::"),
"Has a base class so needs to be declared virtual, change to 'virtual class "
+ cls.name + " ...'");
// Check that parent is virtual as well
if(!cls.qualifiedParent.empty() && !at(wrap::qualifiedName("::", cls.qualifiedParent)).isVirtual)
throw AttributeError(wrap::qualifiedName("::", cls.qualifiedParent),
"Is the base class of " + cls.qualifiedName("::") + ", so needs to be declared virtual");
Qualified parent = cls.qualifiedParent;
if (!parent.empty() && !at(parent.qualifiedName("::")).isVirtual)
throw AttributeError(parent.qualifiedName("::"),
"Is the base class of " + cls.qualifiedName("::")
+ ", so needs to be declared virtual");
}
}
}
}