![]() |
MAK RTIspy API Documentation for HLA 1.3
|
The ConnectionState class stores the current state of a web spy connection If the connection has enabled forwarding, then the state may include multiple component states forwarded through the connection The ConnectionState object may be used to represent the complete state of a connection or the state of a single component of a connection (generally for state updates) More...
Collaboration diagram for DtWebSpyUtils::ConnectionState:Public Types | |
| typedef std::pair < MAKRti::DtTime, MAKRti::DtString > | ComponentStateUpdateTimePair |
| Holds state information about a specific sub-component, and the time of its last update. | |
Public Member Functions | |
| ConnectionState () | |
| Default constructor. | |
| ConnectionState (std::auto_ptr< MAKRti::DtString > currentState, StateComponentType stateType, unsigned long componentId=0) | |
| Ctor takes the current state of the sub-component in a text or HTML representation State type indicates the portion of the sub-component state contained. | |
| ConnectionState (const ConnectionState &orig) | |
| Copy constructor. | |
| ConnectionState & | operator= (const ConnectionState &orig) |
| Assignment operator. | |
| virtual | ~ConnectionState () |
| Dtor. | |
| void | setComponentState (unsigned long componentId, StateComponentType stateType, std::auto_ptr< MAKRti::DtString > currentState, bool overwriteNotAppend=true) |
| Add or Update a component state. | |
| std::vector< unsigned long > | componentIds () const |
| Get a list of contained component IDs. | |
| std::vector< StateComponentType > | stateTypes (unsigned long componentId) const |
| Get a list of state types stored for a specific component ID. | |
| MAKRti::DtTime | timeOfLastComponentUpdate (unsigned long componentId, StateComponentType stateType) const |
| Get the time of the last state update for a specified component. | |
| ComponentStateUpdateTimePair | componentState (unsigned long componentId, StateComponentType stateType) const |
| Get a copy of the component state of the specified type and the time of the last state update. | |
| bool | removeComponent (unsigned long componentId) |
| Remove a complete component state. | |
| std::auto_ptr< MAKRti::DtString > | removeComponentStateType (unsigned long componentId, StateComponentType stateType) |
| Remove one state type from a contained component state. | |
| void | merge (std::auto_ptr< ConnectionState > connState, bool overwriteNotAppend=true) |
| Merge another ConnectionState with this one. | |
Protected Types | |
| typedef std::pair < MAKRti::DtTime, MAKRti::DtString * > | StateUpdateTimePair |
| typedef std::map < StateComponentType, StateUpdateTimePair > | StateTypeToStateMap |
| typedef std::map< unsigned long, StateTypeToStateMap > | ComponentStateMap |
Protected Attributes | |
| MAKRti::DtClock | myClock |
| ComponentStateMap | myComponents |
The ConnectionState class stores the current state of a web spy connection If the connection has enabled forwarding, then the state may include multiple component states forwarded through the connection The ConnectionState object may be used to represent the complete state of a connection or the state of a single component of a connection (generally for state updates)
typedef std::map< unsigned long, StateTypeToStateMap > DtWebSpyUtils::ConnectionState::ComponentStateMap [protected] |
| typedef std::pair< MAKRti::DtTime, MAKRti::DtString > DtWebSpyUtils::ConnectionState::ComponentStateUpdateTimePair |
Holds state information about a specific sub-component, and the time of its last update.
typedef std::map< StateComponentType, StateUpdateTimePair > DtWebSpyUtils::ConnectionState::StateTypeToStateMap [protected] |
typedef std::pair< MAKRti::DtTime, MAKRti::DtString* > DtWebSpyUtils::ConnectionState::StateUpdateTimePair [protected] |
Default constructor.
| DtWebSpyUtils::ConnectionState::ConnectionState | ( | std::auto_ptr< MAKRti::DtString > | currentState, |
| StateComponentType | stateType, | ||
| unsigned long | componentId = 0 |
||
| ) |
Ctor takes the current state of the sub-component in a text or HTML representation State type indicates the portion of the sub-component state contained.
References myClock, myComponents, and stateTypes().
| DtWebSpyUtils::ConnectionState::ConnectionState | ( | const ConnectionState & | orig | ) |
Copy constructor.
| DtWebSpyUtils::ConnectionState::~ConnectionState | ( | ) | [virtual] |
Dtor.
| std::vector< unsigned long > DtWebSpyUtils::ConnectionState::componentIds | ( | ) | const |
Get a list of contained component IDs.
Referenced by merge().
| DtWebSpyUtils::ConnectionState::ComponentStateUpdateTimePair DtWebSpyUtils::ConnectionState::componentState | ( | unsigned long | componentId, |
| StateComponentType | stateType | ||
| ) | const |
Get a copy of the component state of the specified type and the time of the last state update.
| void DtWebSpyUtils::ConnectionState::merge | ( | std::auto_ptr< ConnectionState > | connState, |
| bool | overwriteNotAppend = true |
||
| ) |
Merge another ConnectionState with this one.
Overwrites the components of this state with those from the other (or adds them if they don't already exist). Merge is a destructive operation - the passed connState is destroyed by the operation
References componentIds(), removeComponentStateType(), and stateTypes().
| DtWebSpyUtils::ConnectionState & DtWebSpyUtils::ConnectionState::operator= | ( | const ConnectionState & | orig | ) |
Assignment operator.
References myComponents.
| bool DtWebSpyUtils::ConnectionState::removeComponent | ( | unsigned long | componentId | ) |
Remove a complete component state.
| std::auto_ptr< MAKRti::DtString > DtWebSpyUtils::ConnectionState::removeComponentStateType | ( | unsigned long | componentId, |
| DtWebSpyUtils::StateComponentType | stateType | ||
| ) |
Remove one state type from a contained component state.
Referenced by merge().
| void DtWebSpyUtils::ConnectionState::setComponentState | ( | unsigned long | componentId, |
| StateComponentType | stateType, | ||
| std::auto_ptr< MAKRti::DtString > | currentState, | ||
| bool | overwriteNotAppend = true |
||
| ) |
Add or Update a component state.
| std::vector< DtWebSpyUtils::StateComponentType > DtWebSpyUtils::ConnectionState::stateTypes | ( | unsigned long | componentId | ) | const |
Get a list of state types stored for a specific component ID.
Referenced by ConnectionState(), and merge().
| MAKRti::DtTime DtWebSpyUtils::ConnectionState::timeOfLastComponentUpdate | ( | unsigned long | componentId, |
| StateComponentType | stateType | ||
| ) | const |
Get the time of the last state update for a specified component.
MAKRti::DtClock DtWebSpyUtils::ConnectionState::myClock [protected] |
Referenced by ConnectionState().
Referenced by ConnectionState(), and operator=().