diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-08-31 23:50:55 +0100 | 
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-08-31 23:50:55 +0100 | 
| commit | ca23b2517da200a2a39e740603fcbe4fc3defaf6 (patch) | |
| tree | f8cf01db70f725c8e8fc888a32149a5007814893 | |
| parent | Register route handler factories, not route handlers so we can construct them... (diff) | |
| download | icespider-ca23b2517da200a2a39e740603fcbe4fc3defaf6.tar.bz2 icespider-ca23b2517da200a2a39e740603fcbe4fc3defaf6.tar.xz icespider-ca23b2517da200a2a39e740603fcbe4fc3defaf6.zip  | |
Use Slicer enum helper for writing enumerated values
| -rw-r--r-- | icespider/compile/routeCompiler.cpp | 18 | 
1 files changed, 1 insertions, 17 deletions
diff --git a/icespider/compile/routeCompiler.cpp b/icespider/compile/routeCompiler.cpp index ae75bf2..e2ab8a1 100644 --- a/icespider/compile/routeCompiler.cpp +++ b/icespider/compile/routeCompiler.cpp @@ -12,20 +12,6 @@  namespace IceSpider {  	namespace Compile { -		class StringValue : public Slicer::ValueTarget { -			public: -				StringValue(std::string & t) : target(t) { } -				void get(const bool &) const override { } -				void get(const Ice::Byte &) const override { } -				void get(const Ice::Short &) const override { } -				void get(const Ice::Int &) const override { } -				void get(const Ice::Long &) const override { } -				void get(const Ice::Float &) const override { } -				void get(const Ice::Double &) const override { } -				void get(const std::string & v) const override { target = v; } -				std::string & target; -		}; -  		RouteCompiler::RouteCompiler()  		{  			searchPath.push_back(boost::filesystem::current_path()); @@ -243,9 +229,7 @@ namespace IceSpider {  		template<typename Enum>  		std::string getEnumString(Enum & e)  		{ -			std::string rtn; -			Slicer::ModelPart::CreateFor<Enum>(e)->GetValue(new StringValue(rtn)); -			return rtn; +			return Slicer::ModelPartForEnum<Enum>::lookup(e);  		}  		void  | 
