OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
UpdateManager.h
Go to the documentation of this file.
1#pragma once
2
3#include "OTCore/CoreTypes.h"
4#include "OldTreeIcon.h"
5
6#include "TopoDS_TShape.hxx"
7
8#include <list>
9#include <map>
10
11class EntityGeometry;
12class TopoDS_Shape;
13class EntityCache;
16class ChamferEdges;
17class BlendEdges;
18class ClassFactory;
19
20namespace ot
21{
22 namespace components
23 {
24 class UiComponent;
25 class ModelComponent;
26 }
27}
28
30{
31public:
32 UpdateManager(ot::components::UiComponent *_uiComponent, ot::components::ModelComponent *_modelComponent, EntityCache *_entityCache, PrimitiveManager *_primitiveManager, BooleanOperations *_booleanOperations, ChamferEdges* _chamferEdgesManager, BlendEdges* _blendEdgesManager, ClassFactory *_classFactory);
34
35 void checkParentUpdates(std::list<ot::UID> modifiedEntities);
36 std::list<ot::UID> updateEntities(std::list<ot::UID> &entityIDs, std::list<ot::UID> &entityVersions, std::list<ot::UID> &brepVersions, bool itemsVisible);
37
38 UpdateManager() = delete;
39
40private:
41 std::list<ot::UID> updateParents(std::list<ot::UID> &entityIDs, std::list<ot::UID> &entityInfoIdList, std::list<ot::UID> &entityInfoVersionList, std::list<ot::UID> &brepVersions);
42 void updateSingleParent(ot::UID entityID, ot::UID entityVersion, std::map<ot::UID, ot::UID> &entityVersionMap, std::list<ot::UID> &modifiedEntities);
43 bool updateParent(const std::string& type, EntityGeometry* geomEntity, TopoDS_Shape& shape, std::map<ot::UID, ot::UID>& entityVersionMap, std::map< const opencascade::handle<TopoDS_TShape>, std::string>& resultFaceNames);
44 bool updateBooleanParent(const std::string& type, EntityGeometry* geomEntity, TopoDS_Shape& shape, std::map<ot::UID, ot::UID>& entityVersionMap, std::map< const opencascade::handle<TopoDS_TShape>, std::string>& resultFaceNames);
45 bool updateChamferEdgesParent(const std::string& type, EntityGeometry* geomEntity, TopoDS_Shape& shape, std::map<ot::UID, ot::UID>& entityVersionMap, std::map< const opencascade::handle<TopoDS_TShape>, std::string>& resultFaceNames);
46 bool updateBlendEdgesParent(const std::string& type, EntityGeometry* geomEntity, TopoDS_Shape& shape, std::map<ot::UID, ot::UID>& entityVersionMap, std::map< const opencascade::handle<TopoDS_TShape>, std::string>& resultFaceNames);
47
48 std::list<ot::UID> splitString(std::string value);
49
50 void updateSingleEntity(ot::UID entityID, ot::UID entityVersion, ot::UID brepVersion, bool itemsVisible, std::list<ot::UID> &modifiedEntities);
51
52 PrimitiveManager *getPrimitiveManager(void) { assert(primitiveManager != nullptr); return primitiveManager; }
53 BooleanOperations* getBooleanOperations(void) { assert(booleanOperations != nullptr); return booleanOperations; }
54 ChamferEdges* getChamferEdgesManager(void) { assert(chamferEdgesManager != nullptr); return chamferEdgesManager; }
55 BlendEdges* getBlendEdgesManager(void) { assert(blendEdgesManager != nullptr); return blendEdgesManager; }
56
57 ot::components::UiComponent *uiComponent;
58 ot::components::ModelComponent *modelComponent;
59 EntityCache *entityCache;
60 PrimitiveManager *primitiveManager;
61 BooleanOperations* booleanOperations;
62 ChamferEdges* chamferEdgesManager;
63 BlendEdges* blendEdgesManager;
64 ClassFactory* classFactory;
65};
bsoncxx::types::value value
Definition DocumentManager.h:16
Definition BlendEdges.h:20
Definition BooleanOperations.h:27
Definition ChamferEdges.h:20
Definition EntityCache.h:26
Definition PrimitiveManager.h:22
Definition UpdateManager.h:30
std::list< ot::UID > updateEntities(std::list< ot::UID > &entityIDs, std::list< ot::UID > &entityVersions, std::list< ot::UID > &brepVersions, bool itemsVisible)
Definition UpdateManager.cpp:354
~UpdateManager()
Definition UpdateManager.h:33
void checkParentUpdates(std::list< ot::UID > modifiedEntities)
Definition UpdateManager.cpp:37
UpdateManager()=delete
Definition ModelComponent.h:42
Definition UiComponent.h:31
Definition Connector.h:8
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27