Loading...
Searching...
No Matches
by::adam Class Reference

Root base class for the type hierarchy. More...

#include <adam.hpp>

Detailed Description

Root base class for the type hierarchy.

Meta types in the type class hierarchy that have no parent class are difficult to handle generically. For example, to write a function that operates on all meta types, you would need a way to iterate over all of them.

To solve this, when constructing meta information, any class without a parent class is assigned adam as its parent. This allows accessing all types through adam.

Usage

Example of iterating over all types:

// Without adam, how would you get all types?
// You'd have to manually collect them:
ret.push_back(ttype<A>());
ret.push_back(ttype<B>());
// ... exhaustively list all types
return ret;
}
// With adam, you can simply iterate:
for(const auto& t : ttype<adam>().getSubs())
cout << t.getName() << "\n";
Root base class for the type hierarchy.
Definition adam.hpp:34
Template type wrapper providing entry point for meta information.
Definition ttype.hpp:37
Rich logging support with polymorphic type conversion.
Definition richLog.hpp:34

The documentation for this class was generated from the following file: