Bayonne2 / Common C++ 2 Framework
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
Time Class Reference

The Time class uses a integer representation of the current time. More...

#include <numbers.h>

Inheritance diagram for Time:
Inheritance graph
[legend]
Collaboration diagram for Time:
Collaboration graph
[legend]

Public Member Functions

  Time (time_t tm)
 
  Time (tm *dt)
 
  Time (char *str, size_t size=0)
 
  Time (int hour, int minute, int second)
 
  Time ()
 
virtual  ~Time ()
 
long  getValue (void) const
 
int  getHour (void) const
 
int  getMinute (void) const
 
int  getSecond (void) const
 
char *  getTime (char *buffer) const
 
time_t  getTime (void) const
 
tm *  getTime (tm *buf) const
 
void  setTime (char *str, size_t size=0)
 
bool  isValid (void) const
 
 
String  operator() () const
 
 
 
Timeoperator+= (const int val)
 
Timeoperator-= (const int val)
 
int  operator== (const Time &time)
 
int  operator!= (const Time &time)
 
int  operator< (const Time &time)
 
int  operator<= (const Time &time)
 
int  operator> (const Time &time)
 
int  operator>= (const Time &time)
 
bool  operator! () const
 

Protected Member Functions

void  toSeconds (int hour, int minute, int second)
 
void  fromSeconds (char *buf) const
 
virtual void  update (void)
 

Protected Attributes

long  seconds
 

Friends

Time  operator+ (const Time &time1, const Time &time2)
 
Time  operator- (const Time &time1, const Time &time2)
 
Time  operator+ (const Time &time, const int val)
 
Time  operator- (const Time &time, const int val)
 
Time  operator+ (const int val, const Time &time)
 
Time  operator- (const int val, const Time &time)
 

Detailed Description

The Time class uses a integer representation of the current time.

This is then manipulated in several forms and may be exported as needed.

Author
Marcelo Dalmas mad@b.nosp@m.rasm.nosp@m.ap.co.nosp@m.m.br Integer based time class.

Definition at line 215 of file numbers.h.

Constructor & Destructor Documentation

Time::Time ( time_t  tm )
Time::Time ( tm *  dt )
Time::Time ( char *  str,
size_t  size = 0 
)
Time::Time ( int  hour,
int  minute,
int  second 
)
Time::Time ( )
virtual Time::~Time ( )
virtual

Member Function Documentation

void Time::fromSeconds ( char *  buf ) const
protected
int Time::getHour ( void  ) const
int Time::getMinute ( void  ) const
int Time::getSecond ( void  ) const
char* Time::getTime ( char *  buffer ) const
time_t Time::getTime ( void  ) const
tm* Time::getTime ( tm *  buf ) const
long Time::getValue ( void  ) const
bool Time::isValid ( void  ) const
Time::operator long ( )
inline

Definition at line 250 of file numbers.h.

bool Time::operator! ( ) const
inline

Definition at line 264 of file numbers.h.

int Time::operator!= ( const Timetime )
String Time::operator() ( ) const
Time& Time::operator++ ( )
Time& Time::operator+= ( const int  val )
Time& Time::operator-- ( )
Time& Time::operator-= ( const int  val )
int Time::operator< ( const Timetime )
int Time::operator<= ( const Timetime )
int Time::operator== ( const Timetime )
int Time::operator> ( const Timetime )
int Time::operator>= ( const Timetime )
void Time::setTime ( char *  str,
size_t  size = 0 
)
void Time::toSeconds ( int  hour,
int  minute,
int  second 
)
protected
virtual void Time::update ( void  )
protectedvirtual

Friends And Related Function Documentation

Time operator+ ( const Timetime1,
const Timetime2 
)
friend
Time operator+ ( const Timetime,
const int  val 
)
friend
Time operator+ ( const int  val,
const Timetime 
)
friend
Time operator- ( const Timetime1,
const Timetime2 
)
friend
Time operator- ( const Timetime,
const int  val 
)
friend
Time operator- ( const int  val,
const Timetime 
)
friend

Field Documentation

long Time::seconds
protected

Definition at line 218 of file numbers.h.


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

Generated on Dec 21, 2017 for commoncpp2-1.8.1, ccrtp-1.7.2, libzrtpcpp-2.3.4, ccscript3-1.1.7, ccaudio2-1.0.0 and bayonne2-2.3.2 (after installation in /usr/local/) by   doxygen 1.8.6

AltStyle によって変換されたページ (->オリジナル) /