OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
GraphicsGroupItemCfg.h
Go to the documentation of this file.
1
5// ###########################################################################################################################################################################################################################################################################################################################
6
7#pragma once
8
9// OpenTwin header
11
12#define OT_FactoryKey_GraphicsGroupItem "OT_GIGroup"
13
14namespace ot {
15
19 public:
21 virtual ~GraphicsGroupItemCfg();
22
24 virtual GraphicsItemCfg* createCopy(void) const override;
25
29 virtual void addToJsonObject(JsonValue& _object, JsonAllocator& _allocator) const override;
30
34 virtual void setFromJsonObject(const ConstJsonObject& _object) override;
35
37 virtual std::string getFactoryKey(void) const override { return std::string(OT_FactoryKey_GraphicsGroupItem); };
38
42 void addItem(ot::GraphicsItemCfg* _item) { m_items.push_back(_item); };
43
45 const std::list<GraphicsItemCfg*>& getItems(void) const { return m_items; };
46
47 private:
48 void memClear(void);
49
50 std::list<GraphicsItemCfg*> m_items;
51 };
52
53}
#define OT_FactoryKey_GraphicsGroupItem
Definition GraphicsGroupItemCfg.h:12
#define OT_GUI_API_EXPORT
Definition OTGuiAPIExport.h:9
Definition GraphicsGroupItemCfg.h:18
void addItem(ot::GraphicsItemCfg *_item)
Will add the provided item to the group. The group takes ownership of the item.
Definition GraphicsGroupItemCfg.h:42
const std::list< GraphicsItemCfg * > & getItems(void) const
Returns a list with all items in the group.
Definition GraphicsGroupItemCfg.h:45
virtual std::string getFactoryKey(void) const override
Returns the key that is used to create an instance of this class in the simple factory.
Definition GraphicsGroupItemCfg.h:37
The GraphicsItemCfg is the base class for all graphics item configurations.
Definition GraphicsItemCfg.h:33
Definition Connector.h:8
rapidjson::Value JsonValue
Writable JSON value.
Definition JSON.h:27
rapidjson::GenericObject< true, rapidjson::GenericValue< rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > > > ConstJsonObject
Read only JSON Object.
Definition JSON.h:35
rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > JsonAllocator
Allocator used for writing to JSON values.
Definition JSON.h:30