OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
GraphicsItemFactory.h
Go to the documentation of this file.
1
5// ###########################################################################################################################################################################################################################################################################################################################
6
7#pragma once
8
9// OpenTwin header
13
14namespace ot {
15
16 class GraphicsItemCfg;
17
22 public:
23 static GraphicsItemFactory& instance(void);
24
27 static ot::GraphicsItem* create(const ConstJsonObject& _configObject, bool _isRoot = false);
28
34 static ot::GraphicsItem* itemFromConfig(const ot::GraphicsItemCfg* _config, bool _isRoot = false);
35
36 private:
39 };
40
44 template<class T> class GraphicsItemFactoryRegistrar : public FactoryRegistrarTemplate<GraphicsItemFactory, T> {
45 public:
47 };
48
49}
#define OT_WIDGETS_API_EXPORT
Definition OTWidgetsAPIExport.h:12
The FactoryRegistrarTemplate may be used to register a constructor at the factory.
Definition FactoryTemplate.h:76
The FactoryTemplate may be used to quickly create default factories that are only used for item creat...
Definition FactoryTemplate.h:24
The GraphicsItemCfg is the base class for all graphics item configurations.
Definition GraphicsItemCfg.h:33
The GraphicsItemFactory is used to create graphics items from their factory name or from a GraphicsIt...
Definition GraphicsItemFactory.h:21
The GraphicsItemFactoryRegistrar is used to register a GraphicsItem constructor at the GraphicsItemFa...
Definition GraphicsItemFactory.h:44
GraphicsItemFactoryRegistrar(const std::string &_key)
Definition GraphicsItemFactory.h:46
Base class for all OpenTwin GraphicsItems GraphicsItems should be created by the GraphicsFactory and ...
Definition GraphicsItem.h:35
Definition Connector.h:8
rapidjson::GenericObject< true, rapidjson::GenericValue< rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > > > ConstJsonObject
Read only JSON Object.
Definition JSON.h:35