OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityResultTable.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"
7
8#include <memory>
9
10template <class T>
11class __declspec(dllexport) EntityResultTable : public EntityBase
12{
13public:
14 EntityResultTable(ot::UID ID, EntityBase *parent, EntityObserver *mdl, ModelState *ms, ClassFactoryHandler* factory, const std::string &owner);
15 virtual ~EntityResultTable();
16
17 virtual bool getEntityBox(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax) override;
18 virtual bool considerForPropertyFilter(void) override { return true; };
19 virtual bool considerChildrenForPropertyFilter(void) override { return false; };
20 virtual void StoreToDataBase(void) override;
21 virtual void addVisualizationNodes(void) override;
22 void addVisualizationItem(bool isHidden);
23 virtual std::string getClassName(void) { return className; };
24 virtual entityType getEntityType(void) override { return TOPOLOGY; };
25 virtual void createProperties(void);
26 virtual bool updateFromProperties(void) override;
27
28 void deleteTableData(void);
29 void releaseTableData(void);
30 long long getTableDataStorageId(void) { return tableDataStorageId; }
31 long long getTableDataStorageVersion(void) { return tableDataStorageVersion; }
32 std::shared_ptr<EntityResultTableData<T>> getTableData(void);
33 void setTableData(std::shared_ptr<EntityResultTableData<T>> tableData);
34
35 int getMinColumn();
36 int getMinRow();
37 int getMaxColumn();
38 int getMaxRow();
39
40 void setMinColumn(int minCol);
41 void setMinRow(int minRow);
42 void setMaxColumn(int maxCol);
43 void setMaxRow(int maxRow);
44
45protected:
46 virtual void AddStorageData(bsoncxx::builder::basic::document &storage);
47 virtual void readSpecificDataFromDataBase(bsoncxx::document::view &doc_view, std::map<ot::UID, EntityBase *> &entityMap) override;
48 int _minCol = 0;
49 int _minRow = 1;
50
51private:
52 int _maxCol = 50;
53 int _maxRow = 50;
54 virtual int getSchemaVersion(void) { return 1; };
55 void EnsureTableDataLoaded(void);
56 std::string className;
57 std::shared_ptr<EntityResultTableData<T>> tableData = nullptr;
58 long long tableDataStorageId;
59 long long tableDataStorageVersion;
60};
61
62#include "EntityResultTable.hpp"
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27