Arc::Time Class Reference

A class for storing and manipulating times. More...

#include <DateTime.h>

Public Member Functions

 Time ()
 Time (time_t)
 Time (time_t time, uint32_t nanosec)
 Time (const std::string &)
Timeoperator= (time_t)
Timeoperator= (const Time &)
Timeoperator= (const char *)
Timeoperator= (const std::string &)
void SetTime (time_t)
void SetTime (time_t time, uint32_t nanosec)
time_t GetTime () const
 operator std::string () const
std::string str (const TimeFormat &=time_format) const
bool operator< (const Time &) const
bool operator> (const Time &) const
bool operator<= (const Time &) const
bool operator>= (const Time &) const
bool operator== (const Time &) const
bool operator!= (const Time &) const
Time operator+ (const Period &) const
Time operator- (const Period &) const
Period operator- (const Time &) const

Static Public Member Functions

static void SetFormat (const TimeFormat &)
static TimeFormat GetFormat ()

Detailed Description

A class for storing and manipulating times.


Constructor & Destructor Documentation

Arc::Time::Time (  ) 

Default constructor. The time is put equal the current time.

Arc::Time::Time ( time_t   ) 

Constructor that takes a time_t variable and stores it.

Arc::Time::Time ( time_t  time,
uint32_t  nanosec 
)

Constructor that takes a fine grained time variables and stores them.

Arc::Time::Time ( const std::string &   ) 

Constructor that tries to convert a string into a time_t.


Member Function Documentation

static TimeFormat Arc::Time::GetFormat (  )  [static]

Gets the default format for time strings.

time_t Arc::Time::GetTime (  )  const

gets the time

Arc::Time::operator std::string (  )  const

Returns a string representation of the time, using the default format.

bool Arc::Time::operator!= ( const Time  )  const

Comparing two Time objects.

Time Arc::Time::operator+ ( const Period  )  const

Adding Time object with Period object.

Period Arc::Time::operator- ( const Time  )  const

Subtracting Time object from the other Time object.

Time Arc::Time::operator- ( const Period  )  const

Subtracting Period object from Time object.

bool Arc::Time::operator< ( const Time  )  const

Comparing two Time objects.

bool Arc::Time::operator<= ( const Time  )  const

Comparing two Time objects.

Time& Arc::Time::operator= ( const std::string &   ) 

Assignment operator from a string.

Time& Arc::Time::operator= ( const char *   ) 

Assignment operator from a char pointer.

Time& Arc::Time::operator= ( const Time  ) 

Assignment operator from a Time.

Time& Arc::Time::operator= ( time_t   ) 

Assignment operator from a time_t.

bool Arc::Time::operator== ( const Time  )  const

Comparing two Time objects.

bool Arc::Time::operator> ( const Time  )  const

Comparing two Time objects.

bool Arc::Time::operator>= ( const Time  )  const

Comparing two Time objects.

static void Arc::Time::SetFormat ( const TimeFormat  )  [static]

Sets the default format for time strings.

void Arc::Time::SetTime ( time_t  time,
uint32_t  nanosec 
)

sets the fine grained time

void Arc::Time::SetTime ( time_t   ) 

sets the time

Referenced by DataStaging::DTR::set_timeout().

std::string Arc::Time::str ( const TimeFormat = time_format  )  const

Returns a string representation of the time, using the specified format.


The documentation for this class was generated from the following file:
Generated on Wed Jun 27 11:54:20 2012 for Hosting Environment (Daemon) by  doxygen 1.6.3