Scenario Class Reference

Class containing data about a scenario and its applications. Provides methods to get and set the data contained in the scenario. It is only representative and doesn't actually manage the scenario. More...

#include <ArmarXCore/util/ScenarioManagerCommon/data_structure/Scenario.h>

+ Inheritance diagram for Scenario:

Public Member Functions

void addApplication (ApplicationInstancePtr application)
 Adds an Application to this scenario. More...
 
void addIceEnviromentVariable (std::string name, std::string variable)
 
bool allApplicationsFound ()
 
void clearIceEnviromentVariable (std::string name)
 
std::vector< std::string > getAllDeploymendNodeNames ()
 
ApplicationInstancePtr getApplicationByName (std::string name)
 
ApplicationInstanceVectorPtr getApplications ()
 
std::string getCreationTime ()
 SCENARIO_H. More...
 
std::string getFolder ()
 
armarx::PropertyDefinitionsPtr getGlobalConfig ()
 
std::string getGlobalConfigName ()
 
std::string getGlobalConfigPath ()
 
IceEnvMap getIceEnviromentVariables ()
 
std::string getLastChangedTime ()
 
std::string getName ()
 
std::string getNodeName () const
 
PackagePtr getPackage ()
 
std::string getPath ()
 
ScenarioDeploymentType getScenarioDeploymentType ()
 
std::string getStatus ()
 
bool getStatusWriteBlock ()
 
std::string getSubfolder ()
 
bool isGlobalConfigFileexistent ()
 
bool isGlobalConfigWritable ()
 
bool isReadOnly ()
 
bool isScenarioFileWriteable ()
 
void makeLocalGlobalConfig ()
 
void reloadAppInstances ()
 
void reloadGlobalConf ()
 
void removeApplication (ApplicationInstancePtr application)
 Removes an Application from this scenario. More...
 
void save ()
 
 Scenario (std::string name, std::string creationTime, std::string lastChangedTime, PackagePtr package, std::string globalConfigName="./config/global.cfg", std::string subfolder="", ScenarioDeploymentType deploymentType=ScenarioDeploymentType::Remote, IceEnvMap iceEnvVariables=IceEnvMap())
 Constructor that sets some base information about the scenario. More...
 
void setGlobalConfigName (std::string name)
 
void setLastChangedTime (std::string time)
 Sets the last-changed-time to now. More...
 
void setName (std::string name)
 
void setNodeName (const std::string &value)
 
void setScenarioDeploymentType (ScenarioDeploymentType type)
 
void setStatusWriteBlock (bool state)
 
void updateApplication (ApplicationInstancePtr application)
 
void updateApplicationByName (std::string name)
 

Detailed Description

Class containing data about a scenario and its applications. Provides methods to get and set the data contained in the scenario. It is only representative and doesn't actually manage the scenario.

Definition at line 64 of file Scenario.h.

Constructor & Destructor Documentation

◆ Scenario()

Scenario ( std::string  name,
std::string  creationTime,
std::string  lastChangedTime,
PackagePtr  package,
std::string  globalConfigName = "./config/global.cfg",
std::string  subfolder = "",
ScenarioDeploymentType  deploymentType = ScenarioDeploymentType::Remote,
IceEnvMap  iceEnvVariables = IceEnvMap() 
)

Constructor that sets some base information about the scenario.

Parameters
namename of the scenario
creationTimewhen this scenario was first created
lastChangedTimewhen this scenario was last changed. Should usually be the same as the time of creation, except when creating an exact copy of another Scenario.
pathpath to the root of this scenario

Definition at line 37 of file Scenario.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ addApplication()

void addApplication ( Data_Structure::ApplicationInstancePtr  application)

Adds an Application to this scenario.

Parameters
applicationApplication to be added to this scenario

Definition at line 224 of file Scenario.cpp.

◆ addIceEnviromentVariable()

void addIceEnviromentVariable ( std::string  name,
std::string  variable 
)

Definition at line 388 of file Scenario.cpp.

◆ allApplicationsFound()

bool allApplicationsFound ( )

Definition at line 375 of file Scenario.cpp.

◆ clearIceEnviromentVariable()

void clearIceEnviromentVariable ( std::string  name)

Definition at line 393 of file Scenario.cpp.

◆ getAllDeploymendNodeNames()

std::vector< std::string > getAllDeploymendNodeNames ( )

Definition at line 365 of file Scenario.cpp.

◆ getApplicationByName()

Data_Structure::ApplicationInstancePtr getApplicationByName ( std::string  name)

