![]() |
VR-Link API Documentation for DIS
|
Instances of DtNetTimeStamp are network representations of a DIS time stamp. More...
Collaboration diagram for DtNetTimeStamp:Public Member Functions | |
| DtNetTimeStamp () | |
| Default constructor - creates an instance with a time of zero and timestamp type of relative. | |
| DtNetTimeStamp (DtTime time, DtTimeStampType type=DtTimeStampRelative) | |
| Creates an instance with the time set to time (specified in seconds) modulo an hour, and the timestamp type set to type. | |
| ~DtNetTimeStamp () | |
| destructor | |
| DtNetTimeStamp (const DtNetTimeStamp &orig) | |
| copy constructor | |
| DtNetTimeStamp & | operator= (const DtNetTimeStamp &orig) |
| assignment operator | |
| operator DtU32 () const | |
| Cast to a DtU32 representing the whole timestamp Useful mainly for backwards compatibility for applications that used to cast DtNetTimeStamp to DtU32 before accessing it. | |
| DtTime | time () const |
| Get the time contained in the timestamp (in seconds). | |
| void | setTime (DtTime time) |
| Get the time contained in the timestamp to time % an hour. | |
| void | setType (DtTimeStampType type) |
| Set/Get timestamp type. | |
| DtTimeStampType | type () const |
Protected Attributes | |
| DtNetU32 | myRep |
Static Protected Attributes | |
| static const double | theHourFracPerHour |
| static const double | theHourPerHourFrac |
Instances of DtNetTimeStamp are network representations of a DIS time stamp.
This class has NO VIRTUAL FUNCTIONS, since it is a DtNetType - whose exact byte layout is relied on by PDU classes, etc.
| DtNetTimeStamp::DtNetTimeStamp | ( | ) |
Default constructor - creates an instance with a time of zero and timestamp type of relative.
| DtNetTimeStamp::DtNetTimeStamp | ( | DtTime | time, |
| DtTimeStampType | type = DtTimeStampRelative |
||
| ) |
Creates an instance with the time set to time (specified in seconds) modulo an hour, and the timestamp type set to type.
| DtNetTimeStamp::~DtNetTimeStamp | ( | ) |
destructor
| DtNetTimeStamp::DtNetTimeStamp | ( | const DtNetTimeStamp & | orig | ) |
copy constructor
| DtNetTimeStamp::operator DtU32 | ( | ) | const |
Cast to a DtU32 representing the whole timestamp Useful mainly for backwards compatibility for applications that used to cast DtNetTimeStamp to DtU32 before accessing it.
| DtNetTimeStamp& DtNetTimeStamp::operator= | ( | const DtNetTimeStamp & | orig | ) |
assignment operator
| void DtNetTimeStamp::setTime | ( | DtTime | time | ) |
Get the time contained in the timestamp to time % an hour.
time is specified in seconds.
| void DtNetTimeStamp::setType | ( | DtTimeStampType | type | ) |
Set/Get timestamp type.
| DtTime DtNetTimeStamp::time | ( | ) | const |
Get the time contained in the timestamp (in seconds).
The value returned will be between 0.0 and 3600.0 seconds.
Referenced by DtPdu::timeStamp().
| DtTimeStampType DtNetTimeStamp::type | ( | ) | const |
Referenced by DtPdu::timeStampType().
|
protected |
|
staticprotected |
|
staticprotected |