23 throw ctkInvalidArgumentException(
"Cannot add a null state");
26 states.insert(stateId, state);
27 state->AddListener(
this);
33 QHash<QString,State::Pointer>::const_iterator i = states.find(stateId);
34 if (i != states.end())
return *i;
47 throw ctkInvalidArgumentException(
"Cannot remove a null state");
50 QHash<QString,State::Pointer>::iterator i = states.find(stateId);
51 if (i != states.end())
53 (*i)->RemoveListener(
this);
Implements transparent reference counting.
virtual void HandleStateChange(const SmartPointer< State > &state, const SmartPointer< Object > &oldValue)=0
berry::SmartPointer< Self > Pointer
void RemoveState(const QString &stateId) override
QList< QString > GetStateIds() const override
SmartPointer< State > GetState(const QString &stateId) const override
void AddState(const QString &stateId, const SmartPointer< State > &state) override