|
| PropertyTree (const bool &enableJSONWorkAround) |
|
void | addArrayObjects (const std::string &label, const std::vector< PropertyTree > &value) |
|
template<typename T > |
void | addFieldAttribute (const std::string &label, const std::string &attribute, const T &value) |
|
template<typename T > |
void | addFieldAttribute (const std::string &label, const std::string &attribute, const std::vector< T > &value, const bool &useDelimiter=true) |
|
template<typename T > |
void | addToTree (const std::string &label, const T &value) |
|
template<std::size_t N> |
void | addToTree (const std::string &label, const char(&value)[N]) |
|
template<typename T > |
void | addToTree (const std::string &label, const std::vector< T > &value, const bool &join=true) |
|
void | disableJSONWorkaround () |
|
void | mergeSubTree (const std::string &label, const PropertyTree &subTree) |
|
void | write_json (std::iostream &stream) const |
|
void | write_xml (std::iostream &stream) const |
|
template<> |
void | addFieldAttribute (const std::string &label, const std::string &attribute, const std::string &value) |
|
template<> |
void | addFieldAttribute (const std::string &label, const std::string &attribute, const repo_vector_t &value) |
|
template<> |
void | addToTree (const std::string &label, const repoUUID &value) |
|
template<> |
void | addToTree (const std::string &label, const repo_vector_t &value) |
|
template<> |
void | addToTree (const std::string &label, const std::vector< PropertyTree > &value, const bool &join) |
|
template<> |
void | addToTree (const std::string &label, const repo_vector_t &value) |
|
template<> |
void | addToTree (const std::string &label, const repoUUID &value) |
|
void repo::lib::PropertyTree::addArrayObjects |
( |
const std::string & |
label, |
|
|
const std::vector< PropertyTree > & |
value |
|
) |
| |
|
inline |
Add an array of objects to the tree at a specified level This is used for things like arrays of objects within JSON
- Parameters
-
label | indicating where the child lives in the tree |
value | vector of children to add |
template<typename T >
void repo::lib::PropertyTree::addFieldAttribute |
( |
const std::string & |
label, |
|
|
const std::string & |
attribute, |
|
|
const T & |
value |
|
) |
| |
|
inline |
Add an attribute to the field This is very xml specific it is to achieve things like <FIELD name="Hi"> instead of <FIELD>"Hi"</FIELD> The type fo the value can be of any type as long as it is a qualified member of std::to_string()
- Parameters
-
label | field name to add to |
attribute | name of attribute |
value | value of attribute |
template<typename T >
void repo::lib::PropertyTree::addFieldAttribute |
( |
const std::string & |
label, |
|
|
const std::string & |
attribute, |
|
|
const std::vector< T > & |
value, |
|
|
const bool & |
useDelimiter = true |
|
) |
| |
|
inline |
Add an attribute to the field This is very xml specific it is to achieve things like <FIELD name="Hi"> instead of <FIELD>"Hi"</FIELD> The type of the vector can be of any type as long as it is a qualified member of std::to_string()
- Parameters
-
label | field name to add to |
attribute | name of attribute |
value | value of attribute |
template<typename T >
void repo::lib::PropertyTree::addToTree |
( |
const std::string & |
label, |
|
|
const T & |
value |
|
) |
| |
|
inline |
Add a children onto the tree label can denote it's inheritance. for e.g. trunk.branch.leaf would denote the child name is leaf, with parent branch and grandparent trunk.
- Parameters
-
label | indicating where the child lives in the tree |
value | value of the children |
template<typename T >
void repo::lib::PropertyTree::addToTree |
( |
const std::string & |
label, |
|
|
const std::vector< T > & |
value, |
|
|
const bool & |
join = true |
|
) |
| |
|
inline |
Add an array of values to the tree at a specified level This is used for things like arrays within JSON
- Parameters
-
label | indicating where the child lives in the tree |
value | vector of children to add |
join | merge vector into a string value instead of putting in a vector |
void repo::lib::PropertyTree::disableJSONWorkaround |
( |
| ) |
|
|
inline |
Disable the JSON workaround for quotes There is currently a work around to allow json parser writes to remove quotes from anything that isn't a string. Calling this function will disable it. You might want to do this BEFORE you add any data into the tree for XML or any non JSON exports
void repo::lib::PropertyTree::mergeSubTree |
( |
const std::string & |
label, |
|
|
const PropertyTree & |
subTree |
|
) |
| |
|
inline |
Merging sub tree into this tree
- Parameters
-
label | label where the subTree goes |
subTree | the sub tree to add |
void repo::lib::PropertyTree::write_json |
( |
std::iostream & |
stream | ) |
const |
|
inline |
Write tree data onto a stream
- Parameters
-
stream | stream to write onto |
void repo::lib::PropertyTree::write_xml |
( |
std::iostream & |
stream | ) |
const |
|
inline |
Write tree data onto a stream
- Parameters
-
stream | stream to write onto |
The documentation for this class was generated from the following files:
- C:/Users/Carmen/3D Repo/Repo/3drepobouncer/bouncer/src/repo/lib/repo_property_tree.h
- C:/Users/Carmen/3D Repo/Repo/3drepobouncer/bouncer/src/repo/lib/repo_property_tree.cpp