OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::components::ModelComponent Class Reference

#include "ModelComponent.h"

Inheritance diagram for ot::components::ModelComponent:
ot::ServiceBase ot::ModelServiceAPI

Public Member Functions

 ModelComponent (const std::string &_name, const std::string &_type, const std::string &_url, serviceID_t _id, ApplicationBase *_application)
 
virtual ~ModelComponent ()
 
UID createEntityUID (void)
 
EntityResult1DPlot * addResult1DPlotEntity (const std::string &name, const std::string &title, const std::list< std::pair< UID, std::string > > &curves)
 
EntityResult1DCurve * addResult1DCurveEntity (const std::string &name, const std::vector< double > &xdata, const std::vector< double > &ydataRe, const std::vector< double > &ydataIm, const std::string &xlabel, const std::string &xunit, const std::string &ylabel, const std::string &yunit, int colorID, bool visible)
 
EntityResultText * addResultTextEntity (const std::string &name, const std::string &text)
 
void facetAndStoreGeometryEntity (EntityGeometry *entityGeom, bool forceVisible)
 
void importTableFile (const std::string &itemName)
 
bool sendMessage (bool _queue, JsonDocument &_doc, std::string &_response)
 
void clearNewEntityList (void)
 
void addNewTopologyEntity (UID entityID, UID entityVersion, bool forceVisible)
 
void addNewDataEntity (UID entityID, UID entityVersion, UID entityParentID)
 
void storeNewEntities (const std::string &description, bool askForBranchCreation=true, bool storeModel=true)
 
void loadMaterialInformation ()
 
std::string getCurrentMaterialName (EntityPropertiesEntityList *material)
 
- Public Member Functions inherited from ot::ServiceBase
 ServiceBase ()
 Constructor.
 
 ServiceBase (const std::string &_name, const std::string &_type)
 Constructor.
 
 ServiceBase (const std::string &_name, const std::string &_type, const std::string &_url, serviceID_t _id, const std::string &_siteId=std::string())
 Constructor.
 
 ServiceBase (const ServiceBase &_other)
 Copy constructor.
 
ServiceBaseoperator= (const ServiceBase &_other)
 
bool operator== (const ServiceBase &_other) const
 
bool operator!= (const ServiceBase &_other) const
 
virtual ~ServiceBase ()
 Deconstructor.
 
void setServiceID (serviceID_t _id)
 Set the service ID.
 
void setServiceURL (const std::string &_url)
 Set the service URL.
 
void setServiceName (const std::string &_name)
 Set the service name.
 
void setServiceType (const std::string &_type)
 Set the service type.
 
void setSiteId (const std::string &_id)
 Set the site ID.
 
void setSessionCount (int _count)
 Set the session count.
 
serviceID_t getServiceID (void) const
 Return the service ID.
 
int getServiceIDAsInt (void) const
 Return the service ID as an Integer (The service ID is an Integer stored as a String)
 
int getSessionCount (void) const
 Return the session count.
 
const std::string & getServiceURL (void) const
 Return the service URL.
 
std::string getServiceName (void) const
 Return the service name.
 
std::string getServiceType (void) const
 Return the service type.
 
std::string getSiteId (void) const
 Return the site ID.
 
BasicServiceInformation getBasicServiceInformation (void) const
 
- Public Member Functions inherited from ot::ModelServiceAPI
 ModelServiceAPI (const std::string &thisServiceURL, const std::string &modelServiceURL)
 
 ModelServiceAPI ()
 
std::string getCurrentModelVersion (void)
 
EntityBase * readEntityFromEntityIDandVersion (UID _entityID, UID _version, ClassFactoryHandler &classFactory)
 
UID getCurrentVisualizationModelID (void)
 
std::list< std::string > getListOfFolderItems (const std::string &_folder, bool recursive=false)
 
void getAvailableMeshes (std::string &_meshFolderName, UID &_meshFolderID, std::string &_meshName, UID &_meshID)
 
std::list< UIDgetIDsOfFolderItemsOfType (const std::string &_folder, const std::string &_entityClassName, bool recursive)
 
void enableMessageQueueing (bool flag)
 
void modelChangeOperationCompleted (const std::string &description)
 
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)
 
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)
 
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)
 
void deleteEntitiesFromModel (std::list< std::string > &_entityNameList, bool _saveModel=true)
 
void getEntityInformation (const std::list< UID > &_entities, std::list< EntityInformation > &_entityInfo)
 
void getEntityInformation (const std::list< std::string > &_entities, std::list< EntityInformation > &_entityInfo)
 
