Time data structure. More...
#include <fbtime.h>
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. | |
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) |
Set time (from separate values) | |
bool | IsExactlyOnFrame (FBTimeMode pTimeMode=kFBTimeModeDefault) |
Is the time falling exactly on a frame? | |
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) |
kLongLong | GetFrame (FBTimeMode pTimeMode=kFBTimeModeDefault) |
Get the frame count. | |
void | SetFrame (kLongLong pFrames, FBTimeMode pTimeMode=kFBTimeModeDefault) |
Set time in frame format. | |
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. | |
enum ETimeFormats |
FBTime | ( | int | pHour, |
int | pMinute, | ||
int | pSecond = 0 , |
||
int | pFrame = 0 , |
||
int | pField = 0 , |
||
FBTimeMode | pTimeMode = kFBTimeModeDefault |
||
) |
Constructor.
pHour | Hour value. |
pMinute | Minute value. |
pSecond | Second value. |
pFrame | Frame value. |
pField | Field value. |
pTimeMode | Time mode(default=kFBTimeModeDefault). |
kLongLong & Get | ( | ) |
Get time value (long)
const kLongLong & Get | ( | ) | const |
Get time value (long)
kLongLong GetFrame | ( | FBTimeMode | pTimeMode = kFBTimeModeDefault | ) |
Get the frame count.
With this function, it is possible to obtain the cumulative and local frame counts.
pTimeMode | Time mode to get the constant (default is kFBTimeModeDefault). |
kLongLong GetMilliSeconds | ( | ) |
Get milliseconds for time.
double GetSecondDouble | ( | ) |
Get seconds as double.
bool GetTime | ( | int & | pHour, |
int & | pMinute, | ||
int & | pSecond, | ||
int & | pFrame, | ||
int & | pField, | ||
int & | pMilliSecond, | ||
FBTimeMode | pTimeMode = kFBTimeModeDefault |
||
) |
Get time (filling separate values)
pHour | Hour value. |
pMinute | Minute value. |
pSecond | Second value. |
pFrame | Frame value. |
pField | Field value. |
pMilliSecond | MilliSecond value. |
pTimeMode | Time mode to get time as. |
FBString GetTimeString | ( | FBTimeMode | pMode = kFBTimeModeDefault , |
ETimeFormats | pFormat = eDefaultFormat |
||
) |
Get time as a string.
pMode | Time mode (default=kFBTimeModeDefault) to use (call FBSystem().GetTransportFps() to the the current UI displayed mode). |
pFormat | Format to use for the returned string(default=FBTime::eDefaultFormat). |
bool IsExactlyOnFrame | ( | FBTimeMode | pTimeMode = kFBTimeModeDefault | ) |
Is the time falling exactly on a frame?
pTimeMode | Time mode to get time as. |
FBTime operator- | ( | double | pConstant | ) |
Overloaded arithmetic operators with constants.
pConstant | Double constant to add to time. |
Overloaded assignment operators with FBTime objects.
pTime | Time to assign with operator. |
FBTime & operator= | ( | double | pConstant | ) |
Overloaded assignment operators with constants.
pConstant | Time to assign with operator. |
bool operator== | ( | const FBTime & | pTime | ) |
Overloaded comparison operators.
pTime | Time to compare with. |
void Set | ( | kLongLong | pTime | ) |
Set time value from a long.
pTime | Time value to set. |
void SetFrame | ( | kLongLong | pFrames, |
FBTimeMode | pTimeMode = kFBTimeModeDefault |
||
) |
Set time in frame format.
pFrames | The number of frames. |
pTimeMode | The time mode identifier which will dictate the extraction algorithm. |
void SetMilliSeconds | ( | kLongLong | pMilliSeconds | ) |
Set milliseconds time.
pMilliSeconds | MilliSeconds value. |
void SetSecondDouble | ( | double | pTime | ) |
Set seconds from double.
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 |
||
) |
Set time (from separate values)
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). |
void SetTimeString | ( | const char * | pTime | ) |
Set time from string.
pTime | String to set time from. |
|
static |
|
static |
|
static |