#include <class_info.hpp>
|
bool | empty () const |
|
void | add (const std::string &ns_name, const std::string &class_name) |
|
void | print (std::ostream &s, int level) const |
|
Definition at line 42 of file class_info.hpp.
◆ add()
void dunedaq::oksdalgen::NameSpaceInfo::add |
( |
const std::string & | ns_name, |
|
|
const std::string & | class_name ) |
|
inline |
Definition at line 54 of file class_info.hpp.
55 {
56 if (!ns_name.empty())
57 {
58 std::string::size_type idx = ns_name.find_first_of(':');
59 NameSpaceInfo &ns =
m_nested[ns_name.substr(0, idx)];
60 if (idx != std::string::npos)
61 ns.add(ns_name.substr(ns_name.find_first_not_of(':', idx)), class_name);
62 else
63 ns.add("", class_name);
64 }
65 else
67 }
std::map< std::string, NameSpaceInfo > m_nested
std::set< std::string > m_classes
◆ empty()
bool dunedaq::oksdalgen::NameSpaceInfo::empty |
( |
| ) |
const |
|
inline |
◆ print()
void dunedaq::oksdalgen::NameSpaceInfo::print |
( |
std::ostream & | s, |
|
|
int | level ) const |
|
inline |
Definition at line 70 of file class_info.hpp.
71 {
72 std::string dx(level * 2, ' ');
73
75 {
76 s << dx <<
"namespace " << x.first <<
" {\n";
77 x.second.print(s, level + 1);
79 }
80
82 s << dx <<
"class " << x <<
";\n";
83 }
◆ m_classes
std::set<std::string> dunedaq::oksdalgen::NameSpaceInfo::m_classes |
◆ m_nested
std::map<std::string, NameSpaceInfo> dunedaq::oksdalgen::NameSpaceInfo::m_nested |
The documentation for this struct was generated from the following file: