![]() |
PhoenixYml
0.5.0
Yml parser for Phoenix
|
Go to the source code of this file.
Classes | |
struct | PYmlParserData |
Data used to parse a yml file. More... | |
Functions | |
PYmlParserData | default_PYmlParserData () |
Default value of PYmlParserData. | |
bool | parse_yml_all (VecValue &parent, PFileParser &parser, PYmlParserData &data) |
Parse all yml features. | |
bool | parse_yml_compactDicoContent (VecValue &parent, PFileParser &parser, PYmlParserData &data) |
Parse compact dico content. | |
bool | parse_yml_compactListContent (VecValue &parent, PFileParser &parser, PYmlParserData &data) |
Parse compact dico content. | |
bool | parse_yml_dicoContent (VecValue &parent, PFileParser &parser, PYmlParserData &data) |
Parse dico content. | |
void | parse_yml_dicoSetValue (VecValue *vecVal, const PString &value) |
Set a value into a VecValue. | |
void | parse_yml_incrementCurrentChar (PFileParser &parser, PYmlParserData &data) |
Increment the current character. | |
bool | parse_yml_isParse (const PYmlParserData &data) |
Say if the file parsing is enable. | |
bool | parse_yml_key (PString &key, size_t &keyIndentation, PFileParser &parser) |
Parse key. | |
bool | parse_yml_listContent (VecValue &parent, PFileParser &parser, PYmlParserData &data) |
Parse dico content. | |
void | parse_yml_playCurrentText (PYmlParserData &data) |
Play the current parsed text. | |
void | parse_yml_stopParsing (PYmlParserData &data) |
Stop the file parsing. | |
bool | parse_yml_string (PString &str, PFileParser &parser) |
Parse string value. | |
bool | parse_yml_stringValue (PFileParser &parser, PYmlParserData &data) |
Parse compact dico content. | |
void | parse_yml_updateIndentation (std::vector< size_t > &vecIndentation, size_t currentIndentation) |
Update the indentation vector by respect to the given indentation. | |
bool | parser_yml (DicoValue &dico, const PPath &fileName) |
Parse a yml file and update the given DicoValue. | |
bool | parser_yml_fileParser (VecValue &dico, PFileParser &parser) |
Parse a yml file and update the given VecValue. | |
PYmlParserData default_PYmlParserData | ( | ) |
Default value of PYmlParserData.
Definition at line 31 of file parser_yml.cpp.
References PYmlParserData::compactMode, PYmlParserData::currentLine, PYmlParserData::currentlyParsedKeyValue, PYmlParserData::currentText, and PYmlParserData::isRun.
Referenced by parser_yml_fileParser().
bool parse_yml_all | ( | VecValue & | parent, |
PFileParser & | parser, | ||
PYmlParserData & | data ) |
Parse all yml features.
[out] | parent | : parent VecValue |
[out] | parser | : PFileParser to be used |
[out] | data | : extra parser data to be used |
Definition at line 304 of file parser_yml.cpp.
References parse_yml_compactDicoContent(), parse_yml_compactListContent(), parse_yml_dicoContent(), parse_yml_incrementCurrentChar(), parse_yml_listContent(), and parse_yml_stringValue().
Referenced by parse_yml_compactDicoContent(), and parser_yml_fileParser().
bool parse_yml_compactDicoContent | ( | VecValue & | parent, |
PFileParser & | parser, | ||
PYmlParserData & | data ) |
Parse compact dico content.
[out] | parent | : parent VecValue |
[out] | parser | : PFileParser to be used |
[out] | data | : extra parser data to be used |
Definition at line 175 of file parser_yml.cpp.
References PYmlParserData::compactMode, PYmlParserData::currentlyParsedKeyValue, parse_yml_all(), parse_yml_isParse(), parse_yml_playCurrentText(), parse_yml_stopParsing(), and PYmlParserData::vecIndentation.
Referenced by parse_yml_all().
bool parse_yml_compactListContent | ( | VecValue & | parent, |
PFileParser & | parser, | ||
PYmlParserData & | data ) |
Parse compact dico content.
[out] | parent | : parent VecValue |
[out] | parser | : PFileParser to be used |
[out] | data | : extra parser data to be used |
Definition at line 243 of file parser_yml.cpp.
References PYmlParserData::currentlyParsedKeyValue, PYmlParserData::currentText, VecValue::getVecChild(), parse_yml_incrementCurrentChar(), parse_yml_isParse(), parse_yml_playCurrentText(), parse_yml_stopParsing(), parse_yml_string(), and VecValue::setValue().
Referenced by parse_yml_all().
bool parse_yml_dicoContent | ( | VecValue & | parent, |
PFileParser & | parser, | ||
PYmlParserData & | data ) |
Parse dico content.
[out] | parent | : parent VecValue |
[out] | parser | : PFileParser to be used |
[out] | data | : extra parser data to be used |
Let's update the current VecValue to be completd with values and lists
Definition at line 205 of file parser_yml.cpp.
References addChildToParentVecValue(), PYmlParserData::compactMode, PYmlParserData::currentlyParsedKeyValue, VecValueType::KEY, parse_yml_key(), parse_yml_playCurrentText(), parse_yml_updateIndentation(), VecValue::setIndentation(), VecValue::setKey(), VecValue::setType(), and PYmlParserData::vecIndentation.
Referenced by parse_yml_all().
void parse_yml_dicoSetValue | ( | VecValue * | vecVal, |
const PString & | value ) |
Set a value into a VecValue.
[out] | vecVal | : vector of value |
value | : value to be used |
Definition at line 140 of file parser_yml.cpp.
References VecValue::setType(), VecValue::setValue(), and VecValueType::VALUE.
Referenced by parse_yml_stringValue().
void parse_yml_incrementCurrentChar | ( | PFileParser & | parser, |
PYmlParserData & | data ) |
Increment the current character.
[out] | parser | : parser to be used |
data | : parsing data |
Definition at line 85 of file parser_yml.cpp.
References PYmlParserData::currentText.
Referenced by parse_yml_all(), and parse_yml_compactListContent().
bool parse_yml_isParse | ( | const PYmlParserData & | data | ) |
Say if the file parsing is enable.
data | : parsing data |
Definition at line 53 of file parser_yml.cpp.
References PYmlParserData::isRun.
Referenced by parse_yml_compactDicoContent(), parse_yml_compactListContent(), and parser_yml_fileParser().
bool parse_yml_key | ( | PString & | key, |
size_t & | keyIndentation, | ||
PFileParser & | parser ) |
Parse key.
[out] | key | : parsed key |
[out] | keyIndentation | : indentation of the key |
[out] | parser | : PFileParser to be used |
Definition at line 109 of file parser_yml.cpp.
Referenced by parse_yml_dicoContent().
bool parse_yml_listContent | ( | VecValue & | parent, |
PFileParser & | parser, | ||
PYmlParserData & | data ) |
Parse dico content.
[out] | parent | : parent VecValue |
[out] | parser | : PFileParser to be used |
[out] | data | : extra parser data to be used |
Let's update the current VecValue to be completd with values and lists
Definition at line 279 of file parser_yml.cpp.
References addChildToParentVecValueAddListItem(), PYmlParserData::compactMode, PYmlParserData::currentlyParsedKeyValue, VecValueType::LIST_ITEM, parse_yml_playCurrentText(), parse_yml_updateIndentation(), VecValue::setIndentation(), VecValue::setKey(), VecValue::setType(), and PYmlParserData::vecIndentation.
Referenced by parse_yml_all().
void parse_yml_playCurrentText | ( | PYmlParserData & | data | ) |
Play the current parsed text.
[out] | data | : parsing data |
Definition at line 95 of file parser_yml.cpp.
References PYmlParserData::currentlyParsedKeyValue, PYmlParserData::currentText, and VecValue::setValue().
Referenced by parse_yml_compactDicoContent(), parse_yml_compactListContent(), parse_yml_dicoContent(), parse_yml_listContent(), and parser_yml_fileParser().
void parse_yml_stopParsing | ( | PYmlParserData & | data | ) |
Stop the file parsing.
[out] | data | : parsing data |
Definition at line 46 of file parser_yml.cpp.
References PYmlParserData::isRun.
Referenced by parse_yml_compactDicoContent(), parse_yml_compactListContent(), and parser_yml_fileParser().
bool parse_yml_string | ( | PString & | str, |
PFileParser & | parser ) |
Parse string value.
[out] | str | : parsed string value |
[out] | parser | : PFileParser to be used |
Definition at line 125 of file parser_yml.cpp.
Referenced by parse_yml_compactListContent().
bool parse_yml_stringValue | ( | PFileParser & | parser, |
PYmlParserData & | data ) |
Parse compact dico content.
[out] | parser | : PFileParser to be used |
[out] | data | : extra parser data to be used |
Definition at line 150 of file parser_yml.cpp.
References PYmlParserData::currentlyParsedKeyValue, and parse_yml_dicoSetValue().
Referenced by parse_yml_all().
void parse_yml_updateIndentation | ( | std::vector< size_t > & | vecIndentation, |
size_t | currentIndentation ) |
Update the indentation vector by respect to the given indentation.
[out] | vecIndentation | : vector of indentation to be updated |
currentIndentation | : current indentation |
Definition at line 61 of file parser_yml.cpp.
Referenced by parse_yml_dicoContent(), and parse_yml_listContent().
bool parser_yml | ( | DicoValue & | dico, |
const PPath & | fileName ) |
Parse a yml file and update the given DicoValue.
[out] | dico | : dictionnary of values |
fileName | : name of the file to be parsed |
Definition at line 343 of file parser_yml.cpp.
References VecValueType::MAIN, parser_yml_fileParser(), VecValue::setIndentation(), VecValue::setType(), and vecValueToDicoValue().
bool parser_yml_fileParser | ( | VecValue & | dico, |
PFileParser & | parser ) |
Parse a yml file and update the given VecValue.
[out] | dico | : dictionnary of values |
parser | : PFileParser to be used |
Definition at line 322 of file parser_yml.cpp.
References PYmlParserData::currentlyParsedKeyValue, default_PYmlParserData(), PYmlParserData::isRun, parse_yml_all(), parse_yml_isParse(), parse_yml_playCurrentText(), and parse_yml_stopParsing().
Referenced by parser_yml().