Definition at line 211 of file Scenario.cpp.

◆ getApplications()

Returns
all applications this scenario contains

Definition at line 206 of file Scenario.cpp.

◆ getCreationTime()

std::string getCreationTime ( )

SCENARIO_H.

Returns
time this scenario was created.

Definition at line 67 of file Scenario.cpp.

◆ getFolder()

std::string getFolder ( )
Returns
path to the root of this scenario

Definition at line 103 of file Scenario.cpp.

◆ getGlobalConfig()

armarx::PropertyDefinitionsPtr getGlobalConfig ( )

Definition at line 300 of file Scenario.cpp.

◆ getGlobalConfigName()

std::string getGlobalConfigName ( )

Definition at line 77 of file Scenario.cpp.

◆ getGlobalConfigPath()

std::string getGlobalConfigPath ( )

Definition at line 305 of file Scenario.cpp.

◆ getIceEnviromentVariables()

std::map< std::string, std::string > getIceEnviromentVariables ( )

Definition at line 398 of file Scenario.cpp.

◆ getLastChangedTime()

std::string getLastChangedTime ( )
Returns
time this scenario was last changed

Definition at line 72 of file Scenario.cpp.

◆ getName()

std::string getName ( )

Definition at line 57 of file Scenario.cpp.

◆ getNodeName()

std::string getNodeName ( ) const

Definition at line 403 of file Scenario.cpp.

◆ getPackage()

Definition at line 128 of file Scenario.cpp.

◆ getPath()

std::string getPath ( )
Returns
the path to the scx file

Definition at line 87 of file Scenario.cpp.

◆ getScenarioDeploymentType()

Data_Structure::ScenarioDeploymentType getScenarioDeploymentType ( )

Definition at line 355 of file Scenario.cpp.

◆ getStatus()

std::string getStatus ( )
Returns
status of this scenario

Definition at line 133 of file Scenario.cpp.

◆ getStatusWriteBlock()

bool getStatusWriteBlock ( )

Definition at line 335 of file Scenario.cpp.

◆ getSubfolder()

std::string getSubfolder ( )
Returns
subfolder

Definition at line 82 of file Scenario.cpp.

◆ isGlobalConfigFileexistent()

bool isGlobalConfigFileexistent ( )

Definition at line 330 of file Scenario.cpp.

◆ isGlobalConfigWritable()

bool isGlobalConfigWritable ( )

Definition at line 321 of file Scenario.cpp.

◆ isReadOnly()

bool isReadOnly ( )

Definition at line 279 of file Scenario.cpp.

◆ isScenarioFileWriteable()

bool isScenarioFileWriteable ( )

Definition at line 112 of file Scenario.cpp.

+ Here is the call graph for this function:

◆ makeLocalGlobalConfig()

void makeLocalGlobalConfig ( )

Definition at line 260 of file Scenario.cpp.

+ Here is the call graph for this function:

◆ reloadAppInstances()

void reloadAppInstances ( )

Definition at line 284 of file Scenario.cpp.

◆ reloadGlobalConf()

void reloadGlobalConf ( )

Definition at line 292 of file Scenario.cpp.

◆ removeApplication()

void removeApplication ( Data_Structure::ApplicationInstancePtr  application)

Removes an Application from this scenario.

Parameters
applicationapplication to be removed

Definition at line 229 of file Scenario.cpp.

◆ save()

void save ( )

Definition at line 254 of file Scenario.cpp.

◆ setGlobalConfigName()

void setGlobalConfigName ( std::string  name)

Definition at line 201 of file Scenario.cpp.

◆ setLastChangedTime()

void setLastChangedTime ( std::string  time)

Sets the last-changed-time to now.

Definition at line 196 of file Scenario.cpp.

◆ setName()

void setName ( std::string  name)

Definition at line 62 of file Scenario.cpp.

◆ setNodeName()

void setNodeName ( const std::string &  value)

Definition at line 408 of file Scenario.cpp.

+ Here is the call graph for this function:

◆ setScenarioDeploymentType()

void setScenarioDeploymentType ( ScenarioDeploymentType  type)

Definition at line 360 of file Scenario.cpp.

◆ setStatusWriteBlock()

void setStatusWriteBlock ( bool  state)

Definition at line 347 of file Scenario.cpp.

◆ updateApplication()

void updateApplication ( Data_Structure::ApplicationInstancePtr  application)

Definition at line 248 of file Scenario.cpp.

◆ updateApplicationByName()

void updateApplicationByName ( std::string  name)

Definition at line 242 of file Scenario.cpp.


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