![]() |
PhoenixYml
0.5.0
Yml parser for Phoenix
|
#include "vec_value_utils.h"
Go to the source code of this file.
Functions | |
VecValue * | addChildToParentVecValue (VecValue &mainVecValue, const std::vector< size_t > &vecIndentation, bool isCompactMode, const VecValue &child, size_t currentIndentation) |
Add the given child to the main VecValue and return a pointer to the added child. | |
VecValue * | addChildToParentVecValueAddListItem (VecValue &mainVecValue, const std::vector< size_t > &vecIndentation, bool isCompactMode, const VecValue &child, size_t currentIndentation) |
Add the given child to the main VecValue and return a pointer to the added child. | |
VecValue * | getLastVecValue (VecValue &vecVal, size_t depth) |
Get the last VecValue added at the specified depth. | |
VecValue * | getParentVecValue (VecValue &vecAllVal, const std::vector< size_t > &vecIndentation, size_t currentIndentation) |
Get the parent VecValue by respect to its indentation. | |
VecValue * | getParentVecValueListItem (VecValue &vecAllVal, const std::vector< size_t > &vecIndentation, size_t currentIndentation, const VecValue &child) |
Get the parent VecValue by respect to its indentation. | |
void | getVecParentPtr (std::vector< VecValue * > &vecParentPtr, VecValue &vecAllVal) |
Get the parent pointer vector. | |
std::vector< VecValue * > | getVecParentPtr (VecValue &vecAllVal) |
Get the parent pointer vector. | |
void | vecValueToDicoValue (DicoValue &dicoValue, const VecValue &vecVal, bool isMainValue) |
Convert a VecValue into a DicoValue. | |
VecValue * addChildToParentVecValue | ( | VecValue & | mainVecValue, |
const std::vector< size_t > & | vecIndentation, | ||
bool | isCompactMode, | ||
const VecValue & | child, | ||
size_t | currentIndentation ) |
Add the given child to the main VecValue and return a pointer to the added child.
[out] | mainVecValue | : main VecValue to be used |
vecIndentation | : vector of the last indentation of the children VecValue | |
isCompactMode | : true if the compact mode is enabled, false otherwise | |
child | : child VecValue to be added to the main VecValue | |
currentIndentation | : indentation of the current VecValue |
Definition at line 110 of file vec_value_utils.cpp.
References getLastVecValue(), getParentVecValue(), and VecValue::getVecChild().
Referenced by parse_yml_dicoContent().
VecValue * addChildToParentVecValueAddListItem | ( | VecValue & | mainVecValue, |
const std::vector< size_t > & | vecIndentation, | ||
bool | isCompactMode, | ||
const VecValue & | child, | ||
size_t | currentIndentation ) |
Add the given child to the main VecValue and return a pointer to the added child.
[out] | mainVecValue | : main VecValue to be used |
vecIndentation | : vector of the last indentation of the children VecValue | |
isCompactMode | : true if the compact mode is enabled, false otherwise | |
child | : child VecValue to be added to the main VecValue | |
currentIndentation | : indentation of the current VecValue |
Definition at line 133 of file vec_value_utils.cpp.
References getLastVecValue(), getParentVecValueListItem(), and VecValue::getVecChild().
Referenced by parse_yml_listContent().
Get the last VecValue added at the specified depth.
Definition at line 15 of file vec_value_utils.cpp.
References getLastVecValue(), and VecValue::getVecChild().
Referenced by addChildToParentVecValue(), addChildToParentVecValueAddListItem(), getLastVecValue(), getParentVecValue(), and getParentVecValueListItem().
VecValue * getParentVecValue | ( | VecValue & | vecAllVal, |
const std::vector< size_t > & | vecIndentation, | ||
size_t | currentIndentation ) |
Get the parent VecValue by respect to its indentation.
[out] | vecAllVal | : main VecValue |
vecIndentation | : vector of the last indentation of the children VecValue | |
currentIndentation | : indentation of the current VecValue |
Definition at line 27 of file vec_value_utils.cpp.
References getLastVecValue().
Referenced by addChildToParentVecValue().
VecValue * getParentVecValueListItem | ( | VecValue & | vecAllVal, |
const std::vector< size_t > & | vecIndentation, | ||
size_t | currentIndentation, | ||
const VecValue & | child ) |
Get the parent VecValue by respect to its indentation.
[out] | vecAllVal | : main VecValue |
vecIndentation | : vector of the last indentation of the children VecValue | |
currentIndentation | : indentation of the current VecValue | |
child | : child to be added to the parent |
Definition at line 73 of file vec_value_utils.cpp.
References VecValue::getIndentation(), getLastVecValue(), VecValue::getType(), getVecParentPtr(), VecValueType::KEY, VecValueType::LIST_ITEM, and VecValueType::VALUE.
Referenced by addChildToParentVecValueAddListItem().
Get the parent pointer vector.
[out] | vecParentPtr | : vector of pointer of all parent chain |
vecAllVal | : Main VecValue |
Definition at line 49 of file vec_value_utils.cpp.
References VecValue::getVecChild(), and getVecParentPtr().
Referenced by getParentVecValueListItem(), getVecParentPtr(), and getVecParentPtr().
Get the parent pointer vector.
vecAllVal | : Main VecValue |
Definition at line 60 of file vec_value_utils.cpp.
References getVecParentPtr().
void vecValueToDicoValue | ( | DicoValue & | dicoValue, |
const VecValue & | vecVal, | ||
bool | isMainValue ) |
Convert a VecValue into a DicoValue.
[out] | dicoValue | : converted DicoValue |
vecVal | : vector of value | |
isMainValue | : true if the VecValue is the main one |
Definition at line 153 of file vec_value_utils.cpp.
References VecValue::getKey(), VecValue::getValue(), VecValue::getVecChild(), and vecValueToDicoValue().
Referenced by parser_yml(), and vecValueToDicoValue().