EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DateTimeStringFormat.h
Go to the documentation of this file.
1 /*|-----------------------------------------------------------------------------
2  *| This source code is provided under the Apache 2.0 license --
3  *| and is provided AS IS with no warranty or guarantee of fit for purpose. --
4  *| See the project's LICENSE.md for details. --
5  *| Copyright (C) 2019 Refinitiv. All rights reserved. --
6  *|-----------------------------------------------------------------------------
7  */
8 
9 #ifndef __thomsonreuters_ema_access_DateTimeStringFormat_h
10 #define __thomsonreuters_ema_access_DateTimeStringFormat_h
11 
26 #include "Access/Include/Data.h"
27 #include "Access/Include/OmmDate.h"
28 #include "Access/Include/OmmTime.h"
30 
31 namespace thomsonreuters {
32 
33 namespace ema {
34 
35 namespace access {
36 
38 {
39 public :
44  {
45  STR_DATETIME_ISO8601 = 1,
47  STR_DATETIME_RSSL = 2
49  };
50 
51  DateTimeStringFormat(): _format(STR_DATETIME_RSSL){};
52 
56  DateTimeStringFormatTypes getDateTimeStringFormatType() ;
57 
63  void dateTimeStringFormatType(DateTimeStringFormatTypes format);
64 
69  const EmaString& dateAsString(OmmDate &date);
70 
75  const EmaString& timeAsString(OmmTime &time);
76 
81  const EmaString& dateTimeAsString(OmmDateTime &dateTime);
82 
83 private:
84  DateTimeStringFormatTypes _format;
85 };
86 
87 }
88 
89 }
90 
91 }
92 
93 #endif // __thomsonreuters_ema_access_DateTimeStringFormat_h
OmmDateTime represents DateTime info in Omm.
Definition: OmmDateTime.h:63
EmaString class is a container of a null terminated Ascii character string.
Definition: EmaString.h:56
DateTimeStringFormat is an interface to string conversion methods for OmmDate, OmmTime & OmmDateTime...
#define EMA_ACCESS_API
Definition: Common.h:95
OmmDate represents Date info in Omm.
Definition: OmmDate.h:69
OmmTime represents Time info in Omm.
Definition: OmmTime.h:69