bool Module::isExtension(const ObjectType& child, const ObjectType& parent) const { if(child.extendsDirectly(parent)) return true; ObjectType father = getFather(child); if(!father.isNull()) return isExtension(father, parent); return false; }
ObjectType Module::specifyLocally(const ObjectType& parent) const { ObjectType type; ObjectType rangeBegin(parent.typeTemplate()); for(SpecificationMap::const_iterator it = _automaticSpecifications.lower_bound(&rangeBegin); it != _automaticSpecifications.end() && it->first->typeTemplate() == parent.typeTemplate(); ++it) { if(parent.extendsDirectly(*(it->first))) { type = it->second; type.importParameters(parent); break; } } return type; }