Public Member Functions | Private Member Functions | List of all members
ROSEE::YamlWorker Class Reference

#include <YamlWorker.h>

Public Member Functions

std::string createYamlFile (const std::map< std::set< std::string >, ActionPrimitive * > mapOfActions, const std::string actionName, std::string pathFolder)
 Create/overwrite yaml file and emit info on it about each ActionPrimitive inside the given mapOfActions. More...
 
std::string createYamlFile (const Action *action, std::string pathFolder)
 Create/overwrite yaml file and emit info on it about the given ActionComposed action. More...
 
std::string createYamlFile (const ActionGeneric::Ptr, std::string pathFolder)
 
ROSEE::ActionComposed parseYamlComposed (std::string fileWithPath)
 Parse a composed Action. More...
 
ROSEE::ActionGeneric::Ptr parseYamlGeneric (std::string fileWithPath)
 
std::map< std::set< std::string >, ROSEE::ActionPrimitive::PtrparseYamlPrimitive (std::string fileWithPath)
 Parse a yaml file and return the map with all the actions present in the file. For the moment, a actionType argument must be passed to create the right Action object. More...
 
std::map< std::set< std::string >, ROSEE::ActionPrimitive::PtrparseYamlPrimitive (std::string fileWithPath, ROSEE::ActionPrimitive::Type)
 
std::shared_ptr< ROSEE::ActionTimedparseYamlTimed (std::string fileWithPath)
 Parse a timed Action. More...
 
 YamlWorker ()
 Costructor default. More...
 

Private Member Functions

std::string emitYaml (const std::map< std::set< std::string >, ActionPrimitive * >)
 support functions for createYamlFile More...
 
std::string emitYaml (const Action *action)
 support functions for createYamlFile More...
 
std::string emitYaml (const ActionGeneric::Ptr action)
 

Detailed Description

Todo:
PUT this in Parser?

Definition at line 47 of file YamlWorker.h.

Constructor & Destructor Documentation

◆ YamlWorker()

ROSEE::YamlWorker::YamlWorker ( )

Costructor default.

Definition at line 19 of file YamlWorker.cpp.

Member Function Documentation

◆ createYamlFile() [1/3]

std::string ROSEE::YamlWorker::createYamlFile ( const std::map< std::set< std::string >, ActionPrimitive * >  mapOfActions,
const std::string  actionName,
std::string  pathFolder 
)

Create/overwrite yaml file and emit info on it about each ActionPrimitive inside the given mapOfActions.

Parameters
mapOfActionscontainer of actions which infos will be emitted on file
actionNamethe name of the action inside the map (that will have all same name)
Returns
std::string the filename (with the path) of the file created/overwritten

Definition at line 39 of file YamlWorker.cpp.

◆ createYamlFile() [2/3]

std::string ROSEE::YamlWorker::createYamlFile ( const Action action,
std::string  pathFolder 
)

Create/overwrite yaml file and emit info on it about the given ActionComposed action.

Parameters
action[in] pointer to ActionComposed
pathFolderfolder where to store the file. It will be created if does not exist
Returns
std::string the filename (with the path) of the file created/overwritten

Definition at line 21 of file YamlWorker.cpp.

◆ createYamlFile() [3/3]

std::string ROSEE::YamlWorker::createYamlFile ( const ActionGeneric::Ptr  action,
std::string  pathFolder 
)

Definition at line 30 of file YamlWorker.cpp.

◆ emitYaml() [1/3]

std::string ROSEE::YamlWorker::emitYaml ( const std::map< std::set< std::string >, ActionPrimitive * >  mapOfActions)
private

support functions for createYamlFile

Parameters
mapOfActionsthe map where take info from
Returns
std::string a string formatted as yaml file, ready to be put in the file

Definition at line 52 of file YamlWorker.cpp.

◆ emitYaml() [2/3]

std::string ROSEE::YamlWorker::emitYaml ( const Action action)
private

support functions for createYamlFile

Parameters
actionthe action which infos must be emitted
Returns
std::string a string formatted as yaml file, ready to be put in the file

Definition at line 66 of file YamlWorker.cpp.

◆ emitYaml() [3/3]

std::string ROSEE::YamlWorker::emitYaml ( const ActionGeneric::Ptr  action)
private

Definition at line 75 of file YamlWorker.cpp.

◆ parseYamlComposed()

ROSEE::ActionComposed ROSEE::YamlWorker::parseYamlComposed ( std::string  fileWithPath)

Parse a composed Action.

Parameters
fileWithPaththe path of the file to be parsed
Returns
the ActionComposed parsed

Definition at line 218 of file YamlWorker.cpp.

◆ parseYamlGeneric()

ROSEE::ActionGeneric::Ptr ROSEE::YamlWorker::parseYamlGeneric ( std::string  fileWithPath)

Definition at line 238 of file YamlWorker.cpp.

◆ parseYamlPrimitive() [1/2]

std::map< std::set< std::string >, ROSEE::ActionPrimitive::Ptr > ROSEE::YamlWorker::parseYamlPrimitive ( std::string  fileWithPath)

Parse a yaml file and return the map with all the actions present in the file. For the moment, a actionType argument must be passed to create the right Action object.

Parameters
fileWithPaththe path of the file to be parsed

Definition at line 144 of file YamlWorker.cpp.

◆ parseYamlPrimitive() [2/2]

std::map< std::set< std::string >, ROSEE::ActionPrimitive::Ptr > ROSEE::YamlWorker::parseYamlPrimitive ( std::string  fileWithPath,
ROSEE::ActionPrimitive::Type  actionType 
)

Definition at line 84 of file YamlWorker.cpp.

◆ parseYamlTimed()

std::shared_ptr< ROSEE::ActionTimed > ROSEE::YamlWorker::parseYamlTimed ( std::string  fileWithPath)

Parse a timed Action.

Parameters
fileWithPaththe path of the file to be parsed
Returns
the ActionTimed parsed

Definition at line 300 of file YamlWorker.cpp.


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


end-effector
Author(s): Luca Muratore , Davide Torielli , Liana Bertoni
autogenerated on Tue Apr 5 2022 02:57:53