diff options
-rw-r--r-- | slicer/slicer/modelPartsTypes.cpp | 18 | ||||
-rw-r--r-- | slicer/slicer/modelPartsTypes.impl.h | 6 |
2 files changed, 12 insertions, 12 deletions
diff --git a/slicer/slicer/modelPartsTypes.cpp b/slicer/slicer/modelPartsTypes.cpp index 65ede97..3adff5a 100644 --- a/slicer/slicer/modelPartsTypes.cpp +++ b/slicer/slicer/modelPartsTypes.cpp @@ -57,15 +57,6 @@ namespace Slicer { return name; } - MODELPARTFOR(std::string, ModelPartForSimple); - MODELPARTFOR(bool, ModelPartForSimple); - MODELPARTFOR(Ice::Float, ModelPartForSimple); - MODELPARTFOR(Ice::Double, ModelPartForSimple); - MODELPARTFOR(Ice::Byte, ModelPartForSimple); - MODELPARTFOR(Ice::Short, ModelPartForSimple); - MODELPARTFOR(Ice::Int, ModelPartForSimple); - MODELPARTFOR(Ice::Long, ModelPartForSimple); - template<> const std::string Slicer::ModelPartForRoot<std::string>::rootName = "String"; template<> const std::string Slicer::ModelPartForRoot<bool>::rootName = "Boolean"; template<> const std::string Slicer::ModelPartForRoot<Ice::Float>::rootName = "Float"; @@ -84,6 +75,15 @@ namespace Slicer { template<> const std::string Slicer::ModelPartForRoot<IceUtil::Optional<Ice::Int>>::rootName = "OptionalInt"; template<> const std::string Slicer::ModelPartForRoot<IceUtil::Optional<Ice::Long>>::rootName = "OptionalLong"; + MODELPARTFOR(std::string, ModelPartForSimple); + MODELPARTFOR(bool, ModelPartForSimple); + MODELPARTFOR(Ice::Float, ModelPartForSimple); + MODELPARTFOR(Ice::Double, ModelPartForSimple); + MODELPARTFOR(Ice::Byte, ModelPartForSimple); + MODELPARTFOR(Ice::Short, ModelPartForSimple); + MODELPARTFOR(Ice::Int, ModelPartForSimple); + MODELPARTFOR(Ice::Long, ModelPartForSimple); + bool optionalCaseEq(const std::string & a, const std::string & b, bool matchCase) { diff --git a/slicer/slicer/modelPartsTypes.impl.h b/slicer/slicer/modelPartsTypes.impl.h index 149bb1d..017d243 100644 --- a/slicer/slicer/modelPartsTypes.impl.h +++ b/slicer/slicer/modelPartsTypes.impl.h @@ -13,9 +13,6 @@ #include <boost/algorithm/string/case_conv.hpp> #define CUSTOMMODELPARTFOR(Type, BaseModelPart, ModelPartType) \ - template class BaseModelPart; \ - template class ModelPartForRoot<Type>; \ - template class ModelPartForRoot< IceUtil::Optional<Type> >; \ template<> ModelPartPtr ModelPart::CreateFor<Type>() { return new ModelPartType(nullptr); } \ template<> ModelPartPtr ModelPart::CreateFor(Type & s) { return new ModelPartType(&s); } \ template<> ModelPartPtr ModelPart::CreateFor(const Type & s) { return CreateFor(const_cast<Type &>(s)); } \ @@ -25,6 +22,9 @@ template<> ModelPartForRootPtr ModelPart::CreateRootFor(IceUtil::Optional<Type> & s) { return new ModelPartForRoot<IceUtil::Optional<Type> >(&s); } \ template<> ModelPartForRootPtr ModelPart::CreateRootFor(const Type & s) { return CreateRootFor(const_cast<Type &>(s)); } \ template<> ModelPartForRootPtr ModelPart::CreateRootFor(const IceUtil::Optional<Type> & s) { return CreateRootFor(const_cast<IceUtil::Optional<Type> &>(s)); } \ + template class BaseModelPart; \ + template class ModelPartForRoot<Type>; \ + template class ModelPartForRoot< IceUtil::Optional<Type> >; \ #define MODELPARTFOR(Type, ModelPartType) \ CUSTOMMODELPARTFOR(Type, ModelPartType<Type>, ModelPartType<Type>) |