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