LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "ValuePrinter.h"
Public Types | |
using | key_t = std::string |
using | any_t = std::any |
Public Member Functions | |
ValuePrinter (std::string const &key, unsigned initial_indent_level=0) | |
std::string | result () const |
void | do_enter_table (key_t const &k, any_t const &a) |
void | do_enter_sequence (key_t const &k, any_t const &a) |
void | do_atom (key_t const &k, any_t const &a) |
void | do_before_action (key_t const &k, any_t const &a, ParameterSet const *ps) |
void | do_after_action (key_t const &k) |
void | do_exit_table (key_t const &k, any_t const &a) |
void | do_exit_sequence (key_t const &k, any_t const &a) |
Private Member Functions | |
void | enter_table (key_t const &, any_t const &) override |
void | enter_sequence (key_t const &, any_t const &) override |
void | exit_table (key_t const &, any_t const &) override |
void | exit_sequence (key_t const &, any_t const &) override |
void | atom (key_t const &, any_t const &) override |
void | before_action (key_t const &, any_t const &, ParameterSet const *) override |
void | after_action (key_t const &) override |
void | push_size_ (any_t const &) |
void | pop_size_ () |
std::string | maybe_indent_ (std::size_t) |
std::string | maybe_nl_ (std::size_t) |
Private Attributes | |
std::ostringstream | buffer_ {} |
std::string | key_ |
Indentation | indent_ |
std::stack< std::size_t > | sequence_sizes_ |
std::size_t | seq_size_ |
std::size_t | table_size_ |
bool | print_encapsulated_values_ {false} |
Definition at line 86 of file ValuePrinter.h.
|
inherited |
Definition at line 79 of file ParameterSetWalker.h.
|
inherited |
Definition at line 78 of file ParameterSetWalker.h.
ValuePrinter::ValuePrinter | ( | std::string const & | key, |
unsigned | initial_indent_level = 0 |
||
) |
Definition at line 18 of file ValuePrinter.cc.
References indent_, seq_size_, sequence_sizes_, and table_size_.
|
overrideprivatevirtual |
Reimplemented from fhicl::ParameterSetWalker.
Definition at line 42 of file ValuePrinter.cc.
References key_, and print_encapsulated_values_.
Referenced by result().
Implements fhicl::ParameterSetWalker.
Definition at line 106 of file ValuePrinter.cc.
References buffer_, indent_, fhicl::detail::nl(), print_encapsulated_values_, fhicl::detail::atom::printed_prefix(), fhicl::detail::printed_suffix(), seq_size_, and fhicl::detail::atom::value().
Referenced by result().
|
overrideprivatevirtual |
Reimplemented from fhicl::ParameterSetWalker.
Definition at line 29 of file ValuePrinter.cc.
References fhicl::ParameterSet::get(), fhicl::detail::is_table(), key_, print_encapsulated_values_, and table_size_.
Referenced by result().
|
inlineinherited |
Definition at line 103 of file ParameterSetWalker.h.
References fhicl::ParameterSetWalker::after_action().
Referenced by fhicl::ParameterSet::walk().
Definition at line 92 of file ParameterSetWalker.h.
References fhicl::ParameterSetWalker::atom().
Referenced by fhicl::ParameterSet::walk().
|
inlineinherited |
Definition at line 98 of file ParameterSetWalker.h.
References fhicl::ParameterSetWalker::before_action().
Referenced by fhicl::ParameterSet::walk().
|
inlineinherited |
Definition at line 87 of file ParameterSetWalker.h.
References fhicl::ParameterSetWalker::enter_sequence().
Referenced by fhicl::ParameterSet::walk().
Definition at line 82 of file ParameterSetWalker.h.
References fhicl::ParameterSetWalker::enter_table().
Referenced by fhicl::ParameterSet::walk().
|
inlineinherited |
Definition at line 114 of file ParameterSetWalker.h.
References fhicl::ParameterSetWalker::atom(), fhicl::ParameterSetWalker::enter_sequence(), fhicl::ParameterSetWalker::enter_table(), and fhicl::ParameterSetWalker::exit_sequence().
Referenced by fhicl::ParameterSet::walk().
Definition at line 109 of file ParameterSetWalker.h.
References fhicl::ParameterSetWalker::exit_table().
Referenced by fhicl::ParameterSet::walk().
Implements fhicl::ParameterSetWalker.
Definition at line 73 of file ValuePrinter.cc.
References buffer_, indent_, maybe_nl_(), print_encapsulated_values_, fhicl::detail::sequence::printed_prefix(), fhicl::detail::Indentation::push(), push_size_(), and seq_size_.
Referenced by result().
Implements fhicl::ParameterSetWalker.
Definition at line 52 of file ValuePrinter.cc.
References buffer_, indent_, maybe_nl_(), print_encapsulated_values_, fhicl::detail::table::printed_prefix(), fhicl::detail::Indentation::push(), and table_size_.
Referenced by result().
Reimplemented from fhicl::ParameterSetWalker.
Definition at line 83 of file ValuePrinter.cc.
References buffer_, fhicl::detail::sequence::closing_brace(), indent_, maybe_indent_(), fhicl::detail::nl(), fhicl::detail::Indentation::pop(), pop_size_(), print_encapsulated_values_, fhicl::detail::printed_suffix(), and seq_size_.
Referenced by result().
Reimplemented from fhicl::ParameterSetWalker.
Definition at line 61 of file ValuePrinter.cc.
References buffer_, fhicl::detail::table::closing_brace(), indent_, maybe_indent_(), fhicl::detail::nl(), fhicl::detail::Indentation::pop(), print_encapsulated_values_, fhicl::detail::printed_suffix(), seq_size_, and table_size_.
Referenced by result().
|
private |
Definition at line 131 of file ValuePrinter.cc.
References indent_.
Referenced by exit_sequence(), exit_table(), and result().
|
private |
Definition at line 137 of file ValuePrinter.cc.
References fhicl::detail::nl().
Referenced by enter_sequence(), enter_table(), and result().
|
private |
Definition at line 124 of file ValuePrinter.cc.
References seq_size_, and sequence_sizes_.
Referenced by exit_sequence(), and result().
|
private |
Definition at line 117 of file ValuePrinter.cc.
References seq_size_, sequence_sizes_, and util::size().
Referenced by enter_sequence(), and result().
|
inline |
Definition at line 91 of file ValuePrinter.h.
References after_action(), atom(), before_action(), buffer_, enter_sequence(), enter_table(), exit_sequence(), exit_table(), maybe_indent_(), maybe_nl_(), pop_size_(), and push_size_().
|
private |
Definition at line 116 of file ValuePrinter.h.
Referenced by atom(), enter_sequence(), enter_table(), exit_sequence(), exit_table(), and result().
|
private |
Definition at line 118 of file ValuePrinter.h.
Referenced by atom(), enter_sequence(), enter_table(), exit_sequence(), exit_table(), maybe_indent_(), and ValuePrinter().
|
private |
Definition at line 117 of file ValuePrinter.h.
Referenced by after_action(), and before_action().
|
private |
Definition at line 122 of file ValuePrinter.h.
Referenced by after_action(), atom(), before_action(), enter_sequence(), enter_table(), exit_sequence(), and exit_table().
|
private |
Definition at line 120 of file ValuePrinter.h.
Referenced by atom(), enter_sequence(), exit_sequence(), exit_table(), pop_size_(), push_size_(), and ValuePrinter().
|
private |
Definition at line 119 of file ValuePrinter.h.
Referenced by pop_size_(), push_size_(), and ValuePrinter().
|
private |
Definition at line 121 of file ValuePrinter.h.
Referenced by before_action(), enter_table(), exit_table(), and ValuePrinter().