17 if(vecChildren.size() == 0lu || depth == 0lu){
return &vecVal;}
28 if(vecIndentation.size() == 0lu){
32 std::vector<size_t>::const_iterator it(vecIndentation.begin());
33 bool isCurrentLower(
true);
34 while(isCurrentLower && it != vecIndentation.end()){
35 isCurrentLower = *it < currentIndentation;
50 vecParentPtr.push_back(&vecAllVal);
61 std::vector<VecValue*> vecParentPtr;
74 if(vecIndentation.size() == 0lu){
80 std::vector<VecValue*>::const_reverse_iterator itParent(vecParentPtr.rbegin());
81 bool isCurrentGreater(
true);
82 while(isCurrentGreater && itParent != vecParentPtr.rend()){
84 isCurrentGreater = (*itParent)->getIndentation() > childIndentation;
92 isCurrentGreater = (*itParent)->getIndentation() >= childIndentation;
113 parent = &mainVecValue;
115 if(currentIndentation != -1lu){
136 parent = &mainVecValue;
138 if(currentIndentation != -1lu){
154 PString key(vecVal.
getKey());
156 if(vecChildren.size() == 0lu){
160 subDico.setValue(value);
161 dicoValue.getVecChild().push_back(subDico);
165 subDico.setValue(value);
166 dicoValue.getMapChild()[key] = subDico;
171 subDico.setKey(vecVal.
getKey());
172 for(VecVecValue::const_iterator it(vecChildren.begin()); it != vecChildren.end(); ++it){
175 dicoValue.getMapChild()[key] = subDico;
178 for(VecVecValue::const_iterator it(vecChildren.begin()); it != vecChildren.end(); ++it){
183 for(VecVecValue::const_iterator it(vecChildren.begin()); it != vecChildren.end(); ++it){
186 dicoValue.getVecChild().push_back(dashValue);
Vector of keys and values.
const VecValueType::VecValueType & getType() const
Gets the type of the VecValue.
size_t getIndentation() const
Gets the indentation of the VecValue.
const std::vector< VecValue > & getVecChild() const
Gets the vecChild of the VecValue.
const PString & getValue() const
Gets the value of the VecValue.
const PString & getKey() const
Gets the key of the VecValue.
void getVecParentPtr(std::vector< VecValue * > &vecParentPtr, VecValue &vecAllVal)
Get the parent pointer vector.
VecValue * getParentVecValue(VecValue &vecAllVal, const std::vector< size_t > &vecIndentation, size_t currentIndentation)
Get the parent VecValue by respect to its indentation.
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 * 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.
void vecValueToDicoValue(DicoValue &dicoValue, const VecValue &vecVal, bool isMainValue)
Convert a VecValue into a DicoValue.
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.
std::vector< VecValue > VecVecValue