OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ModelServiceAPI.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
9#include "OTCore/Logger.h"
12#include "EntityBase.h"
13#include "EntityInformation.h"
14
15// std header
16#include <string>
17#include <list>
18#include <vector>
19
20namespace ot {
21
26 public:
27 // Model management
28 static std::string getCurrentModelVersion(void);
29 static UID getCurrentVisualizationModelID(void);
30 static std::list<std::string> getListOfFolderItems(const std::string& _folder, bool recursive = false);
31 static void getAvailableMeshes(std::string& _meshFolderName, UID& _meshFolderID, std::string& _meshName, UID& _meshID);
32 static std::list<UID> getIDsOfFolderItemsOfType(const std::string& _folder, const std::string& _entityClassName, bool recursive);
33 static void enableMessageQueueing(bool flag);
34 static void modelChangeOperationCompleted(const std::string& description);
35
36 // Entity management
37 static 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);
38 static 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);
39 static 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);
40 static void deleteEntitiesFromModel(std::list<std::string>& _entityNameList, bool _saveModel = true);
41 static void getEntityInformation(const std::list<UID>& _entities, std::list<EntityInformation>& _entityInfo);
42 static void getEntityInformation(const std::list<std::string>& _entities, std::list<EntityInformation>& _entityInfo);
43 static bool getEntityInformation(const std::string& _entity, EntityInformation& _entityInfo);
44 static void getEntityChildInformation(const std::string& _entity, std::list<EntityInformation>& _entityInfo, bool recursive);
45 static void getEntityChildInformation(UID _entity, std::list<EntityInformation>& _entityInfo, bool recursive);
46 static void getSelectedEntityInformation(std::list<EntityInformation>& _entityInfo, const std::string& typeFilter = "");
47 static void addPropertiesToEntities(std::list<UID>& _entityList, const ot::PropertyGridCfg& _configuration);
48 static void getEntityProperties(UID _entity, bool _recursive, const std::string& _propertyGroupFilter, std::map<UID, EntityProperties>& _entityProperties);
49 static void getEntityProperties(const std::string& entityName, bool _recursive, const std::string& _propertyGroupFilter, std::map<UID, EntityProperties>& _entityProperties);
50 static void updateTopologyEntities(ot::UIDList& topologyEntityIDs, ot::UIDList& topologyEntityVersions, const std::string& comment);
51
52 static void updatePropertyGrid();
53
54 };
55}
OpenTwin Logging system.
#define OT_DECL_NODEFAULT(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:22
#define OT_DECL_NOMOVE(___class)
Removes the default move constructor and move operator.
Definition OTClassHelper.h:18
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
#define OT_MODELAPI_API_EXPORT
Definition OTModelAPIExport.h:11
Definition ModelServiceAPI.h:22
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