CStateCollectionImpl Class Reference
Implementation
of the CStateCollection interface.
More...
#include <cstatecollection.h>
Inheritance diagram for CStateCollectionImpl:
List of all
members.
Detailed Description
Implementation of the CStateCollection interface.
A state collection contains the "basic" state, usually the model
state, and a list of modified states with their state modifiers.
Any component which has access to a statecollection (usually a
listener), can retrieve a state from the state collection as long
as he mantains the pointer to the properties of the desired state,
which serves as the id of the state in the state collection. When
you add a state modifier, a state with the properties of the
modifier is created ans stored in a map (modifiedStates). Each time
you change the model state you have to call the function
newModelState(), the
collection sets then all modified states as depricated. The
modified state gets recalculated when it is requested for the first
time and the deprecated flag of the state gets cleared.
You can also set the modified states directly without
calculation, this is useful if the modified state is already
available by a logger.
Constructor & Destructor Documentation
|
CStateCollectionImpl::CStateCollectionImpl
|
( |
CStateProperties *
|
modelProperties |
) |
|
|
| |
create state collection with the given state properties as basic
state
|
| |
create state collection with the given state properties as basic
state and the given modifiers already added.
|
| virtual
CStateCollectionImpl::~CStateCollectionImpl
|
( |
|
) |
[virtual] |
|
Member Function Documentation
| virtual void
CStateCollectionImpl::addStateModifier
|
( |
CStateModifier *
|
modifier |
) |
[virtual] |
|
| void
CStateCollectionImpl::calculateModifiedStates
|
( |
|
) |
|
|
| |
calculate all modified states which are
depricated
|
| virtual CState*
CStateCollectionImpl::getState
|
( |
|
) |
[virtual] |
|
| virtual bool
CStateCollectionImpl::isMember
|
( |
CStateProperties *
|
stateModifier |
) |
[virtual] |
|
| |
returns wether the modifier states or the basic state have the
specified properties
Implements CStateCollection.
|
| virtual bool
CStateCollectionImpl::isStateCalculated
|
( |
CStateModifier *
|
|
) |
[virtual] |
|
| |
returns wether the state has already been
calculated
|
| void
CStateCollectionImpl::newModelState
|
( |
|
) |
|
|
| |
marks all modified states as depricated, forces them to
recalculate
|
| virtual void
CStateCollectionImpl::removeStateModifier
|
( |
CStateModifier *
|
modfier |
) |
[virtual] |
|
| virtual void
CStateCollectionImpl::setIsStateCalculated
|
( |
CStateModifier *
|
modifier,
|
|
|
bool |
isCalculated |
|
) |
[virtual] |
|
| |
returns wether the state has already been
calculated
|
| virtual void
CStateCollectionImpl::setResetState
|
( |
bool |
reset |
) |
[virtual] |
|
| void
CStateCollectionImpl::setState
|
( |
CState *
|
state |
) |
|
|
| |
set the state in the state collection with the same properties
like the given state
|
| void
CStateCollectionImpl::setStateCollection
|
( |
CStateCollection *
|
stateCollection |
) |
|
|
Member Data Documentation
| |
basic model state of the collection
|
| |
stores all state modifiers with their
states
|
The documentation for this class was generated from the following
file:
|