diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-01-06 20:11:33 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-01-06 20:11:33 +0000 |
commit | acb966d73e0050c900bf6b1e1d0ca7f006d718f3 (patch) | |
tree | 214fe96a9371471e6cba94a53355b66f07116e1b | |
parent | Replace ModelPartForClassRoot with ModelPartForRoot which should work with an... (diff) | |
download | slicer-acb966d73e0050c900bf6b1e1d0ca7f006d718f3.tar.bz2 slicer-acb966d73e0050c900bf6b1e1d0ca7f006d718f3.tar.xz slicer-acb966d73e0050c900bf6b1e1d0ca7f006d718f3.zip |
Move the model part creators into their own file
-rw-r--r-- | slicer/slicer/Jamfile.jam | 1 | ||||
-rw-r--r-- | slicer/slicer/modelParts.cpp | 13 | ||||
-rw-r--r-- | slicer/slicer/slicer.cpp | 17 |
3 files changed, 18 insertions, 13 deletions
diff --git a/slicer/slicer/Jamfile.jam b/slicer/slicer/Jamfile.jam index 96bd9a9..18acae6 100644 --- a/slicer/slicer/Jamfile.jam +++ b/slicer/slicer/Jamfile.jam @@ -10,6 +10,7 @@ lib slicer : <library>IceUtil <library>boost_system <library>boost_filesystem + <include>.. : : <include>.. <library>boost_system diff --git a/slicer/slicer/modelParts.cpp b/slicer/slicer/modelParts.cpp index 480ec1d..80d90cf 100644 --- a/slicer/slicer/modelParts.cpp +++ b/slicer/slicer/modelParts.cpp @@ -90,18 +90,5 @@ namespace Slicer { { return emptyMetadata; } - -#define MODELPARTFOR(Type, ModelPart) \ - ModelPartPtr ModelPartFor(Type & t) { return new ModelPart< Type >(t); } \ - ModelPartPtr ModelPartFor(Type * t) { return new ModelPart< Type >(t); } - 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); -#undef MODELPARTFOR } diff --git a/slicer/slicer/slicer.cpp b/slicer/slicer/slicer.cpp new file mode 100644 index 0000000..c055565 --- /dev/null +++ b/slicer/slicer/slicer.cpp @@ -0,0 +1,17 @@ +#include "slicer.h" + +namespace Slicer { +#define MODELPARTFOR(Type, ModelPart) \ + ModelPartPtr ModelPartFor(Type & t) { return new ModelPart< Type >(t); } \ + ModelPartPtr ModelPartFor(Type * t) { return new ModelPart< Type >(t); } + 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); +#undef MODELPARTFOR +} + |