7#ifndef __CONFIGNODE_H__
8#define __CONFIGNODE_H__
22 void setValue(
const PString & value);
23 void setName(
const PString & name);
24 void setVecChild(
const std::vector<ConfigNode*> & vecChild);
25 void setMapChild(
const std::map<PString, ConfigNode*> & mapChild);
30 const PString &
getName()
const;
32 const std::vector<ConfigNode*> &
getVecChild()
const;
34 const std::map<PString, ConfigNode*> &
getMapChild()
const;
std::vector< ConfigNode * > VecConfigNode
std::map< PString, ConfigNode * > MapConfigNode
Iterator of the ConfigNode.
PString getString() const
Get string value without " or ' at the beginning of the end.
const PString & getValue() const
Gets the value of the ConfigNode.
void setValue(const PString &value)
Sets the value of the ConfigNode.
PLocation getLocation() const
Gets the location of the ConfigNode.
ConfigNode()
Constructor of class ConfigNode.
void setMapChild(const std::map< PString, ConfigNode * > &mapChild)
Sets the mapChild of the ConfigNode.
void setParent(const ConfigNode *parent)
Sets the parent of the ConfigNode.
std::vector< ConfigNode * > p_vecChild
Vector of sub ConfigNode.
const ConfigNode * p_parent
Parent of the current ConfigNode.
std::map< PString, ConfigNode * > p_mapChild
Map of sub ConfigNode.
void clear()
Clear the vector of children.
void setLineCol(const PLocation &location)
Set the line and the column of the current ConfigNode.
virtual ~ConfigNode()
Destructor of class ConfigNode.
bool hasMapChild() const
Say if the current ConfigNode has a map of children.
const PString & getName() const
Gets the name of the ConfigNode.
ConfigNodeIter iter(std::ostream &out=std::cout) const
Create an iterator of ConfigNode.
const std::vector< ConfigNode * > & getVecChild() const
Gets the vecChild of the ConfigNode.
ConfigNode * addValue(const PString &value)
Add a value in the ConfigNode.
ConfigNode * addChild(const PString &name="")
Add a child in the current ConfigNode.
PString p_value
Value of the current entry.
void setLocation(const PLocation &location)
Sets the location of the ConfigNode.
void initialisationConfigNode()
Initialisation Function of class ConfigNode.
ConfigNode * getChild(const PString &name)
Get the child of the given name.
void setVecChild(const std::vector< ConfigNode * > &vecChild)
Sets the vecChild of the ConfigNode.
bool hasVecChild() const
Say if the current ConfigNode has a vector of children.
const ConfigNode * getParent() const
Gets the parent of the ConfigNode.
void setName(const PString &name)
Sets the name of the ConfigNode.
const std::map< PString, ConfigNode * > & getMapChild() const
Gets the mapChild of the ConfigNode.
void setFileName(const PPath &fileName)
Set the fileName of the current ConfigNode.
const PPath & getFileName() const
Get current file name.
PString p_name
Name of the current entry.
bool hasValue() const
Say if the current ConfigNode has a value.
PLocation p_location
Location of the definition of the current ConfigNode.
ConfigNodeIter iterWrite(std::ostream &out=std::cout)
Create an iterator of ConfigNode.
Classe qui permet de décrire une localisation, avec un nom de fichier et une ligne.