diff options
Diffstat (limited to 'p2pvr/ice/converters.cpp')
-rw-r--r-- | p2pvr/ice/converters.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/p2pvr/ice/converters.cpp b/p2pvr/ice/converters.cpp new file mode 100644 index 0000000..94f2353 --- /dev/null +++ b/p2pvr/ice/converters.cpp @@ -0,0 +1,33 @@ +#include <variableType.h> +#include <common.h> +#include <iceConvert.h> +#include "commonHelpers.h" + +template<> +VariableType +IceConvert<Common::DateTime>::ToVariable(const Common::DateTime & dt) +{ + return *dt; +} + +template<> +VariableType +IceConvert<Common::Duration>::ToVariable(const Common::Duration & d) +{ + return *d; +} + +template<> +Common::DateTime +IceConvert<Common::DateTime>::FromVariable(const VariableType & dt) +{ + return *dt.as<boost::posix_time::ptime>(); +} + +template<> +Common::Duration +IceConvert<Common::Duration>::FromVariable(const VariableType & d) +{ + return *d.as<boost::posix_time::time_duration>(); +} + |