hlcc 2.0.0-beta2+pre1
Loading...
Searching...
No Matches
Enumerations | Functions
hlcc::eltpk::cfghelpers Namespace Reference

Enumerations

enum class  SerializationFormat { YAML , JSON }
 

Functions

std::string PrintNodeJson (const elt::configng::CiiConfigInstanceNode &node, const bool &print_metadata, const bool &recursive_call, const bool &first_in_sequence)
 
std::string PrintNodeYaml (const elt::configng::CiiConfigInstanceNode &node, const std::string &indentation, bool skip_first_indentation, const bool &print_metadata)
 
std::string PrintNodeFormat (const elt::configng::CiiConfigInstanceNode &node, const std::string &indentation, const bool &print_metadata, const SerializationFormat &format)
 

Enumeration Type Documentation

◆ SerializationFormat

Enumerator
YAML 
JSON 

Function Documentation

◆ PrintNodeFormat()

std::string hlcc::eltpk::cfghelpers::PrintNodeFormat ( const elt::configng::CiiConfigInstanceNode &  node,
const std::string &  indentation,
const bool &  print_metadata = false,
const SerializationFormat format = SerializationFormat::YAML 
)

Helper method to print a CII configuration node.

Parameters
nodeelt::configng::CiiConfigInstanceNode, the node to be printed as Json
indentationstring, the current indentation the current node should be printed on.
print_metadatabool, if true child nodes metadata will also be printed
formatSerializationFormat, output format.
Returns
string, containing the serialized output.

◆ PrintNodeJson()

std::string hlcc::eltpk::cfghelpers::PrintNodeJson ( const elt::configng::CiiConfigInstanceNode &  node,
const bool &  print_metadata = false,
const bool &  recursive_call = false,
const bool &  first_in_sequence = true 
)

Helper method to print a CII configuration node as a Yaml string.

Parameters
nodeelt::configng::CiiConfigInstanceNode, the node to be printed as Json
print_metadatabool, if true child nodes metadata will also be printed
recursive_callbool, if true means the current function call is not the first original call, but instead it is a recursive call.
first_in_sequencebool, if true means the current node is the first node to be printed in the current sequence / map. It will help to know when to print a comma before the current node data.
Returns
string, containing the serialized output.

◆ PrintNodeYaml()

std::string hlcc::eltpk::cfghelpers::PrintNodeYaml ( const elt::configng::CiiConfigInstanceNode &  node,
const std::string &  indentation,
bool  skip_first_indentation = false,
const bool &  print_metadata = false 
)

Helper method to print a CII configuration node as a Yaml string.

Parameters
nodeelt::configng::CiiConfigInstanceNode, the node to be printed as Json
indentationstring, the current indentation the current node should be printed on.
skip_first_indentationbool, if true the first line of the current node will skip the provided indentation. It is useful when starting a new sequence / map.
print_metadatabool, if true child nodes metadata will also be printed
Returns
string, containing the serialized output.