Hormodular 1.0
Locomotion gait discovery by using digital hormones on modular robots
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
hormodular::ConfigParser Class Reference

Parses a XML configuration file and stores the configuration options. More...

#include <ConfigParser.h>

List of all members.

Public Member Functions

 ConfigParser ()
int parse (const std::string &filepath)
 Parses the specified file.
std::string getRobotName ()
std::string getSimulationFile ()
std::string getGaitTableFolder ()
std::string getFrequencyTableFile ()
std::string getSerialPort ()
int getNumModules ()
int getJointID (const int &module)
std::vector< int > getJointIDs ()
std::vector< std::vector< int > > getConnectorInfo (int moduleIndex)
std::vector< Orientation > getOrientations ()
std::vector< ModuleFunction > getFunctionIDs ()
std::vector< int > getDepthIDs ()
std::vector< unsigned long > getShapeIDs ()
std::vector< int > getNumLimbsIDs ()
std::vector< int > getLimbsIDs ()

Static Public Attributes

static const int FILE_NOT_OPENED = -1
static const int FILE_XML_ERROR = -2
static const int TAG_NOT_FOUND = -3

Private Member Functions

void clearData ()
 Restores the initial, empty, state of the configParser object.
bool removeBadCharacters (std::string &string)
 Removes all the undesired characters, such as spaces and tabulations from a string.

Private Attributes

std::string robotName
std::string simulationFile
std::string gaitTableFolder
std::string frequencyTableFile
std::string serialPort
int numModules
std::vector< int > jointIDs
std::vector< std::vector
< std::vector< int > > > 
connector_info_vector
std::vector< Orientation > orientation_vector
std::vector< ModuleFunction > id_function_vector
std::vector< int > id_depth_vector
std::vector< unsigned long > id_shape_vector
std::vector< int > id_num_limbs_vector
std::vector< int > id_limbs_vector

Detailed Description

Parses a XML configuration file and stores the configuration options.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Friends