bool getEntityInformation (const std::string &_entity, EntityInformation &_entityInfo)
 
void getEntityChildInformation (const std::string &_entity, std::list< EntityInformation > &_entityInfo, bool recursive)
 
void getEntityChildInformation (UID _entity, std::list< EntityInformation > &_entityInfo, bool recursive)
 
void getSelectedEntityInformation (std::list< EntityInformation > &_entityInfo, const std::string &typeFilter="")
 
void addPropertiesToEntities (std::list< UID > &_entityList, const ot::PropertyGridCfg &_configuration)
 
void getEntityProperties (UID _entity, bool _recursive, const std::string &_propertyGroupFilter, std::map< UID, EntityProperties > &_entityProperties)
 
void getEntityProperties (const std::string &entityName, bool _recursive, const std::string &_propertyGroupFilter, std::map< UID, EntityProperties > &_entityProperties)
 
void updatePropertyGrid ()
 
void updateTopologyEntities (ot::UIDList &topologyEntityIDs, ot::UIDList &topologyEntityVersions, const std::string &comment)
 

Private Member Functions

virtual const std::string & getModelServiceURL () override
 
virtual const std::string & getThisServiceURL () override
 

Additional Inherited Members

- Protected Attributes inherited from ot::ServiceBase
serviceID_t m_serviceID
 
std::string m_serviceURL
 Service ID.
 
std::string m_serviceName
 Service URL.
 
std::string m_serviceType
 Service name.
 
std::string m_siteId
 Service type.
 
int m_sessionCount
 Site ID.
 
- Protected Attributes inherited from ot::ModelServiceAPI
std::string m_modelServiceURL
 
std::string m_thisServiceURL
 

Constructor & Destructor Documentation

◆ ModelComponent()

ot::components::ModelComponent::ModelComponent ( const std::string & _name,
const std::string & _type,
const std::string & _url,
serviceID_t _id,
ApplicationBase * _application )

◆ ~ModelComponent()

ot::components::ModelComponent::~ModelComponent ( )
virtual

Member Function Documentation

◆ addNewDataEntity()

void ot::components::ModelComponent::addNewDataEntity ( UID entityID,
UID entityVersion,
UID entityParentID )

◆ addNewTopologyEntity()

void ot::components::ModelComponent::addNewTopologyEntity ( UID entityID,
UID entityVersion,
bool forceVisible )

◆ addResult1DCurveEntity()

EntityResult1DCurve * ot::components::ModelComponent::addResult1DCurveEntity ( const std::string & name,
const std::vector< double > & xdata,
const std::vector< double > & ydataRe,
const std::vector< double > & ydataIm,
const std::string & xlabel,
const std::string & xunit,
const std::string & ylabel,
const std::string & yunit,
int colorID,
bool visible )

◆ addResult1DPlotEntity()

EntityResult1DPlot * ot::components::ModelComponent::addResult1DPlotEntity ( const std::string & name,
const std::string & title,
const std::list< std::pair< UID, std::string > > & curves )

◆ addResultTextEntity()

EntityResultText * ot::components::ModelComponent::addResultTextEntity ( const std::string & name,
const std::string & text )

◆ clearNewEntityList()

void ot::components::ModelComponent::clearNewEntityList ( void )

◆ createEntityUID()

ot::UID ot::components::ModelComponent::createEntityUID ( void )

◆ facetAndStoreGeometryEntity()

void ot::components::ModelComponent::facetAndStoreGeometryEntity ( EntityGeometry * entityGeom,
bool forceVisible )

◆ getCurrentMaterialName()

std::string ot::components::ModelComponent::getCurrentMaterialName ( EntityPropertiesEntityList * material)

◆ getModelServiceURL()

const std::string & ot::components::ModelComponent::getModelServiceURL ( )
overrideprivatevirtual

Reimplemented from ot::ModelServiceAPI.

◆ getThisServiceURL()

const std::string & ot::components::ModelComponent::getThisServiceURL ( )
overrideprivatevirtual

Reimplemented from ot::ModelServiceAPI.

◆ importTableFile()

void ot::components::ModelComponent::importTableFile ( const std::string & itemName)

◆ loadMaterialInformation()

void ot::components::ModelComponent::loadMaterialInformation ( )

◆ sendMessage()

bool ot::components::ModelComponent::sendMessage ( bool _queue,
JsonDocument & _doc,
std::string & _response )

◆ storeNewEntities()

void ot::components::ModelComponent::storeNewEntities ( const std::string & description,
bool askForBranchCreation = true,
bool storeModel = true )

The documentation for this class was generated from the following files: