Medical Imaging Interaction Toolkit
2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
|
#include <berryIMemento.h>
Public Member Functions | |
berryObjectMacro (berry::IMemento) | |
virtual IMemento::Pointer | CreateChild (const QString &type)=0 |
virtual IMemento::Pointer | CreateChild (const QString &type, const QString &id)=0 |
virtual IMemento::Pointer | GetChild (const QString &type) const =0 |
virtual QList< IMemento::Pointer > | GetChildren (const QString &type) const =0 |
virtual bool | GetFloat (const QString &key, double &value) const =0 |
virtual bool | GetInteger (const QString &key, int &value) const =0 |
virtual bool | GetString (const QString &key, QString &value) const =0 |
virtual bool | GetBoolean (const QString &key, bool &value) const =0 |
virtual QString | GetTextData () const =0 |
virtual QList< QString > | GetAttributeKeys () const =0 |
virtual QString | GetType () const =0 |
virtual QString | GetID () const =0 |
virtual void | PutFloat (const QString &key, double value)=0 |
virtual void | PutInteger (const QString &key, int value)=0 |
virtual void | PutMemento (IMemento::Pointer memento)=0 |
virtual void | PutString (const QString &key, const QString &value)=0 |
virtual void | PutBoolean (const QString &key, bool value)=0 |
virtual void | PutTextData (const QString &data)=0 |
~IMemento () override | |
Public Member Functions inherited from berry::Object | |
virtual QString | GetClassName () const |
virtual Reflection::TypeInfo | GetTypeInfo () const |
virtual QList< Reflection::TypeInfo > | GetSuperclasses () const |
virtual void | Delete () |
QDebug | Print (QDebug os, Indent Indent=0) const |
virtual QString | ToString () const |
virtual uint | HashCode () 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 |
virtual bool | operator== (const Object *) const |
Static Public Attributes | |
static const QString | TAG_ID |
Additional Inherited Members | |
Public Types inherited from berry::Object | |
typedef Object | Self |
typedef berry::SmartPointer< Self > | Pointer |
typedef berry::SmartPointer< const Self > | ConstPointer |
typedef berry::WeakPointer< Self > | WeakPtr |
typedef berry::WeakPointer< const Self > | ConstWeakPtr |
Static Public Member Functions inherited from berry::Object | |
static const char * | GetStaticClassName () |
static Reflection::TypeInfo | GetStaticTypeInfo () |
static QList< Reflection::TypeInfo > | GetStaticSuperclasses () |
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 |
Protected Attributes inherited from berry::Object | |
QAtomicInt | m_ReferenceCount |
QMutex | m_ReferenceCountLock |
Interface to a memento used for saving the important state of an object in a form that can be persisted in the file system.
Mementos were designed with the following requirements in mind:
Mementos meet these requirements by providing support for storing a mapping of arbitrary string keys to primitive values, and by allowing mementos to have other mementos as children (arranged into a tree). A robust external storage format based on XML is used.
The key for an attribute may be any alpha numeric value. However, the value of TAG_ID
is reserved for internal use.
This interface is not intended to be implemented or extended by clients.
Definition at line 58 of file berryIMemento.h.
|
override |
berry::IMemento::berryObjectMacro | ( | berry::IMemento | ) |
|
pure virtual |
Creates a new child of this memento with the given type.
The GetChild
and GetChildren
methods are used to retrieve children of a given type.
type | the type |
Implemented in berry::XMLMemento.
|
pure virtual |
Creates a new child of this memento with the given type and id. The id is stored in the child memento (using a special reserved key, TAG_ID
) and can be retrieved using GetID
.
The GetChild
and GetChildren
methods are used to retrieve children of a given type.
type | the type |
id | the child id |
Implemented in berry::XMLMemento.
|
pure virtual |
Returns an array of all the attribute keys of the memento. This will not be null
. If there are no keys, an array of length zero will be returned.
Implemented in berry::XMLMemento.
|
pure virtual |
Gets the boolean value of the given key.
key | the key |
value | the value of the given key |
Implemented in berry::XMLMemento.
|
pure virtual |
Returns the first child with the given type id.
type | the type id |
Implemented in berry::XMLMemento.
|
pure virtual |
Returns all children with the given type id.
type | the type id |
Implemented in berry::XMLMemento.
|
pure virtual |
Gets the floating point value of the given key.
key | the key |
value | the value of the given key |
Implemented in berry::XMLMemento.
|
pure virtual |
Returns the id for this memento.
""
if none Implemented in berry::XMLMemento.
|
pure virtual |
Gets the integer value of the given key.
key | the key |
value | the value of the given key |
Implemented in berry::XMLMemento.
|
pure virtual |
Gets the string value of the given key.
key | the key |
value | the value of the given key |
Implemented in berry::XMLMemento.
|
pure virtual |
Returns the data of the Text node of the memento. Each memento is allowed only one Text node.
null
if the memento has no Text node. Implemented in berry::XMLMemento.
|
pure virtual |
|
pure virtual |
Sets the value of the given key to the given boolean value.
key | the key |
value | the value |
Implemented in berry::XMLMemento.
|
pure virtual |
Sets the value of the given key to the given floating point number.
key | the key |
value | the value |
Implemented in berry::XMLMemento.
|
pure virtual |
Sets the value of the given key to the given integer.
key | the key |
value | the value |
Implemented in berry::XMLMemento.
|
pure virtual |
Copy the attributes and children from memento
to the receiver.
memento | the IMemento to be copied. |
Implemented in berry::XMLMemento.
|
pure virtual |
Sets the value of the given key to the given const QString&.
key | the key |
value | the value |
Implemented in berry::XMLMemento.
|
pure virtual |
Sets the memento's Text node to contain the given data. Creates the Text node if none exists. If a Text node does exist, it's current contents are replaced. Each memento is allowed only one text node.
data | the data to be placed on the Text node |
Implemented in berry::XMLMemento.
|
static |
Special reserved key used to store the memento id (value "IMemento.internal.id"
).
Definition at line 68 of file berryIMemento.h.