TUIO::TuioTime Class Reference

#include <TuioTime.h>

List of all members.

Public Member Functions

 TuioTime ()
 ~TuioTime ()
 TuioTime (long msec)
 TuioTime (long sec, long usec)
TuioTime operator+ (long us)
TuioTime operator+ (TuioTime ttime)
TuioTime operator- (long us)
TuioTime operator- (TuioTime ttime)
void operator= (TuioTime ttime)
bool operator== (TuioTime ttime)
bool operator!= (TuioTime ttime)
void reset ()
int getSeconds ()
int getMicroseconds ()
long getTotalMilliseconds ()

Static Public Member Functions

static void initSession ()
static TuioTime getSessionTime ()
static TuioTime getStartTime ()
static TuioTime getSystemTime ()


Detailed Description

The TuioTime class is a simple structure that is used to reprent the time that has elapsed since the session start. The time is internally represented as seconds and fractions of microseconds which should be more than sufficient for gesture related timing requirements. Therefore at the beginning of a typical TUIO session the static method initSession() will set the reference time for the session. Another important static method getSessionTime will return a TuioTime object representing the time elapsed since the session start. The class also provides various addtional convience method, which allow some simple time arithmetics.

Author:
Martin Kaltenbrunner
Version:
1.4

Constructor & Destructor Documentation

TUIO::TuioTime::TuioTime (  )  [inline]

The default constructor takes no arguments and sets the Seconds and Microseconds attributes of the newly created TuioTime both to zero.

TUIO::TuioTime::~TuioTime (  )  [inline]

The destructor is doing nothing in particular.

TUIO::TuioTime::TuioTime ( long  msec  )  [inline]

This constructor takes the provided time represented in total Milliseconds and assigs this value to the newly created TuioTime.

Parameters:
msec the total time in Millseconds

TUIO::TuioTime::TuioTime ( long  sec,
long  usec 
) [inline]

This constructor takes the provided time represented in Seconds and Microseconds and assigs these value to the newly created TuioTime.

Parameters:
sec the total time in seconds
usec the microseconds time component


Member Function Documentation

TuioTime TUIO::TuioTime::operator+ ( long  us  )  [inline]

Sums the provided time value represented in total Microseconds to this TuioTime.

Parameters:
us the total time to add in Microseconds
Returns:
the sum of this TuioTime with the provided argument in microseconds

TuioTime TUIO::TuioTime::operator+ ( TuioTime  ttime  )  [inline]

Sums the provided TuioTime to the private Seconds and Microseconds attributes.

Parameters:
ttime the TuioTime to add
Returns:
the sum of this TuioTime with the provided TuioTime argument

TuioTime TUIO::TuioTime::operator- ( long  us  )  [inline]

Subtracts the provided time represented in Microseconds from the private Seconds and Microseconds attributes.

Parameters:
us the total time to subtract in Microseconds
Returns:
the subtraction result of this TuioTime minus the provided time in Microseconds

TuioTime TUIO::TuioTime::operator- ( TuioTime  ttime  )  [inline]

Subtracts the provided TuioTime from the private Seconds and Microseconds attributes.

Parameters:
ttime the TuioTime to subtract
Returns:
the subtraction result of this TuioTime minus the provided TuioTime

void TUIO::TuioTime::operator= ( TuioTime  ttime  )  [inline]

Assigns the provided TuioTime to the private Seconds and Microseconds attributes.

Parameters:
ttime the TuioTime to assign

bool TUIO::TuioTime::operator== ( TuioTime  ttime  )  [inline]

Takes a TuioTime argument and compares the provided TuioTime to the private Seconds and Microseconds attributes.

Parameters:
ttime the TuioTime to compare
Returns:
true if the two TuioTime have equal Seconds and Microseconds attributes

bool TUIO::TuioTime::operator!= ( TuioTime  ttime  )  [inline]

Takes a TuioTime argument and compares the provided TuioTime to the private Seconds and Microseconds attributes.

Parameters:
ttime the TuioTime to compare
Returns:
true if the two TuioTime have differnt Seconds or Microseconds attributes

void TUIO::TuioTime::reset (  )  [inline]

Resets the seconds and micro_seconds attributes to zero.

int TUIO::TuioTime::getSeconds (  )  [inline]

Returns the TuioTime Seconds component.

Returns:
the TuioTime Seconds component

int TUIO::TuioTime::getMicroseconds (  )  [inline]

Returns the TuioTime Microseconds component.

Returns:
the TuioTime Microseconds component

long TUIO::TuioTime::getTotalMilliseconds (  )  [inline]

Returns the total TuioTime in Milliseconds.

Returns:
the total TuioTime in Milliseconds

void TuioTime::initSession (  )  [static]

This static method globally resets the TUIO session time.

TuioTime TuioTime::getSessionTime (  )  [static]

Returns the present TuioTime representing the time since session start.

Returns:
the present TuioTime representing the time since session start

TuioTime TuioTime::getStartTime (  )  [static]

Returns the absolut TuioTime representing the session start.

Returns:
the absolut TuioTime representing the session start

TuioTime TuioTime::getSystemTime (  )  [static]

Returns the absolut TuioTime representing the current system time.

Returns:
the absolut TuioTime representing the current system time


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

Generated on Thu Mar 12 00:21:51 2009 for TUIO C++ Developer API by  doxygen 1.5.6