Package Class Reference

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

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

Public Member Functions

void addApplication (ApplicationPtr application)
 Adds an Application to this package. More...
 
void addScenario (ScenarioPtr scenario)
 Adds a Scenario to this package. More...
 
ApplicationPtr getApplicationByName (std::string name)
 Returns an Application contained in this package that has the given name. More...
 
ApplicationVectorPtr getApplications ()
 
std::string getName ()
 
std::string getPath ()
 
ScenarioPtr getScenarioByName (std::string name)
 Returns a Scenario contained in this package that has the given name. More...
 
std::string getScenarioPath ()
 
ScenarioVectorPtr getScenarios ()
 
bool isScenarioPathWritable ()
 
 Package (const Package &other)
 Constructor that creates a light copy of the given Package, only name and path get copied. More...
 
 Package (std::string name, std::string path, std::string scenarioPath)
 Constructor that sets the name and the path of the package. More...
 
void removeScenario (ScenarioPtr scenario)
 

Detailed Description

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

Definition at line 45 of file Package.h.

Constructor & Destructor Documentation

◆ Package() [1/2]

Package ( std::string  name,
std::string  path,
std::string  scenarioPath 
)

Constructor that sets the name and the path of the package.

Parameters
namename of the package
pathpath to the root of the package

Definition at line 35 of file Package.cpp.

◆ Package() [2/2]

Package ( const Package other)

Constructor that creates a light copy of the given Package, only name and path get copied.

Parameters
otherPackage to copy

Definition at line 44 of file Package.cpp.

Member Function Documentation

◆ addApplication()

void addApplication ( Data_Structure::ApplicationPtr  application)

Adds an Application to this package.

Parameters
applicationApplication to be added

Definition at line 121 of file Package.cpp.

◆ addScenario()

void addScenario ( Data_Structure::ScenarioPtr  scenario)

Adds a Scenario to this package.

Parameters
scenarioScenario to be added

Definition at line 104 of file Package.cpp.

◆ getApplicationByName()

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

Returns an Application contained in this package that has the given name.

Parameters
namename of the application
Returns
an Application with the given name. Returns a null pointer, if no Application with that name exists.

Definition at line 138 of file Package.cpp.

◆ getApplications()

Returns
applications of this package

Definition at line 99 of file Package.cpp.

◆ getName()

std::string getName ( )
Returns
name of this package

Definition at line 48 of file Package.cpp.

◆ getPath()

std::string getPath ( )
Returns
path of this package (.../PackageName/build/config)

Definition at line 53 of file Package.cpp.

◆ getScenarioByName()

Data_Structure::ScenarioPtr getScenarioByName ( std::string  name)

Returns a Scenario contained in this package that has the given name.

Parameters
namename of the scenario
Returns
a Scenario with the given name. Returns a null pointer if no scenario with that name exists.

Definition at line 126 of file Package.cpp.

◆ getScenarioPath()

std::string getScenarioPath ( )

Definition at line 58 of file Package.cpp.

◆ getScenarios()

Returns
scenarios of this package

Definition at line 94 of file Package.cpp.

◆ isScenarioPathWritable()

bool isScenarioPathWritable ( )

Definition at line 63 of file Package.cpp.

◆ removeScenario()

void removeScenario ( Data_Structure::ScenarioPtr  scenario)

Definition at line 109 of file Package.cpp.


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