I'd like to call toTimestamp (const Enum &type, const SPL::rstring &str) in C++ primitive operator, but I can't find the way to specify TimestampFormat enum as the 1st parameter.
I could call counterpart SPL function toTimestamp( Sys.YYYY_MM_DD_hh_mm_ss, sTime ) like this:
myTime = toTimestamp( Sys.YYYY_MM_DD_hh_mm_ss, sTime );
I tried several ways (the following is one of them), but they cause compile errors.
using namespace SPL::Functions::Time;
myTime = toTimestamp( SPL::Functions::Time::YYYY_MM_DD_hh_mm_ss, timeString );
Thenks in advance.
This topic has been locked.
Pinned topic How should I specify TimestampFormat enum in C++ primitive operator?
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
hnasgaard 27000064QT200 Posts
Re: How should I specify TimestampFormat enum in C++ primitive operator?2013-02-01T13:06:56ZThis is the accepted answer. This is the accepted answer.Calling that version of toTimestamp from C++ primitive operators isn't supported. The problem is, that function takes a ref to a Enum, and you don't have an Enum to pass it. When using this from SPL code the Enum code is generated in response to its use. It doesn't exist anywhere else other than in the operator that uses it. If you write a small SPL example that uses that enum, you can see the generated code in output/src/type.
Saruton 270002YPVS111 Posts
Re: How should I specify TimestampFormat enum in C++ primitive operator?2013-02-04T08:12:11ZThis is the accepted answer. This is the accepted answer.