#include <PluginXml.h>

Inheritance diagram for PluginXml:
Inheritance graph
Collaboration diagram for PluginXml:
Collaboration graph

Public Types

enum  { NO_ID = -1 }
 
typedef int ExportId
 

Public Member Functions

 PluginXml (std::shared_ptr< Vamp::PluginBase > plugin)
 
virtual ~PluginXml ()
 
void toXml (QTextStream &stream, QString indent="", QString extraAttributes="") const override
 Export plugin settings to XML. More...
 
virtual void setParameters (const QXmlAttributes &)
 Set the parameters and program of a plugin from a set of XML attributes. More...
 
virtual void setParametersFromXml (QString xml)
 Set the parameters and program of a plugin from an XML plugin element as returned by toXml. More...
 
ExportId getExportId () const
 Return the numerical export identifier for this object. 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 encodeConfigurationChars (QString text)
 
static QString decodeConfigurationChars (QString text)
 
static QString encodeEntities (QString)
 
static QString encodeColour (int r, int g, int b)
 

Protected Member Functions

QString stripInvalidParameterNameCharacters (QString) const
 

Protected Attributes

std::shared_ptr< Vamp::PluginBase > m_plugin
 

Detailed Description

Definition at line 26 of file PluginXml.h.

Member Typedef Documentation

typedef int XmlExportable::ExportId
inherited

Definition at line 33 of file XmlExportable.h.

Member Enumeration Documentation

anonymous enum
inherited
Enumerator
NO_ID 

Definition at line 28 of file XmlExportable.h.

Constructor & Destructor Documentation

PluginXml::PluginXml ( std::shared_ptr< Vamp::PluginBase >  plugin)

Definition at line 36 of file PluginXml.cpp.

PluginXml::~PluginXml ( )
virtual

Definition at line 41 of file PluginXml.cpp.

Member Function Documentation

void PluginXml::toXml ( QTextStream &  stream,
QString  indent = "",
QString  extraAttributes = "" 
) const
overridevirtual
void PluginXml::setParameters ( const QXmlAttributes &  attrs)
virtual

Set the parameters and program of a plugin from a set of XML attributes.

This is a partial inverse of toXml.

Definition at line 129 of file PluginXml.cpp.

References CHECK_ATTRIBUTE, decodeConfigurationChars(), m_plugin, and stripInvalidParameterNameCharacters().

Referenced by setParametersFromXml().

void PluginXml::setParametersFromXml ( QString  xml)
virtual

Set the parameters and program of a plugin from an XML plugin element as returned by toXml.

This is a partial inverse of toXml.

Definition at line 195 of file PluginXml.cpp.

References setParameters().

Referenced by ModelTransformerFactory::getConfigurationForTransform(), and TransformFactory::setParametersFromPluginConfigurationXml().

QString PluginXml::encodeConfigurationChars ( QString  text)
static

Definition at line 44 of file PluginXml.cpp.

Referenced by toXml().

QString PluginXml::decodeConfigurationChars ( QString  text)
static

Definition at line 53 of file PluginXml.cpp.

Referenced by setParameters().

QString PluginXml::stripInvalidParameterNameCharacters ( QString  s) const
protected

Definition at line 229 of file PluginXml.cpp.

Referenced by setParameters(), and toXml().

int XmlExportable::getExportId ( ) const
inherited

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 XmlExportable::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::~XmlExportable().

QString XmlExportable::toXmlString ( QString  indent = "",
QString  extraAttributes = "" 
) const
virtualinherited

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 XmlExportable::toXml().

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

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

Definition at line 54 of file XmlExportable.cpp.

Referenced by XmlExportable::~XmlExportable().

Member Data Documentation

std::shared_ptr<Vamp::PluginBase> PluginXml::m_plugin
protected

Definition at line 58 of file PluginXml.h.

Referenced by setParameters(), and toXml().


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