LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
KeyAssembler.cc
Go to the documentation of this file.
2 #include "cetlib/container_algorithms.h"
3 
4 #include <sstream>
5 
6 using namespace fhicl;
7 using namespace fhicl::detail;
8 
9 std::string
10 KeyAssembler::full_key_(name_t const& name) const
11 {
12  std::ostringstream os;
13  cet::copy_all(name_stack_, std::ostream_iterator<std::string>{os, "."});
14  os << name;
15  return os.str();
16 }
17 
18 void
20 {
21  keys_.emplace_back(full_key_(key));
22  name_stack_.emplace_back(key);
23 }
24 
25 void
27 {
28  name_stack_.pop_back();
29 }
30 
31 void
33 {
34  keys_.emplace_back(full_key_(key));
35 }
36 
37 void
38 KeyAssembler::atom(key_t const& key, any_t const&)
39 {
40  keys_.emplace_back(full_key_(key));
41 }
void atom(key_t const &, any_t const &) override
Definition: KeyAssembler.cc:38
void enter_sequence(key_t const &, any_t const &) override
Definition: KeyAssembler.cc:32
void enter_table(key_t const &, any_t const &) override
Definition: KeyAssembler.cc:19
std::vector< name_t > name_stack_
Definition: KeyAssembler.h:92
std::string name_t
Definition: KeyAssembler.h:72
parameter set interface
std::string full_key_(name_t const &) const
Definition: KeyAssembler.cc:10
void exit_table(key_t const &, any_t const &) override
Definition: KeyAssembler.cc:26
std::vector< key_t > keys_
Definition: KeyAssembler.h:91