MeVisLab Toolbox Reference
ml::ParameterInfo Class Reference

We would normally co-derive from QVariantMap, but this turned out to cause at least linker problems down the line, so we just hold the data. More...

#include <mlParameterInfo.h>

Inheritance diagram for ml::ParameterInfo:
ml::Base

Public Types

typedef QVariantMap DataType
 
typedef QString KeyType
 
typedef QVariant ValueType
 
- Public Types inherited from ml::Base
enum  PersistenceInterface { PersistenceByString , PersistenceByTreeNode , PersistenceByStream }
 This enum describes the different persistence interfaces available. More...
 

Public Member Functions

 ParameterInfo ()=default
 
 ParameterInfo (const DataType &otherData)
 Allow initialization from a data object. More...
 
 ParameterInfo (DataType &&otherData)
 Allow to move data on construction. More...
 
 ParameterInfo (std::initializer_list< std::pair< KeyType, ValueType > > listOfKeyValuePairs)
 For convenience, allow initialization via { { "key1", value1 }, { "key2", value2 }, ... }. More...
 
bool operator== (const ParameterInfo &other) const
 For some reason necessary, although trivial. More...
 
- Public Member Functions inherited from ml::Base
 Base ()
 Constructor. More...
 
virtual ~Base ()
 Destructor. More...
 
virtual BasedeepCopy () const
 Set addStateToTree version number that can be accessed via getAddStateVersion() More...
 
bool isOfAllowedType (const std::vector< const RuntimeType * > &types) const
 Check if this object's type is equal to or derived from one of the types given in the argument. More...
 
virtual bool isRefCountedBase () const
 Returns if the instance is derived from RefCountedBase. More...
 
virtual std::string detailString () const
 Return a string describing this object. More...
 
virtual bool implementsPersistence (PersistenceInterface) const
 Override this method to declare which persistence interfaces are implemented by your derived class. More...
 
virtual std::string persistentState () const
 Returns a string describing the object's internal state. More...
 
virtual void setPersistentState (const std::string &state)
 Restores the object's internal state from a string that had been previously generated using persistentState(). More...
 
virtual void addStateToTree (TreeNode *) const
 Attaches the object state as children of the given parent node. More...
 
virtual void readStateFromTree (TreeNode *)
 Reads the object state from the children of the given parent node. More...
 
virtual void writeTo (AbstractPersistenceOutputStream *) const
 Write the objects state to the data stream object. More...
 
virtual void readFrom (AbstractPersistenceInputStream *, int)
 Read the objects state from the data stream object. More...
 

Public Attributes

DataType data
 Use the public data member to interact with the contents, ParameterInfo is just the Base wrapper for it. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ml::Base
virtual char * getPersistentState () const
 Returns a C string describing the object's internal state. More...
 
virtual void setPersistentState (const char *)
 Restores the object's internal state from a string that had been previously generated using getPersistentState(). More...
 
virtual void clearPersistentState (char *) const
 Disposes a string previously allocated by getPersistentState(). More...
 

Detailed Description

We would normally co-derive from QVariantMap, but this turned out to cause at least linker problems down the line, so we just hold the data.

Definition at line 20 of file mlParameterInfo.h.

Member Typedef Documentation

◆ DataType

typedef QVariantMap ml::ParameterInfo::DataType

Definition at line 24 of file mlParameterInfo.h.

◆ KeyType

typedef QString ml::ParameterInfo::KeyType

Definition at line 25 of file mlParameterInfo.h.

◆ ValueType

typedef QVariant ml::ParameterInfo::ValueType

Definition at line 26 of file mlParameterInfo.h.

Constructor & Destructor Documentation

◆ ParameterInfo() [1/4]

ml::ParameterInfo::ParameterInfo ( )
default

◆ ParameterInfo() [2/4]

ml::ParameterInfo::ParameterInfo ( const DataType otherData)
explicit

Allow initialization from a data object.

◆ ParameterInfo() [3/4]

ml::ParameterInfo::ParameterInfo ( DataType &&  otherData)

Allow to move data on construction.

◆ ParameterInfo() [4/4]

ml::ParameterInfo::ParameterInfo ( std::initializer_list< std::pair< KeyType, ValueType > >  listOfKeyValuePairs)

For convenience, allow initialization via { { "key1", value1 }, { "key2", value2 }, ... }.

Member Function Documentation

◆ operator==()

bool ml::ParameterInfo::operator== ( const ParameterInfo other) const

For some reason necessary, although trivial.

Member Data Documentation

◆ data

DataType ml::ParameterInfo::data

Use the public data member to interact with the contents, ParameterInfo is just the Base wrapper for it.

Definition at line 29 of file mlParameterInfo.h.


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