Public Member Functions | Static Public Attributes

FBTime Class Reference

Search for all occurrences

Detailed Description

Time data structure.

Definition at line 81 of file fbtime.h.

#include <fbtime.h>

List of all members.

Public Member Functions

  FBTime (kLongLong pTime=0)
  FBTime (int pHour, int pMinute, int pSecond=0, int pFrame=0, int pField=0, FBTimeMode pTimeMode=kFBTimeModeDefault, double pFramerate=0.0)
  Constructor.
FBString  GetTimeString ()
  Get time as a string.
void  SetTimeString (char *pTime)
  Set time from string.
bool  GetTime (kLongLong &pHour, kLongLong &pMinute, kLongLong &pSecond, kLongLong &pFrame, kLongLong &pField, kLongLong &pMilliSecond, FBTimeMode pTimeMode=kFBTimeModeDefault, double pFramerate=0.0)
  Get time (filling separate values)
kLongLong  GetMilliSeconds ()
  Get milliseconds for time.
void  SetMilliSeconds (kLongLong pMilliSeconds)
  Set milliseconds time.
kLongLong Get ()
  Get time value (long)
const kLongLong Get () const
  Get time value (long)
void  Set (kLongLong pTime)
  Set time value from a long.
double  GetSecondDouble ()
  Get seconds as double.
void  SetSecondDouble (double pTime)
  Set seconds from double.
void  SetTime (int pHour, int pMinute=0, int pSecond=0, int pFrame=0, int pField=0, FBTimeMode pTimeMode=kFBTimeModeDefault, double pFramerate=0.0)
  Set time (from separate values)
kLongLong  GetFrame (bool pCummul=false, FBTimeMode pTimeMode=kFBTimeModeDefault, double pFramerate=0.0)
  Get the frame count.
FBTime operator= (const FBTime &pTime)
  Overloaded assignment operators with FBTime objects.
FBTime operator+= (const FBTime &pTime)
FBTime operator-= (const FBTime &pTime)
FBTime operator*= (const FBTime &pTime)
FBTime operator/= (const FBTime &pTime)
FBTime operator= (double pConstant)
  Overloaded assignment operators with constants.
FBTime operator+= (double pConstant)
FBTime operator-= (double pConstant)
FBTime operator*= (double pConstant)
FBTime operator/= (double pConstant)
FBTime  operator- (const FBTime &pTime)
  Overloaded arithmetic operators with FBTime objects.
FBTime  operator+ (const FBTime &pTime)
FBTime  operator/ (const FBTime &pTime)
FBTime  operator* (const FBTime &pTime)
FBTime  operator- (double pConstant)
  Overloaded arithmetic operators with constants.
FBTime  operator+ (double pConstant)
FBTime  operator/ (double pConstant)
FBTime  operator* (double pConstant)
bool  operator== (const FBTime &pTime)
  Overloaded comparison operators.
bool  operator!= (const FBTime &pTime)
bool  operator>= (const FBTime &pTime)
bool  operator<= (const FBTime &pTime)
bool  operator> (const FBTime &pTime)
bool  operator< (const FBTime &pTime)

Static Public Attributes

static const FBTime  Infinity
  Time constant: Infinity, the largest time value.
static const FBTime  MinusInfinity
  Time constant: Minus Infinity, the lowest negative time value.
static const FBTime  Zero
  Time constant: Zero.
static const FBTime  Epsilon
  Time constant: Epsilon, the smallest time increment.
static const FBTime  OneSecond
  Time constant: One Second.
static const FBTime  OneMinute
  Time constant: One Minute.
static const FBTime  OneHour
  Time constant: One Hour.

Constructor & Destructor Documentation

FBTime ( kLongLong  pTime = 0 )
FBTime ( int  pHour,
int  pMinute,
int  pSecond = 0,
int  pFrame = 0,
int  pField = 0,
FBTimeMode  pTimeMode = kFBTimeModeDefault,
double  pFramerate = 0.0 
)

Constructor.

Parameters:
pHour Hour value.
pMinute Minute value.
pSecond Second value.
pFrame Frame value.
pField Field value.
pTimeMode Time mode(default=kFBTimeModeDefault).
pFramerate Custom framerate value in case of pTimeMode = kFBTimeModeCustom.

Member Function Documentation

FBString GetTimeString ( )

Get time as a string.

Returns:
String value of time.
void SetTimeString ( char *  pTime )

Set time from string.

Parameters:
pTime String to set time from.
bool GetTime ( kLongLong pHour,
kLongLong pMinute,
kLongLong pSecond,
kLongLong pFrame,
kLongLong pField,
kLongLong pMilliSecond,
FBTimeMode  pTimeMode = kFBTimeModeDefault,
double  pFramerate = 0.0 
)

Get time (filling separate values)

