Public Types | Public Member Functions | Static Public Attributes

FBTime Class Reference

Search for all occurrences

Detailed Description

Time data structure.

Definition at line 86 of file fbtime.h.

#include <fbtime.h>

List of all members.

Public Types

enum  ETimeFormats { eSMPTE, eFrame, eDefaultFormat }
 

Different time format available.

More...

Public Member Functions

 FBTime (kLongLong pTime=0)
 FBTime (int pHour, int pMinute, int pSecond=0, int pFrame=0, int pField=0, FBTimeMode pTimeMode=kFBTimeModeDefault)
 Constructor.
FBString GetTimeString (FBTimeMode pMode=kFBTimeModeDefault, ETimeFormats pFormat=eDefaultFormat)
 Get time as a string.
void SetTimeString (const char *pTime)
 Set time from string.
bool GetTime (int &pHour, int &pMinute, int &pSecond, int &pFrame, int &pField, int &pMilliSecond, FBTimeMode pTimeMode=kFBTimeModeDefault)
 Get time (filling separate values)
kLongLong GetMilliSeconds ()
 Get milliseconds for time.
void SetMilliSeconds (kLongLong pMilliSeconds)
 Set milliseconds time.
kLongLongGet ()
 Get time value (long)
const kLongLongGet () 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)
 Set time (from separate values)
kLongLong GetFrame (FBTimeMode pTimeMode=kFBTimeModeDefault)
 Get the frame count.
void SetFrame (kLongLong pFrames, FBTimeMode pTimeMode=kFBTimeModeDefault)
 Set time in frame format.
FBTimeoperator= (const FBTime &pTime)
 Overloaded assignment operators with FBTime objects.
FBTimeoperator+= (const FBTime &pTime)
FBTimeoperator-= (const FBTime &pTime)
FBTimeoperator*= (const FBTime &pTime)
FBTimeoperator/= (const FBTime &pTime)
FBTimeoperator= (double pConstant)
 Overloaded assignment operators with constants.
FBTimeoperator+= (double pConstant)
FBTimeoperator-= (double pConstant)
FBTimeoperator*= (double pConstant)
FBTimeoperator/= (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.

Member Enumeration Documentation

Different time format available.

Enumerator:
eSMPTE 

format as SMPTE

eFrame 

format as numeric frame

eDefaultFormat 

Default Time format.

Definition at line 93 of file fbtime.h.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
pHourHour value.
pMinuteMinute value.
pSecondSecond value.
pFrameFrame value.
pFieldField value.
pTimeModeTime mode(default=kFBTimeModeDefault).

Member Function Documentation

FBString GetTimeString ( FBTimeMode  pMode = kFBTimeModeDefault,
ETimeFormats  pFormat = eDefaultFormat 
)

Get time as a string.

Parameters:
pModeTime mode (default=kFBTimeModeDefault) to use (call FBSystem().GetTransportFps() to the the current UI displayed mode).
pFormatFormat to use for the returned string(default=FBTime::eDefaultFormat).
Returns:
String value of time.
void SetTimeString ( const char *  pTime)

Set time from string.

Parameters:
pTimeString to set time from.
bool GetTime ( int &  pHour,
int &  pMinute,
int &  pSecond,
int &  pFrame,
int &  pField,
int &  pMilliSecond,
FBTimeMode  pTimeMode = kFBTimeModeDefault 
)

Get time (filling separate values)

Return values:
pHourHour value.
pMinuteMinute value.
pSecondSecond value.
pFrameFrame value.
pFieldField value.
pMilliSecondMilliSecond value.
Parameters:
pTimeModeTime mode to get time as.
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:
pMilliSecondsMilliSeconds 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:
pTimeTime value to set.
double GetSecondDouble ( )

Get seconds as double.

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

Set seconds from double.

Parameters:
pTimeTime to set seconds from.
void SetTime ( int  pHour,
int  pMinute = 0,
int  pSecond = 0,
int  pFrame = 0,
int  pField = 0,
FBTimeMode  pTimeMode = kFBTimeModeDefault 
)

Set time (from separate values)

Parameters:
pHourHour value.
pMinuteMinute value(default=0).
pSecondSecond value(default=0).
pFrameFrame value(default=0).
pFieldField value(default=0).
pTimeModeTime mode to get time as(default=kFBTimeModeDefault).
FBTime& operator= ( const FBTime pTime)

Overloaded assignment operators with FBTime objects.

Parameters:
pTimeTime 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:
pConstantTime 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:
pTimeTime 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:
pConstantDouble 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:
pTimeTime 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 ( FBTimeMode  pTimeMode = kFBTimeModeDefault)

Get the frame count.

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

Parameters:
pTimeModeTime mode to get the constant (default is kFBTimeModeDefault).
Returns:
Frames per second constant for the specified time mode.
void SetFrame ( kLongLong  pFrames,
FBTimeMode  pTimeMode = kFBTimeModeDefault 
)

Set time in frame format.

Parameters:
pFramesThe number of frames.
pTimeModeThe time mode identifier which will dictate the extraction algorithm.

Member Data Documentation

const FBTime Infinity [static]

Time constant: Infinity, the largest time value.

Definition at line 256 of file fbtime.h.

const FBTime MinusInfinity [static]

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

Definition at line 259 of file fbtime.h.

const FBTime Zero [static]

Time constant: Zero.

Definition at line 262 of file fbtime.h.

const FBTime Epsilon [static]

Time constant: Epsilon, the smallest time increment.

Definition at line 265 of file fbtime.h.

const FBTime OneSecond [static]

Time constant: One Second.

Definition at line 268 of file fbtime.h.

const FBTime OneMinute [static]

Time constant: One Minute.

Definition at line 271 of file fbtime.h.

const FBTime OneHour [static]

Time constant: One Hour.

Definition at line 274 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