OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
EntityBinaryData.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
7#include <list>
8#include <vector>
9
10class __declspec(dllexport) EntityBinaryData : public EntityBase
11{
12public:
13 EntityBinaryData(ot::UID ID, EntityBase *parent, EntityObserver *obs, ModelState *ms, ClassFactoryHandler* factory, const std::string &owner);
14 virtual ~EntityBinaryData();
15
16 virtual bool getEntityBox(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax) override;
17
18 virtual std::string getClassName(void) { return "EntityBinaryData"; };
19
20 virtual entityType getEntityType(void) override { return DATA; };
21 virtual void removeChild(EntityBase *child) override;
22
23 void setData(const char *dat, size_t length);
24
25 void clearData(void);
26
27 const std::vector<char>& getData(void) const;
28
29private:
30 virtual int getSchemaVersion(void) { return 1; };
31 virtual void AddStorageData(bsoncxx::builder::basic::document &storage);
32 virtual void readSpecificDataFromDataBase(bsoncxx::document::view &doc_view, std::map<ot::UID, EntityBase *> &entityMap) override;
33
34 std::vector<char> data;
35};
36
37
38
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27