138 if(
p_location.getFileName() == fileName){
return;}
141 (*it)->setFileName(fileName);
174 PString childName = name.eraseFirstLastChar(
"\"'");
195 std::map<PString, ConfigNode*>::iterator it(
p_mapChild.find(name));
208 std::map<PString, ConfigNode*>::const_iterator it(
p_mapChild.find(name));
230 return getValue().eraseFirstLastChar(
"\"'");
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.
void setFileName(const PPath &fileName)
fonction qui permet d'initialiser la ligne du PLocation
size_t getLine() const
renvoie la ligne du PLocation
size_t getColumn() const
renvoie la colonne du PLocation