7 #ifndef __DICOVALUE_H__
8 #define __DICOVALUE_H__
43 void setVecChild(
const std::vector<DicoValue> & vecChild);
44 void setMapChild(
const std::map<PString, DicoValue> & mapChild);
52 const std::map<PString, DicoValue> &
getMapChild()
const;
std::map< PString, DicoValue > MapDicoValue
Vector of DicoValue.
std::vector< DicoValue > VecDicoValue
Vector of DicoValue.
void setVecChild(const std::vector< DicoValue > &vecChild)
Sets the vecChild of the DicoValue.
PString toString(const PString &valueDecorator="", PString baseIndentation="\t", PString baseNewLine="\n") const
Convert the DicoValue into a string.
const PString & getKey() const
Gets the key of the DicoValue.
bool isKeyExist(const PString &key) const
Say if the given key exists in the map of children.
PString p_value
Value of the current entry.
void copyDicoValue(const DicoValue &other)
Copy Function of class DicoValue.
void setKey(const PString &key)
Sets the key of the DicoValue.
bool parseListOrMap(PFileParser &parser, bool &isRunning)
Parse a list or a map.
bool fromString(const PString &content)
Create a DicoValue from a PString.
bool hasKey() const
Say if the DicoValue has a key.
const std::vector< DicoValue > & getVecChild() const
Gets the vecChild of the DicoValue.
PString saveRecurse(const PString &indentation, const PString &valueDecorator, PString baseIndentation, PString baseNewLine) const
Save the DicoValue with a text file.
DicoValue & operator=(const DicoValue &other)
Operator = of class DicoValue.
virtual ~DicoValue()
Destructor of class DicoValue.
const DicoValue * getMap(const PString &key) const
Get a DicoValue in the map of the current one.
bool save(const PPath &fileName, const PString &valueDecorator="", PString baseIndentation="\t", PString baseNewLine="\n") const
Save the DicoValue with a text file.
void setValue(const PString &value)
Sets the value of the DicoValue.
bool hasMap() const
Say if the DicoValue has a map of children.
void print() const
Print the DicoValue.
PString p_key
Key of the current entry.
DicoValue()
Constructor of class DicoValue.
std::map< PString, DicoValue > p_mapChild
Map of sub DicoValue.
const std::map< PString, DicoValue > & getMapChild() const
Gets the mapChild of the DicoValue.
PString parseString(PFileParser &parser)
Parse a string.
std::vector< DicoValue > p_vecChild
Vector of sub DicoValue.
T getValue() const
Convert the value of the current DicoValue into a type.
bool parseDicoValue(PFileParser &parser, bool &isRunning)
Parse a DicoValue with a text file.
bool loadParser(PFileParser &parser)
Load the DicoValue with a parser.
bool errorAt(PFileParser &parser, bool &isRunning, const PString &errorMsg)
Print the parsing error.
PString getString() const
Get a string value without the first and/or last quote or double quote in there are some.
bool load(const PPath &fileName)
Load the DicoValue with a text file.
void setMapChild(const std::map< PString, DicoValue > &mapChild)
Sets the mapChild of the DicoValue.
bool hasVec() const
Say if the DicoValue has a vector of children.
classe qui permet de parser des fichiers texte en renvoyant les tokens les uns après les autres
Path of a directory or a file.