PhoenixYml  1.2.2
Yml parser for Phoenix
Loading...
Searching...
No Matches
vec_value_utils.h
Go to the documentation of this file.
1/***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5****************************************/
6
7#ifndef __VEC_VALUE_UTILS_H__
8#define __VEC_VALUE_UTILS_H__
9
10#include "DicoValue.h"
11#include "ConfigNode.h"
12#include "VecValue.h"
13
14
15typedef std::vector<VecValue> VecVecValue;
16
17VecValue * getLastVecValue(VecValue & vecVal, size_t depth = -1lu);
18VecValue * getParentVecValue(VecValue & vecAllVal, const std::vector<size_t> & vecIndentation, size_t currentIndentation);
19VecValue * getParentVecValueListItem(VecValue & vecAllVal, const std::vector<size_t> & vecIndentation, size_t currentIndentation);
20
21VecValue * addChildToParentVecValue(VecValue & mainVecValue, const std::vector<size_t> & vecIndentation, bool isCompactMode, const VecValue & child, size_t currentIndentation = -1lu);
22VecValue * addChildToParentVecValueAddListItem(VecValue & mainVecValue, const std::vector<size_t> & vecIndentation, bool isCompactMode, const VecValue & child, size_t currentIndentation = -1lu);
23
24
25void vecValueToDicoValue(DicoValue & dicoValue, const VecValue & vecVal, bool isMainValue = true);
26void vecValueToConfigNode(ConfigNode & dicoValue, const VecValue & vecVal, bool isMainValue = true);
27
28#endif
Vector of keys and values.
Definition VecValue.h:15
void vecValueToConfigNode(ConfigNode &dicoValue, const VecValue &vecVal, bool isMainValue=true)
Convert a VecValue into a ConfigNode.
void vecValueToDicoValue(DicoValue &dicoValue, const VecValue &vecVal, bool isMainValue=true)
Convert a VecValue into a DicoValue.
VecValue * getParentVecValue(VecValue &vecAllVal, const std::vector< size_t > &vecIndentation, size_t currentIndentation)
Get the parent VecValue by respect to its indentation.
VecValue * addChildToParentVecValue(VecValue &mainVecValue, const std::vector< size_t > &vecIndentation, bool isCompactMode, const VecValue &child, size_t currentIndentation=-1lu)
Add the given child to the main VecValue and return a pointer to the added child.
VecValue * getLastVecValue(VecValue &vecVal, size_t depth=-1lu)
Get the last VecValue added at the specified depth.
VecValue * getParentVecValueListItem(VecValue &vecAllVal, const std::vector< size_t > &vecIndentation, size_t currentIndentation)
std::vector< VecValue > VecVecValue
VecValue * addChildToParentVecValueAddListItem(VecValue &mainVecValue, const std::vector< size_t > &vecIndentation, bool isCompactMode, const VecValue &child, size_t currentIndentation=-1lu)
Add the given child to the main VecValue and return a pointer to the added child.