OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ModelServiceAPI.h
Go to the documentation of this file.
1#pragma once
2#include <string>
3#include <list>
4#include <vector>
5
8#include "OTCore/Logger.h"
9#include "EntityBase.h"
10
11namespace ot {
13 public:
14 ModelServiceAPI(const std::string& thisServiceURL, const std::string& modelServiceURL)
15 : m_thisServiceURL(thisServiceURL), m_modelServiceURL(modelServiceURL) {}
16 ModelServiceAPI() : m_thisServiceURL(""), m_modelServiceURL("") {};
17 // Model management
18 std::string getCurrentModelVersion(void);
19 EntityBase* readEntityFromEntityIDandVersion(UID _entityID, UID _version, ClassFactoryHandler& classFactory);
20 UID getCurrentVisualizationModelID(void);
21 std::list<std::string> getListOfFolderItems(const std::string& _folder, bool recursive = false);
22 void getAvailableMeshes(std::string& _meshFolderName, UID& _meshFolderID, std::string& _meshName, UID& _meshID);
23 std::list<UID> getIDsOfFolderItemsOfType(const std::string& _folder, const std::string& _entityClassName, bool recursive);
24 void enableMessageQueueing(bool flag);
25 void modelChangeOperationCompleted(const std::string& description);
26
27 // Entity management
28 void addEntitiesToModel(std::list<UID>& _topologyEntityIDList, std::list<UID>& _topologyEntityVersionList, std::list<bool>& _topologyEntityForceVisible, std::list<UID>& _dataEntityIDList, std::list<UID>& _dataEntityVersionList, std::list<UID>& _dataEntityParentList, const std::string& _changeComment, bool askForBranchCreation = true, bool saveModel = true);
29 void addEntitiesToModel(std::list<UID>&& _topologyEntityIDList, std::list<UID>&& _topologyEntityVersionList, std::list<bool>&& _topologyEntityForceVisible, std::list<UID>&& _dataEntityIDList, std::list<UID>&& _dataEntityVersionList, std::list<UID>&& _dataEntityParentList, const std::string& _changeComment, bool askForBranchCreation = true, bool saveModel = true);
30 void addGeometryOperation(UID _newEntityID, UID _newEntityVersion, std::string _newEntityName, std::list<UID>& _dataEntityIDList, std::list<UID>& _dataEntityVersionList, std::list<UID>& _dataEntityParentList, std::list<std::string>& _childrenList, const std::string& _changeComment);
31 void deleteEntitiesFromModel(std::list<std::string>& _entityNameList, bool _saveModel = true);
32 void getEntityInformation(const std::list<UID>& _entities, std::list<EntityInformation>& _entityInfo);
33 void getEntityInformation(const std::list<std::string>& _entities, std::list<EntityInformation>& _entityInfo);
34 bool getEntityInformation(const std::string& _entity, EntityInformation& _entityInfo);
35 void getEntityChildInformation(const std::string& _entity, std::list<EntityInformation>& _entityInfo, bool recursive);
36 void getEntityChildInformation(UID _entity, std::list<EntityInformation>& _entityInfo, bool recursive);
37 void getSelectedEntityInformation(std::list<EntityInformation>& _entityInfo, const std::string& typeFilter = "");
38 void addPropertiesToEntities(std::list<UID>& _entityList, const ot::PropertyGridCfg& _configuration);
39 void getEntityProperties(UID _entity, bool _recursive, const std::string& _propertyGroupFilter, std::map<UID, EntityProperties>& _entityProperties);
40 void getEntityProperties(const std::string& entityName, bool _recursive, const std::string& _propertyGroupFilter, std::map<UID, EntityProperties>& _entityProperties);
41
42 void updatePropertyGrid();
43 void updateTopologyEntities(ot::UIDList& topologyEntityIDs, ot::UIDList& topologyEntityVersions, const std::string& comment);
44
45
46 protected:
47 std::string m_modelServiceURL;
48 std::string m_thisServiceURL;
49
50 virtual const std::string& getModelServiceURL() { return m_modelServiceURL; }
51 virtual const std::string& getThisServiceURL() { return m_thisServiceURL; }
52 };
53}
#define OT_SERVICEFOUNDATION_API_EXPORT
Definition FoundationAPIExport.h:7
OpenTwin Logging system.
Definition EntityInformation.h:14
Definition ModelServiceAPI.h:12
ModelServiceAPI()
Definition ModelServiceAPI.h:16
std::string m_modelServiceURL
Definition ModelServiceAPI.h:47
std::string m_thisServiceURL
Definition ModelServiceAPI.h:48
virtual const std::string & getModelServiceURL()
Definition ModelServiceAPI.h:50
ModelServiceAPI(const std::string &thisServiceURL, const std::string &modelServiceURL)
Definition ModelServiceAPI.h:14
virtual const std::string & getThisServiceURL()
Definition ModelServiceAPI.h:51
Definition PropertyGridCfg.h:21
Definition Connector.h:8
unsigned long UID
Unique identifier (32 bit unsigned integer)
Definition CoreTypes.h:27
std::list< UID > UIDList
Unique identifier list.
Definition CoreTypes.h:31