OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
PropertyInputFactory.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
11
12// std header
13#include <map>
14#include <string>
15#include <functional>
16
17namespace ot {
18
19 class Property;
20 class PropertyInput;
21
24 public:
25 using PropertyInputConstructor = std::function<PropertyInput* ()>;
26
27 static PropertyInputFactory& instance(void);
28 static PropertyInput* createInput(const std::string& _key);
29 static PropertyInput* createInput(const Property* _config);
30 static bool registerPropertyInput(const std::string& _key, const PropertyInputConstructor& _constructor);
31 private:
34
35 std::map<std::string, PropertyInputConstructor> m_constructors;
36 };
37
38}
This file contains defines that may be used simplyfy class creation.
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
#define OT_WIDGETS_API_EXPORT
Definition OTWidgetsAPIExport.h:12
The Property class is used as a base class for all Properties that can be displayed and modified in t...
Definition Property.h:21
Definition PropertyInputFactory.h:22
std::function< PropertyInput *()> PropertyInputConstructor
Definition PropertyInputFactory.h:25
Definition PropertyInput.h:23
Definition Connector.h:8