OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityParameter.h
Go to the documentation of this file.
1#pragma once
2#pragma warning(disable : 4251)
3
4#include "EntityBase.h"
5#include "OldTreeIcon.h"
6#include <vector>
7#include <array>
8
9class __declspec(dllexport) EntityParameter : public EntityBase
10{
11public:
12 EntityParameter(ot::UID ID, EntityBase *parent, EntityObserver *mdl, ModelState *ms, ClassFactoryHandler* factory, const std::string &owner);
13 virtual ~EntityParameter();
14
15 virtual bool getEntityBox(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax) override;
16
17 void setValue(const std::string &value);
18 std::string getValue(void);
19
20 double getNumericValue(void);
21
22 void createProperties(void);
23
24 virtual void addVisualizationNodes(void) override;
25
26 virtual std::string getClassName(void) { return "EntityParameter"; };
27
28 void addVisualizationItem(bool isHidden);
29
30 virtual entityType getEntityType(void) override { return TOPOLOGY; };
31
32 virtual bool updateFromProperties(void) override;
33
34 void addDependency(ot::UID entityID, const std::string &propertyName, const std::string& propertyGroup);
35 void addDependencyByIndex(ot::UID entityID, const std::string& propertyIndex);
36 void removeDependency(ot::UID entityID, const std::string &propertyName, const std::string& propertyGroup);
37 void removeDependency(ot::UID entityID);
38 bool hasDependency(ot::UID entityID);
39 void removeAllDependencies(void);
40
41 std::map<ot::UID, std::map<std::string, bool>> getDependencies(void) { return dependencyMap; }
42
43private:
44 virtual int getSchemaVersion(void) { return 1; };
45 virtual void AddStorageData(bsoncxx::builder::basic::document &storage);
46 virtual void readSpecificDataFromDataBase(bsoncxx::document::view &doc_view, std::map<ot::UID, EntityBase *> &entityMap) override;
47
48 std::map<ot::UID, std::map<std::string, bool>> dependencyMap;
49};
50
51
52
bsoncxx::types::value value
Definition DocumentManager.h:16
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27