hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
shared_model::detail::PrettyStringBuilder Class Reference

#include "string_builder.hpp"

Collaboration diagram for shared_model::detail::PrettyStringBuilder:
Collaboration graph

Public Member Functions

PrettyStringBuilderinit (const std::string &name)
 
PrettyStringBuilderinsertLevel ()
 
PrettyStringBuilderremoveLevel ()
 
PrettyStringBuilderappend (const std::string &name, const std::string &value)
 
PrettyStringBuilderappend (const std::string &name, bool value)
 
PrettyStringBuilderappend (const std::string &value)
 
template<typename Collection , typename Transform >
PrettyStringBuilderappendAll (Collection &&c, Transform &&t)
 
template<typename Collection , typename Transform >
PrettyStringBuilderappendAll (const std::string &name, Collection &&c, Transform &&t)
 
template<typename Collection >
PrettyStringBuilderappendAll (Collection &&c)
 
template<typename Collection >
PrettyStringBuilderappendAll (Collection &&c)
 
std::string finalize ()
 

Detailed Description

A simple string builder class for building pretty looking strings

Member Function Documentation

PrettyStringBuilder & shared_model::detail::PrettyStringBuilder::append ( const std::string &  name,
const std::string &  value 
)

Appends new field to string as a "name=value" pair

Parameters
name- field name to append
value- field value
PrettyStringBuilder & shared_model::detail::PrettyStringBuilder::append ( const std::string &  name,
bool  value 
)

Appends new field to string as a "name=value" pair

Parameters
name- field name to append
value= field value (as a bool)

Here is the call graph for this function:

PrettyStringBuilder & shared_model::detail::PrettyStringBuilder::append ( const std::string &  value)

Appends new single value to string

Parameters
value- value to append
template<typename Collection , typename Transform >
PrettyStringBuilder& shared_model::detail::PrettyStringBuilder::appendAll ( Collection &&  c,
Transform &&  t 
)
inline

Appends a new collection to string

Template Parameters
Collection- type of collection
Transform- type of transformation function
Parameters
c- collection to append
t- transformation function

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Collection , typename Transform >
PrettyStringBuilder& shared_model::detail::PrettyStringBuilder::appendAll ( const std::string &  name,
Collection &&  c,
Transform &&  t 
)
inline

Appends a new named collection to string

Template Parameters
Collection- type of collection
Transform- type of transformation function
Parameters
name- field name to append
c- collection to append
t- transformation function

Here is the call graph for this function:

template<typename Collection >
PrettyStringBuilder& shared_model::detail::PrettyStringBuilder::appendAll ( Collection &&  c)
inline

Here is the call graph for this function:

template<typename Collection >
PrettyStringBuilder& shared_model::detail::PrettyStringBuilder::appendAll ( Collection &&  c)
inline

Here is the call graph for this function:

std::string shared_model::detail::PrettyStringBuilder::finalize ( )

Finalizes appending and returns constructed string.

Returns
resulted string
PrettyStringBuilder & shared_model::detail::PrettyStringBuilder::init ( const std::string &  name)

Initializes new string with a provided name

Parameters
name- name to initialize
PrettyStringBuilder & shared_model::detail::PrettyStringBuilder::insertLevel ( )

Inserts new level marker

Here is the caller graph for this function:

PrettyStringBuilder & shared_model::detail::PrettyStringBuilder::removeLevel ( )

Closes new level marker

Here is the caller graph for this function:


The documentation for this class was generated from the following files: