User Manual, Developers Guide and API Documentation

wns::module::DateTime Class Reference

Class to represent points in time.

#include <module/DateTime.hpp>

Collaboration diagram for wns::module::DateTime:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DateTime (const time_t t)
 time_t Constructor.
 DateTime ()
 Default Constructor.
std::string getString () const
 Returns the time as a string.
time_t getTime () const
 Returns the time as time_t.
bool isEmpty () const
 Check if the DateTime object is empty.
bool operator!= (const DateTime b) const
 Inequality operator.
bool operator< (const DateTime b) const
 Less than operator.
bool operator<= (const DateTime b) const
 Less or equal operator.
bool operator== (const DateTime b) const
 Equality operator.
bool operator> (const DateTime b) const
 Greater than operator.
bool operator>= (const DateTime b) const
 Greater or equal operator.

Private Attributes

bool empty
 True if no time is stored.
time_t time
 Internal representation of time.


Detailed Description

Definition at line 38 of file DateTime.hpp.


Constructor & Destructor Documentation

DateTime::DateTime (  ) 

This constructor creates an empty DateTime.

See also:
isEmpty()

Definition at line 44 of file DateTime.cpp.

DateTime::DateTime ( const time_t  t  ) 

This constructor creates a DateTime instance initialized by a time_t. time_t is the standard C type for times. It contains the seconds elapsed since 1970-01-01 00:00:00.

Definition at line 50 of file DateTime.cpp.


Member Function Documentation

string DateTime::getString (  )  const

Returns:
the time as string.

Definition at line 94 of file DateTime.cpp.

time_t DateTime::getTime (  )  const

Returns:
the time as time_t.

Definition at line 89 of file DateTime.cpp.

bool DateTime::isEmpty (  )  const

Returns:
true, if the DateTime object is empty.

Definition at line 117 of file DateTime.cpp.

bool DateTime::operator!= ( const DateTime  b  )  const

Definition at line 63 of file DateTime.cpp.

bool DateTime::operator< ( const DateTime  b  )  const

Definition at line 73 of file DateTime.cpp.

bool DateTime::operator<= ( const DateTime  b  )  const

Definition at line 83 of file DateTime.cpp.

bool DateTime::operator== ( const DateTime  b  )  const

Definition at line 58 of file DateTime.cpp.

bool DateTime::operator> ( const DateTime  b  )  const

Definition at line 68 of file DateTime.cpp.

bool DateTime::operator>= ( const DateTime  b  )  const

Definition at line 78 of file DateTime.cpp.


Member Data Documentation

Definition at line 108 of file DateTime.hpp.

time_t wns::module::DateTime::time [private]

Definition at line 103 of file DateTime.hpp.


The documentation for this class was generated from the following files:

Generated on Sun May 27 03:33:00 2012 for openWNS by  doxygen 1.5.5