Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
berry::NamedHandleObjectWithState Class Reference

#include <berryNamedHandleObjectWithState.h>

Inheritance diagram for berry::NamedHandleObjectWithState:
Collaboration diagram for berry::NamedHandleObjectWithState:

Public Member Functions

 berryObjectMacro (berry::NamedHandleObjectWithState)
 
void AddState (const QString &stateId, const SmartPointer< State > &state) override
 
QString GetDescription () const override
 
QString GetName () const override
 
SmartPointer< StateGetState (const QString &stateId) const override
 
QList< QString > GetStateIds () const override
 
void RemoveState (const QString &id) override
 
- Public Member Functions inherited from berry::NamedHandleObject
 berryObjectMacro (NamedHandleObject)
 
- Public Member Functions inherited from berry::HandleObject
 berryObjectMacro (HandleObject)
 
bool operator== (const Object *object) const override
 
QString GetId () const
 
uint HashCode () const override
 
bool IsDefined () const
 
virtual void Undefine ()=0
 
- Public Member Functions inherited from berry::Object
virtual QString GetClassName () const
 
virtual Reflection::TypeInfo GetTypeInfo () const
 
virtual QList< Reflection::TypeInfoGetSuperclasses () const
 
virtual void Delete ()
 
QDebug Print (QDebug os, Indent Indent=0) const
 
virtual QString ToString () const
 
virtual bool operator< (const Object *) const
 
void Register () const
 
void UnRegister (bool del=true) const
 
int GetReferenceCount () const
 
void SetReferenceCount (int)
 
void AddDestroyListener (const MessageAbstractDelegate<> &delegate) const
 
void RemoveDestroyListener (const MessageAbstractDelegate<> &delegate) const
 
- Public Member Functions inherited from berry::IObjectWithState
 berryObjectMacro (berry::IObjectWithState)
 

Protected Member Functions

 NamedHandleObjectWithState (const QString &id)
 
- Protected Member Functions inherited from berry::NamedHandleObject
 NamedHandleObject (const QString &id)
 
- Protected Member Functions inherited from berry::HandleObject
 HandleObject (const QString &id)
 
- Protected Member Functions inherited from berry::Object
 Object ()
 
virtual ~Object ()
 
virtual QDebug PrintSelf (QDebug os, Indent indent) const
 
virtual QDebug PrintHeader (QDebug os, Indent indent) const
 
virtual QDebug PrintTrailer (QDebug os, Indent indent) const
 

Additional Inherited Members

- Public Types inherited from berry::Object
typedef Object Self
 
typedef berry::SmartPointer< SelfPointer
 
typedef berry::SmartPointer< const SelfConstPointer
 
typedef berry::WeakPointer< SelfWeakPtr
 
typedef berry::WeakPointer< const SelfConstWeakPtr
 
- Static Public Member Functions inherited from berry::Object
static const char * GetStaticClassName ()
 
static Reflection::TypeInfo GetStaticTypeInfo ()
 
static QList< Reflection::TypeInfoGetStaticSuperclasses ()
 
- Protected Attributes inherited from berry::NamedHandleObject
QString description
 
QString name
 
- Protected Attributes inherited from berry::HandleObject
bool defined
 
const QString id
 
QString str
 
- Protected Attributes inherited from berry::Object
QAtomicInt m_ReferenceCount
 
QMutex m_ReferenceCountLock
 

Detailed Description

A named handle object that can carry state with it. This state can be used to override the name or description.

Clients may neither instantiate nor extend this class.

Definition at line 32 of file berryNamedHandleObjectWithState.h.

Constructor & Destructor Documentation

◆ NamedHandleObjectWithState()

berry::NamedHandleObjectWithState::NamedHandleObjectWithState ( const QString &  id)
protected

Constructs a new instance of NamedHandleObjectWithState.

Parameters
idThe identifier for this handle; must not be empty.

Member Function Documentation

◆ AddState()

void berry::NamedHandleObjectWithState::AddState ( const QString &  id,
const SmartPointer< State > &  state 
)
overridevirtual

Adds state to this object.

Parameters
idThe identifier indicating the type of state being added; must not be null.
stateThe new state to add to this object; must not be null.

Implements berry::IObjectWithState.

◆ berryObjectMacro()

berry::NamedHandleObjectWithState::berryObjectMacro ( berry::NamedHandleObjectWithState  )

◆ GetDescription()

QString berry::NamedHandleObjectWithState::GetDescription ( ) const
overridevirtual

Returns the description for this handle.

Returns
The description; may be null if there is no description.
Exceptions
NotDefinedExceptionIf the handle is not currently defined.

Reimplemented from berry::NamedHandleObject.

◆ GetName()

QString berry::NamedHandleObjectWithState::GetName ( ) const
overridevirtual

Returns the name for this handle.

Returns
The name for this handle; never null.
Exceptions
NotDefinedExceptionIf the handle is not currently defined.

Reimplemented from berry::NamedHandleObject.

◆ GetState()

SmartPointer<State> berry::NamedHandleObjectWithState::GetState ( const QString &  stateId) const
overridevirtual

Gets the state with the given id.

Parameters
stateIdThe identifier of the state to retrieve; must not be null.
Returns
The state; may be null if there is no state with the given id.

Implements berry::IObjectWithState.

◆ GetStateIds()

QList<QString> berry::NamedHandleObjectWithState::GetStateIds ( ) const
overridevirtual

Gets the identifiers for all of the state associated with this object.

Returns
All of the state identifiers; may be empty, but never null.

Implements berry::IObjectWithState.

◆ RemoveState()

void berry::NamedHandleObjectWithState::RemoveState ( const QString &  stateId)
overridevirtual

Removes state from this object.

Parameters
stateIdThe id of the state to remove from this object; must not be null.

Implements berry::IObjectWithState.


The documentation for this class was generated from the following file: