OSXSDDateTimeClass Class Reference
Inheritance diagram for OSXSDDateTimeClass:
Public Member Functions | |
OSXSDDateTimeClass () | |
OSXSDDateTimeClass(): This is a default constructor, sets the date and time fields to zero. | |
OSXSDDateTimeClass (const OSUTF8CHAR *dtString) | |
OSXSDDateTimeClass(string): This is a parameterized constructor, parses string and sets the date and time fields. | |
OSXSDDateTimeClass (OSINT32 year_, OSUINT8 mon_, OSUINT8 day_, OSUINT8 hour_, OSUINT8 min_, OSREAL sec_, OSBOOL tz_flag_, OSINT32 tzo_) | |
OSXSDDateTimeClass(param1,param2,. | |
OSXSDDateTimeClass (const OSXSDDateTimeClass &dt) | |
OSXSDDateTimeClass(const OSXSDDateTimeClass& dt): This is a copy constructor, sets the date and time fields to that of equal to supplied OSXSDDateTimeClass type object. | |
OSXSDDateTimeClass (const OSXSDDateTime &dt) | |
OSXSDDateTimeClass(const OSXSDDateTime& dt): This is a copy constructor, sets the date and time fields to that of equal to supplied OSXSDDateTimeClass type object. | |
OSRTBaseType * | clone () const |
Clone method. | |
int | getTime (time_t &timeMs) |
This method converts the datetime value to a calendar time encoded as a value of type time_t. | |
virtual int | parseString (const OSUTF8CHAR *dtString) |
parseString: This method parses the datetime string and sets the date and time value | |
void | print (const char *name) |
This method prints the datetime value to standard output. | |
int | setCurrent () |
setCurrent: This method sets the date and time fields to the values of current date and time. | |
int | setCurrentTz () |
setCurrentTz: This method sets the date, time and timezone fields to the values of current date and time. | |
int | setDateTime (struct tm *time) |
This method converts a structure of type tm to the datetime value. | |
int | setLocalTime (time_t timeMs) |
This method sets local date and time to the datetime value. | |
int | setUtcTime (time_t timeMs) |
This method sets UTC date and time to the datetime value. | |
void | setValue (const OSUTF8CHAR *utf8str) |
This method sets the string value to the given datetime instance. | |
void | setValue (const OSXSDDateTime &dt) |
This method sets the datetime value to the given datetime instance. | |
const OSUTF8CHAR * | toString () |
toString: This method sets the date and time fields to the values of current date and time. | |
virtual const OSUTF8CHAR * | toString (OSUTF8CHAR *buffer, size_t bufsize) |
This method sets the date and time fields to the values of current date and time. | |
OSXSDDateTimeClass & | operator= (const OSXSDDateTimeClass &orig) |
Assignment operator. |
Detailed Description
Definition at line 34 of file rtxCppDateTime.h.
Constructor & Destructor Documentation
OSXSDDateTimeClass::OSXSDDateTimeClass | ( | OSINT32 | year_, | |
OSUINT8 | mon_, | |||
OSUINT8 | day_, | |||
OSUINT8 | hour_, | |||
OSUINT8 | min_, | |||
OSREAL | sec_, | |||
OSBOOL | tz_flag_, | |||
OSINT32 | tzo_ | |||
) |
OSXSDDateTimeClass(param1,param2,.
.): This is a parameterized constructor, sets the date and time elements with the supplied parameter values .
- Parameters:
-
year_ OSINT32 sets year field mon_ OSUINT8 sets month field day_ OSUINT8 sets day field hour_ OSUINT8 sets hour field min_ OSUINT8 sets minute filed sec_ OSREAL sets second field tz_flag_ OSBOOL sets timezone flag tzo_ OSINT32 sets timezone value
OSXSDDateTimeClass::OSXSDDateTimeClass | ( | const OSXSDDateTimeClass & | dt | ) |
OSXSDDateTimeClass(const OSXSDDateTimeClass& dt): This is a copy constructor, sets the date and time fields to that of equal to supplied OSXSDDateTimeClass type object.
- Parameters:
-
dt OSXSDDateTimeClass type object.
OSXSDDateTimeClass::OSXSDDateTimeClass | ( | const OSXSDDateTime & | dt | ) |
OSXSDDateTimeClass(const OSXSDDateTime& dt): This is a copy constructor, sets the date and time fields to that of equal to supplied OSXSDDateTimeClass type object.
- Parameters:
-
dt OSXSDDateTimeClass type object.
Member Function Documentation
OSRTBaseType* OSXSDDateTimeClass::clone | ( | ) | const [inline, virtual] |
Clone method.
Creates a copied instance and returns pointer to OSRTBaseType.
Reimplemented from OSRTBaseType.
Reimplemented in OSXSDDateClass, and OSXSDTimeClass.
Definition at line 86 of file rtxCppDateTime.h.
int OSXSDDateTimeClass::getTime | ( | time_t & | timeMs | ) |
This method converts the datetime value to a calendar time encoded as a value of type time_t.
- Parameters:
-
timeMs A pointer to time_t value to be set.
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error.
virtual int OSXSDDateTimeClass::parseString | ( | const OSUTF8CHAR * | dtString | ) | [virtual] |
parseString: This method parses the datetime string and sets the date and time value
- Parameters:
-
dtString const OSUTF8CHAR* - Date and time string
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error
Reimplemented in OSXSDDateClass, and OSXSDTimeClass.
void OSXSDDateTimeClass::print | ( | const char * | name | ) |
This method prints the datetime value to standard output.
- Parameters:
-
name - Name of generated string variable.
Reimplemented in OSXSDDateClass, and OSXSDTimeClass.
int OSXSDDateTimeClass::setCurrent | ( | ) |
setCurrent: This method sets the date and time fields to the values of current date and time.
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error
int OSXSDDateTimeClass::setCurrentTz | ( | ) |
setCurrentTz: This method sets the date, time and timezone fields to the values of current date and time.
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error
int OSXSDDateTimeClass::setDateTime | ( | struct tm * | time | ) |
This method converts a structure of type tm to the datetime value.
- Parameters:
-
time A pointer to tm structure to be converted.
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error.
int OSXSDDateTimeClass::setLocalTime | ( | time_t | timeMs | ) |
This method sets local date and time to the datetime value.
- Parameters:
-
timeMs A calendar time encoded as a value of type time_t.
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error.
int OSXSDDateTimeClass::setUtcTime | ( | time_t | timeMs | ) |
This method sets UTC date and time to the datetime value.
- Parameters:
-
timeMs A calendar time encoded as a value of type time_t. The time is represented as seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC).
- Returns:
- Completion status of operation:
- 0(RT_OK) = success,
- negative return value is error.
void OSXSDDateTimeClass::setValue | ( | const OSUTF8CHAR * | utf8str | ) |
This method sets the string value to the given datetime instance.
- Parameters:
-
utf8str - C null-terminated string.
void OSXSDDateTimeClass::setValue | ( | const OSXSDDateTime & | dt | ) |
This method sets the datetime value to the given datetime instance.
- Parameters:
-
dt - OSXSDDateTimeClass type object.
const OSUTF8CHAR* OSXSDDateTimeClass::toString | ( | ) |
toString: This method sets the date and time fields to the values of current date and time.
- Returns:
- const OSUTF8CHAR* pointer returns the datetime string
virtual const OSUTF8CHAR* OSXSDDateTimeClass::toString | ( | OSUTF8CHAR * | buffer, | |
size_t | bufsize | |||
) | [virtual] |
This method sets the date and time fields to the values of current date and time.
- Parameters:
-
buffer OSUTF8CHAR* - pointer to Date and time string bufsize size_t specifies buffer size
- Returns:
- const OSUTF8CHAR* returns the datetime string
Reimplemented in OSXSDDateClass, and OSXSDTimeClass.
The documentation for this class was generated from the following file: