CatapultServer
v0.5.0.1 (Elephant)
|
Public Member Functions | |
void | add (const std::string &key, const std::string &value) |
Adds a key with a string value. More... | |
void | add (const std::string &key, const std::vector< std::string > &values, const std::string &separator) |
Adds a key with multiple values that should be joined with separator. More... | |
template<size_t N> | |
void | add (const std::string &key, const std::array< uint8_t, N > &value) |
Adds a key with a hex-formatted array value. More... | |
template<typename T > | |
void | add (const std::string &key, const T &value) |
Adds a key with a default formatted value. More... | |
std::string | str (const std::string &prefix) const |
Private Member Functions | |
int | maxKeySize () const |
Private Attributes | |
std::vector< std::pair< std::string, std::string > > | m_keyValuePairs |
Builder for aggregating and formatting key value pairs for output.
|
inline |
Adds a key with a hex-formatted array value.
void catapult::tools::KeyValueOutputBuilder::add | ( | const std::string & | key, |
const std::string & | value | ||
) |
Adds a key with a string value.
void catapult::tools::KeyValueOutputBuilder::add | ( | const std::string & | key, |
const std::vector< std::string > & | values, | ||
const std::string & | separator | ||
) |
Adds a key with multiple values that should be joined with separator.
|
inline |
Adds a key with a default formatted value.
|
private |
std::string catapult::tools::KeyValueOutputBuilder::str | ( | const std::string & | prefix | ) | const |
Gets a string composed of all formatted key value pairs. Each pair is on its own line and prefixed with prefix.
|
private |