#include <XmlExportable.h>

Inheritance diagram for XmlExportable:
Inheritance graph

Public Types

enum  { NO_ID = -1 }
 
typedef int ExportId
 

Public Member Functions

 XmlExportable ()
 
virtual ~XmlExportable ()
 
ExportId getExportId () const
 Return the numerical export identifier for this object. More...
 
virtual void toXml (QTextStream &stream, QString indent="", QString extraAttributes="") const =0
 Stream this exportable object out to XML on a text stream. More...
 
virtual QString toXmlString (QString indent="", QString extraAttributes="") const
 Convert this exportable object to XML in a string. More...
 

Static Public Member Functions

static QString encodeEntities (QString)
 
static QString encodeColour (int r, int g, int b)
 

Private Attributes

int m_exportId
 

Detailed Description

Definition at line 25 of file XmlExportable.h.

Member Typedef Documentation

Definition at line 33 of file XmlExportable.h.

Member Enumeration Documentation

anonymous enum
Enumerator
NO_ID 

Definition at line 28 of file XmlExportable.h.

Constructor & Destructor Documentation

XmlExportable::XmlExportable ( )
inline

Definition at line 35 of file XmlExportable.h.

virtual XmlExportable::~XmlExportable ( )
inlinevirtual

Definition at line 36 of file XmlExportable.h.

References encodeColour(), encodeEntities(), getExportId(), toXml(), and toXmlString().

Member Function Documentation

int XmlExportable::getExportId ( ) const

Return the numerical export identifier for this object.

It's allocated the first time this is called, so objects on which this is never called do not get allocated one.

Definition at line 71 of file XmlExportable.cpp.

References m_exportId, and mutex.

Referenced by EditableDenseThreeDimensionalModel::toXml(), BasicCompressedDenseThreeDimensionalModel::toXml(), EventSeries::toXml(), ImageModel::toXml(), TextModel::toXml(), Model::toXml(), SparseOneDimensionalModel::toXml(), RegionModel::toXml(), BoxModel::toXml(), SparseTimeValueModel::toXml(), NoteModel::toXml(), and ~XmlExportable().

virtual void XmlExportable::toXml ( QTextStream &  stream,
QString  indent = "",
QString  extraAttributes = "" 
) const
pure virtual
QString XmlExportable::toXmlString ( QString  indent = "",
QString  extraAttributes = "" 
) const
virtual

Convert this exportable object to XML in a string.

The default implementation calls toXml and returns the result as a string. Do not override this unless you really know what you're doing.

Definition at line 25 of file XmlExportable.cpp.

References toXml().

Referenced by ModelTransformerFactory::getConfigurationForTransform(), RDFTransformFactoryImpl::getTransforms(), and ~XmlExportable().

QString XmlExportable::encodeColour ( int  r,
int  g,
int  b 
)
static

Definition at line 54 of file XmlExportable.cpp.

Referenced by ~XmlExportable().

Member Data Documentation

int XmlExportable::m_exportId
mutableprivate

Definition at line 65 of file XmlExportable.h.

Referenced by getExportId().


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