summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slicer/test/conversions.cpp14
-rw-r--r--slicer/test/conversions.h4
-rw-r--r--slicer/test/optionals.ice2
-rw-r--r--slicer/test/types.ice4
4 files changed, 21 insertions, 3 deletions
diff --git a/slicer/test/conversions.cpp b/slicer/test/conversions.cpp
index 8af0f0f..8b0f0ab 100644
--- a/slicer/test/conversions.cpp
+++ b/slicer/test/conversions.cpp
@@ -106,6 +106,20 @@ namespace Slicer {
}
return std::to_string(*i);
}
+
+ DLL_PUBLIC
+ std::string
+ ptimeToString(const boost::posix_time::ptime & pt)
+ {
+ return boost::posix_time::to_iso_extended_string(pt);
+ }
+
+ DLL_PUBLIC
+ boost::posix_time::ptime
+ stringToPtime(const std::string & s)
+ {
+ return boost::posix_time::from_iso_string(s);
+ }
}
namespace TestModule {
diff --git a/slicer/test/conversions.h b/slicer/test/conversions.h
index dfb18d6..8bd376f 100644
--- a/slicer/test/conversions.h
+++ b/slicer/test/conversions.h
@@ -32,6 +32,10 @@ namespace Slicer {
Ice::optional<Ice::Int> str2int(const std::string &);
DLL_PUBLIC
std::string int2str(const Ice::optional<Ice::Int> &);
+ DLL_PUBLIC
+ std::string ptimeToString(const boost::posix_time::ptime &);
+ DLL_PUBLIC
+ boost::posix_time::ptime stringToPtime(const std::string &);
}
#endif
diff --git a/slicer/test/optionals.ice b/slicer/test/optionals.ice
index c4c7436..7831cf6 100644
--- a/slicer/test/optionals.ice
+++ b/slicer/test/optionals.ice
@@ -12,7 +12,7 @@ module TestModule {
optional(2) DateTimeContainer optClass;
optional(3) Classes optSeq;
optional(4) ClassMap optDict;
- [ "slicer:conversion:boost.posix_time.ptime:boost.posix_time.to_iso_extended_string:boost.posix_time.time_from_string:nodeclare" ]
+ [ "slicer:conversion:boost.posix_time.ptime:ptimeToString:stringToPtime:nodeclare" ]
optional(5) string optConverted;
};
class Optionals2 {
diff --git a/slicer/test/types.ice b/slicer/test/types.ice
index a48f380..ac050b4 100644
--- a/slicer/test/types.ice
+++ b/slicer/test/types.ice
@@ -30,11 +30,11 @@ module TestModule2 {
TestModule::Base base;
};
class Conv {
- [ "slicer:conversion:boost.posix_time.ptime:boost.posix_time.to_iso_extended_string:boost.posix_time.time_from_string:nodeclare" ]
+ [ "slicer:conversion:boost.posix_time.ptime:ptimeToString:stringToPtime:nodeclare" ]
string conv;
};
class MissingConv {
- [ "slicer:conversion:boost.posix_time.ptime:boost.posix_time.to_iso_extended_string:boost.posix_time.time_from_string:nodeclare",
+ [ "slicer:conversion:boost.posix_time.ptime:ptimeToString:stringToPtime:nodeclare",
"slicer:nodefaultconversion" ]
string conv;
};