![]() |
ATLAS Offline Software
|
Recursively separate out template arguments in a C++ class name. More...
#include <ClassName.h>
Public Member Functions | |
| ExcBadClassName (const std::string &name) | |
Recursively separate out template arguments in a C++ class name.
This class allows making some simple transformations of C++ class names. For example, given these rules:
then rules.apply can make transformations like this:
In slightly more detail: this class analyzes C++ class names. A name like
is broken down like this:
This is done recursively; both the namespace and template argument pieces can be further broken down like this. A name can also be marked as `const', but no other parsing of C-like declarators is done.
Parsed names can be matched against simple patterns like this:
*
and the variable T gets set to the corresponding piece of the type being matched. For example, given the above pattern,
If the pattern were A::B<const $T>, then A::B<const int> would match with T set to int, but A::B<int> would not match.
However, the root name of a pattern may not be a variable; for example, you can't use A::$T<int> as a pattern.
You can also substitute variables back into a pattern; for example,
/**
Exception to signal a malformed class name.
Definition at line 107 of file CxxUtils/CxxUtils/ClassName.h.
| CxxUtils::ExcBadClassName::ExcBadClassName | ( | const std::string & | name | ) |