36 #include <boost/tokenizer.hpp>
40 using namespace lsst::pex::logging;
47 ) :
_name(new std::string(name)),
48 _verbosity(verbosity),
64 const std::string &separator
69 boost::char_separator<char> sep(separator.c_str());
71 tokenizer::iterator token = components.begin();
72 const tokenizer::iterator end = components.end();
77 add(token, end, verbosity);
84 const tokenizer::iterator end,
87 const std::string cpt0 = *token++;
95 add(token, end, verbosity);
106 iter->second->_verbosity = verbosity;
108 iter->second->add(token, end, verbosity);
122 fcpt0->
add(token, end, verbosity);
137 highest =
iter->second->highestVerbosity(highest);
147 const tokenizer::iterator end,
150 const std::string cpt0 = *token++;
156 int verbosity = iter->second->_verbosity;
158 verbosity = defaultVerbosity;
164 verbosity = iter->second->getVerbosity(token, end, verbosity);
180 const std::string &separator
185 boost::char_separator<char> sep(separator.c_str());
187 tokenizer::iterator token = components.begin();
189 if (token == components.end()) {
207 for (
int i = 0; i < depth; i++) {
212 if (name.length() == 0) name =
"(root)";
214 for (
int i = 0; i < 20 - depth -
static_cast<int>(name.size()); i++) {
227 iter->second->printVerbosity(fp, depth + 1);
int highestVerbosity(int highest=0)
table::Key< std::string > name
std::string const & _name
int getVerbosity(const std::string &name, const std::string &separator)
boost::tokenizer< boost::char_separator< char > > tokenizer
Create a component in the verbosity tree (deprecated).
void add(const std::string &name, int verbosity, const std::string &separator)
void setVerbosity(int verbosity)
void printVerbosity(std::ostream &fp, int depth=0)
std::map< const std::string, Component * > comp_map
Defines the (deprecated) Component class.
Component(const std::string &name=".", int verbosity=INHERIT_VERBOSITY)
table::Key< table::Array< int > > components