Medical Imaging Interaction Toolkit
2023.12.00
Medical Imaging Interaction Toolkit
|
#include <berryXMLMemento.h>
Public Types | |
typedef std::ostream | XMLByteOutputStream |
typedef std::istream | XMLByteInputStream |
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 |
Public Member Functions | |
berryObjectMacro (XMLMemento) | |
XMLMemento (Poco::XML::Document *document, Poco::XML::Element *elem) | |
~XMLMemento () override | |
IMemento::Pointer | CopyChild (IMemento::Pointer child) |
IMemento::Pointer | CreateChild (const QString &type) override |
IMemento::Pointer | CreateChild (const QString &type, const QString &id) override |
IMemento::Pointer | GetChild (const QString &type) const override |
QList< IMemento::Pointer > | GetChildren (const QString &type) const override |
QString | GetType () const override |
QString | GetID () const override |
bool | GetInteger (const QString &key, int &value) const override |
bool | GetFloat (const QString &key, double &value) const override |
bool | GetString (const QString &key, QString &value) const override |
bool | GetBoolean (const QString &key, bool &value) const override |
QString | GetTextData () const override |
QList< QString > | GetAttributeKeys () const override |
void | PutFloat (const QString &key, double value) override |
void | PutInteger (const QString &key, int value) override |
void | PutMemento (IMemento::Pointer memento) override |
void | PutString (const QString &key, const QString &value) override |
void | PutBoolean (const QString &key, bool value) override |
void | PutTextData (const QString &data) override |
void | Save (XMLByteOutputStream &writer) |
virtual Poco::XML::Element * | GetElement () const |
Public Member Functions inherited from berry::IMemento | |
berryObjectMacro (berry::IMemento) | |
~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 Member Functions | |
static XMLMemento::Pointer | CreateReadRoot (berry::XMLMemento::XMLByteInputStream &reader) |
static XMLMemento::Pointer | CreateReadRoot (berry::XMLMemento::XMLByteInputStream &reader, const QString &baseDir) |
static XMLMemento::Pointer | CreateWriteRoot (const QString &type) |
Static Public Member Functions inherited from berry::Object | |
static const char * | GetStaticClassName () |
static Reflection::TypeInfo | GetStaticTypeInfo () |
static QList< Reflection::TypeInfo > | GetStaticSuperclasses () |
Additional Inherited Members | |
Static Public Attributes inherited from berry::IMemento | |
static const QString | TAG_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 |
Protected Attributes inherited from berry::Object | |
QAtomicInt | m_ReferenceCount |
QMutex | m_ReferenceCountLock |
This class represents the default implementation of the IMemento
interface.
This class is not intended to be extended by clients.
Definition at line 37 of file berryXMLMemento.h.
typedef std::istream berry::XMLMemento::XMLByteInputStream |
Defines a std::istream as XML input stream
Definition at line 51 of file berryXMLMemento.h.
typedef std::ostream berry::XMLMemento::XMLByteOutputStream |
Defines a std::ostream as XML output stream
Definition at line 46 of file berryXMLMemento.h.
berry::XMLMemento::XMLMemento | ( | Poco::XML::Document * | document, |
Poco::XML::Element * | elem | ||
) |
Creates a memento for the specified document and element.
Clients should use CreateReadRoot
and CreateWriteRoot
to create the initial memento on a document.
document | the document for the memento |
elem | the element node for the memento |
|
override |
berry::XMLMemento::berryObjectMacro | ( | XMLMemento | ) |
IMemento::Pointer berry::XMLMemento::CopyChild | ( | IMemento::Pointer | child | ) |
Copies another Memento into this memento
child | the new child memento |
|
overridevirtual |
Creates a new child of this memento with the given type
type | the type |
Implements berry::IMemento.
|
overridevirtual |
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 |
Implements berry::IMemento.
|
static |
Creates a Document
from the Reader
and returns a memento on the first Element
for reading the document.
reader | the Reader used to create the memento's document |
Element
for reading the document WorkbenchException | if IO problems, invalid format, or no element. |
|
static |
Creates a Document
from the Reader
and returns a memento on the first Element
for reading the document.
reader | the Reader used to create the memento's document |
baseDir | the directory used to resolve relative file names in the XML document. This directory must exist and include the trailing separator. The directory format, including the separators, must be valid for the platform. Can be null if not needed. |
Element
for reading the document WorkbenchException | if IO problems, invalid format, or no element. |
|
static |
Returns a root memento for writing a document.
type | the element node type to create on the document |
|
overridevirtual |
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.
Implements berry::IMemento.
|
overridevirtual |
Implements berry::IMemento.
|
overridevirtual |
Returns the first child with the given type id.
type | the type id |
Implements berry::IMemento.
|
overridevirtual |
Returns all children with the given type id.
type | the type id |
Implements berry::IMemento.
|
virtual |
Returns the element of the memento
|
overridevirtual |
Implements berry::IMemento.
|
overridevirtual |
Returns the ID of this memento
Implements berry::IMemento.
|
overridevirtual |
Implements berry::IMemento.
|
overridevirtual |
Implements berry::IMemento.
|
overridevirtual |
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. Implements berry::IMemento.
|
overridevirtual |
Returns the Type of this memento
Implements berry::IMemento.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
void berry::XMLMemento::Save | ( | XMLByteOutputStream & | writer | ) |
Saves this memento's document current values to the specified writer.
writer | the writer used to save the memento's document |
IOException | if there is a problem serializing the document to the stream. |