MeVisLab Toolbox Reference
mlParameterInfo.h
Go to the documentation of this file.
1 // Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2 // **InsertLicense** code
3 //------------------------------------------------------------------------------
4 
5 #pragma once
6 
8 #include <mlBase.h>
9 #include <mlModuleInterfaces.h>
10 
11 #include <ThirdPartyWarningsDisable.h>
12 #include <QVariantMap>
13 #include <initializer_list>
14 #include <ThirdPartyWarningsRestore.h>
15 
16 ML_START_NAMESPACE
17 
21 
22 public:
23 
24  typedef QVariantMap DataType;
25  typedef QString KeyType;
26  typedef QVariant ValueType;
27 
30 
31  ParameterInfo() = default;
32 
34  explicit ParameterInfo( const DataType& otherData );
35 
37  ParameterInfo( DataType&& otherData );
38 
40  ParameterInfo( std::initializer_list< std::pair<KeyType, ValueType> > listOfKeyValuePairs );
41 
43  bool operator==( const ParameterInfo& other ) const;
44 
46 };
47 
48 
52 public:
55 
56 private:
58  virtual ParameterInfo::DataType _getParameterInfo() const = 0;
59 
61 };
62 
63 ML_END_NAMESPACE
#define MLParameterInfo_EXPORT
Mixin class to support generic getParameterInfo() object wrapping of supporting classes (e....
ParameterInfo getParameterInfo() const
Get parameter info. Redirects to _getParameterInfo()
Class representing general ML objects that support import/export via strings (setPersistentState() an...
Definition: mlBase.h:62
We would normally co-derive from QVariantMap, but this turned out to cause at least linker problems d...
bool operator==(const ParameterInfo &other) const
For some reason necessary, although trivial.
QVariantMap DataType
DataType data
Use the public data member to interact with the contents, ParameterInfo is just the Base wrapper for ...
ParameterInfo(DataType &&otherData)
Allow to move data on construction.
ParameterInfo()=default
ParameterInfo(std::initializer_list< std::pair< KeyType, ValueType > > listOfKeyValuePairs)
For convenience, allow initialization via { { "key1", value1 }, { "key2", value2 },...
ParameterInfo(const DataType &otherData)
Allow initialization from a data object.
#define ML_ABSTRACT_CLASS_HEADER(className)
Same like ML_ABSTRACT_CLASS_HEADER_EXPORTED with a non existing export symbol.
#define ML_CLASS_HEADER(className)
Same like ML_CLASS_HEADER_EXPORTED with a non existing export symbol.