Return values:
pHour Hour value.
pMinute Minute value.
pSecond Second value.
pFrame Frame value.
pField Field value.
pMilliSecond MilliSecond value.
Parameters:
pTimeMode Time mode to get time as.
pFramerate Custom framerate value in case of pTimeMode = kFBTimeModeCustom.
Returns:
true if an acceptable TimeMode value was chosen.
kLongLong GetMilliSeconds ( )

Get milliseconds for time.

Returns:
MilliSeconds value.
void SetMilliSeconds ( kLongLong  pMilliSeconds )

Set milliseconds time.

Parameters:
pMilliSeconds MilliSeconds value.
kLongLong& Get ( )

Get time value (long)

Returns:
Time value as long.
const kLongLong& Get ( ) const

Get time value (long)

Returns:
Time value as long.
void Set ( kLongLong  pTime )

Set time value from a long.

Parameters:
pTime Time value to set.
double GetSecondDouble ( )

Get seconds as double.

Returns:
Seconds in double form.
void SetSecondDouble ( double  pTime )

Set seconds from double.

Parameters:
pTime Time to set seconds from.
void SetTime ( int  pHour,
int  pMinute = 0,
int  pSecond = 0,
int  pFrame = 0,
int  pField = 0,
FBTimeMode  pTimeMode = kFBTimeModeDefault,
double  pFramerate = 0.0 
)

Set time (from separate values)

Parameters:
pHour Hour value.
pMinute Minute value(default=0).
pSecond Second value(default=0).
pFrame Frame value(default=0).
pField Field value(default=0).
pTimeMode Time mode to get time as(default=kFBTimeModeDefault).
pFramerate Custom framerate value in case of pTimeMode = kFBTimeModeCustom.
FBTime& operator= ( const FBTime pTime )

Overloaded assignment operators with FBTime objects.

Parameters:
pTime Time to assign with operator.
Returns:
Resulting time from operation.
FBTime& operator+= ( const FBTime pTime )
FBTime& operator-= ( const FBTime pTime )
FBTime& operator*= ( const FBTime pTime )
FBTime& operator/= ( const FBTime pTime )
FBTime& operator= ( double  pConstant )

Overloaded assignment operators with constants.

Parameters:
pConstant Time to assign with operator.
Returns:
Resulting time from operation.
FBTime& operator+= ( double  pConstant )
FBTime& operator-= ( double  pConstant )
FBTime& operator*= ( double  pConstant )
FBTime& operator/= ( double  pConstant )
FBTime operator- ( const FBTime pTime )

Overloaded arithmetic operators with FBTime objects.

Parameters:
pTime Time to use in operation.
Returns:
Result in FBTime data.
FBTime operator+ ( const FBTime pTime )
FBTime operator/ ( const FBTime pTime )
FBTime operator* ( const FBTime pTime )
FBTime operator- ( double  pConstant )

Overloaded arithmetic operators with constants.

Parameters:
pConstant Double constant to add to time.
Returns:
Result in FBTime data.
FBTime operator+ ( double  pConstant )
FBTime operator/ ( double  pConstant )
FBTime operator* ( double  pConstant )
bool operator== ( const FBTime pTime )

Overloaded comparison operators.

Parameters:
pTime Time to compare with.
Returns:
Result of comparison.
bool operator!= ( const FBTime pTime )
bool operator>= ( const FBTime pTime )
bool operator<= ( const FBTime pTime )
bool operator> ( const FBTime pTime )
bool operator< ( const FBTime pTime )
kLongLong GetFrame ( bool  pCummul = false,
FBTimeMode  pTimeMode = kFBTimeModeDefault,
double  pFramerate = 0.0 
)

Get the frame count.

With this function, it is possible to obtain the cumulative and local frame counts.

Parameters:
pCummul Cumulative frame count (true ), or local frame count (false )(default is false).
pTimeMode Time mode to get the constant (default is kFBTimeModeDefault).
pFramerate Custom framerate value in case of pTimeMode = kFBTimeModeCustom.
Returns:
Frames per second constant for the specified time mode.

Member Data Documentation

const FBTime Infinity [static]

Time constant: Infinity, the largest time value.

Definition at line 239 of file fbtime.h.

const FBTime MinusInfinity [static]

Time constant: Minus Infinity, the lowest negative time value.

Definition at line 242 of file fbtime.h.

const FBTime Zero [static]

Time constant: Zero.

Definition at line 245 of file fbtime.h.

const FBTime Epsilon [static]

Time constant: Epsilon, the smallest time increment.

Definition at line 248 of file fbtime.h.

const FBTime OneSecond [static]

Time constant: One Second.

Definition at line 251 of file fbtime.h.

const FBTime OneMinute [static]

Time constant: One Minute.

Definition at line 254 of file fbtime.h.

const FBTime OneHour [static]

Time constant: One Hour.

Definition at line 257 of file fbtime.h.


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

FBTime FBTime FBTime FBTime FBTime FBTime FBTime FBTime FBTime FBTime
FBTime FBTime FBTime FBTime FBTime FBTime FBTime FBTime FBTime FBTime