diff options
-rw-r--r-- | slicer/slicer/modelPartsTypes.cpp | 4 | ||||
-rw-r--r-- | slicer/slicer/modelPartsTypes.h | 1 | ||||
-rw-r--r-- | slicer/slicer/modelPartsTypes.impl.h | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/slicer/slicer/modelPartsTypes.cpp b/slicer/slicer/modelPartsTypes.cpp index b535b51..41f8125 100644 --- a/slicer/slicer/modelPartsTypes.cpp +++ b/slicer/slicer/modelPartsTypes.cpp @@ -105,6 +105,10 @@ namespace Slicer { } return ref->second(m); } + TypeId ModelPartForComplexBase::GetTypeId(const std::string & id, const std::string & className) + { + return (id == className) ? TypeId() : ModelPart::ToExchangeTypeName(id); + } void ModelPartForOptionalBase::OnEachChild(const ChildHandler & ch) { diff --git a/slicer/slicer/modelPartsTypes.h b/slicer/slicer/modelPartsTypes.h index a4014ee..5297865 100644 --- a/slicer/slicer/modelPartsTypes.h +++ b/slicer/slicer/modelPartsTypes.h @@ -100,6 +100,7 @@ namespace Slicer { static void registerClass(const std::string & className, const TypeId & typeName, const ClassRef &); static void unregisterClass(const std::string & className, const TypeId & typeName); + static TypeId GetTypeId(const std::string & id, const std::string & className); }; template<typename T> diff --git a/slicer/slicer/modelPartsTypes.impl.h b/slicer/slicer/modelPartsTypes.impl.h index 259f642..d04dd9c 100644 --- a/slicer/slicer/modelPartsTypes.impl.h +++ b/slicer/slicer/modelPartsTypes.impl.h @@ -261,8 +261,7 @@ namespace Slicer { TypeId ModelPartForClass<T>::GetTypeId() const { - auto id = this->Model->ice_id(); - return (id == className) ? TypeId() : ModelPart::ToExchangeTypeName(id); + return ModelPartForComplexBase::GetTypeId(this->Model->ice_id(), className); } // ModelPartForStruct |