From acb966d73e0050c900bf6b1e1d0ca7f006d718f3 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 6 Jan 2015 20:11:33 +0000 Subject: Move the model part creators into their own file --- slicer/slicer/Jamfile.jam | 1 + slicer/slicer/modelParts.cpp | 13 ------------- slicer/slicer/slicer.cpp | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 slicer/slicer/slicer.cpp 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 : IceUtil boost_system boost_filesystem + .. : : .. 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 +} + -- cgit v1.2.3