μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DummyDerivedNode.cpp
Go to the documentation of this file.
2
3namespace uhal {
4 namespace tests {
5 UHAL_REGISTER_DERIVED_NODE(DummyParentNode)
6 UHAL_REGISTER_DERIVED_NODE(DummyChildNode)
7
9 uhal::Node(aNode) {
10 }
11
13 }
14
15 void
17
18 std::stringstream ss;
19#ifdef __GNUG__
20 // this is fugly but necessary due to the way that typeid::name() returns the object type name under g++.
21 int lStatus(0);
22 static std::size_t lSize(1024);
23 static char* lDemangled = new char[lSize];
24 ss << (abi::__cxa_demangle(typeid ( *this).name(), lDemangled, &lSize, &lStatus));
25#else
26 ss << (typeid ( T).name());
27#endif
28
29 std::cout << "This is " << ss.str() << std::endl;
30 uint32_t k = 0;
31 for (const auto& lParam: getParameters()) {
32 std::cout << ss.str() << " par[" << k << "]: key=" << lParam.first << ", val=" << lParam.second << std::endl;
33 k++;
34 }
35
36 // print the list of childs as well?
37 }
38
40 uhal::tests::DummyParentNode(aNode) {
41 }
42
44 }
45
46 }
47}
48
#define UHAL_REGISTER_DERIVED_NODE(classname)
Macro which adds a Derived Node Class to the factory It takes a classname and then creates a registra...
Definition: DerivedNode.hpp:53
A heirarchical node for navigating heirarchical firmwares.
Definition: Node.hpp:85
const std::unordered_map< std::string, std::string > & getParameters() const
Return parameters of the current node.
Definition: Node.cpp:304
DummyChildNode(const Node &aNode)
None tests(nox.Session session)
Definition: noxfile.py:19
Annotation for function names.
Definition: attr.h:47