ATLAS Offline Software
Loading...
Searching...
No Matches
ClassName.h File Reference

Recursively separate out template arguments in a C++ class name. More...

#include <string>
#include <vector>
#include <map>
#include <stdexcept>
Include dependency graph for CxxUtils/CxxUtils/ClassName.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CxxUtils::ExcBadClassName
 Recursively separate out template arguments in a C++ class name. More...
class  CxxUtils::ExcMissingVariable
 Exception to signal a missing variable. More...
class  CxxUtils::Rules
 A set of transformation rules to use with ClassName. More...

Namespaces

namespace  CxxUtils

Typedefs

typedef std::map< std::string, ClassNameCxxUtils::match_t
 Map used to hold variable assignments from matching.

Functions

 CxxUtils::ClassName ()
 Default constructor.
 CxxUtils::ClassName (const char *name)
 Parse a class name into component parts.
 CxxUtils::ClassName (const std::string &name)
 Parse a class name into component parts.
 CxxUtils::ClassName (const std::string &name, std::string::size_type &pos)
 Parse a class name into component parts.
void CxxUtils::swap (ClassName &other)
 Swap this expression with another one.
bool CxxUtils::isConst () const
 Get the const flag for this expression.
void CxxUtils::setConst ()
 Set the const flag for this expression.
const std::string & CxxUtils::name () const
 Return the root name of the expression.
std::string CxxUtils::qualifiedName () const
 Return the namespace-qualified name of the expression.
std::string CxxUtils::fullName () const
 Return the full name of the expression.
size_t CxxUtils::ntargs () const
 Return number of template arguments.
const ClassNameCxxUtils::targ (size_t i) const
 Return one template argument.
bool CxxUtils::operator== (const ClassName &other) const
 Test two expressions for equality.
bool CxxUtils::operator!= (const ClassName &other) const
 Test two expressions for inequality.
bool CxxUtils::match (const ClassName &pattern, match_t &matches) const
 Match this expression against a pattern.
void CxxUtils::subst (const match_t &matches)
 Substitute variables into this expression.
ClassName CxxUtils::substCopy (const match_t &matches) const
 Return a copy of this expression with variables substituted.
void CxxUtils::applyRules (const Rules &rules)
 Apply a set of transformation rules to this object.
static std::string CxxUtils::applyRules (const std::string &name, const Rules &rules)
 Apply a set of transformation rules a class name.
void CxxUtils::parse (const std::string &name, std::string::size_type &pos)
 Parse a string into a ClassName.
std::string CxxUtils::parsePrimary (const std::string &name, std::string::size_type &pos)
 Parse a primary part of the class name.
void CxxUtils::parseNamespace (const std::string &name, std::string::size_type &pos)
 Parse a namespace qualification.
void CxxUtils::parseTemplateArgs (const std::string &name, std::string::size_type &pos)
 Parse the template part of a name.
void CxxUtils::skipSpaces (const std::string &name, std::string::size_type &pos)
 Skip past spaces in a string.
bool CxxUtils::match1 (const ClassName &pattern, bool topLevel, match_t &matches) const
 Match this expression against a pattern.
bool CxxUtils::applyRules1 (const Rules &rules)
 Apply a set of transformation rules to this object.

Variables

bool CxxUtils::m_const
 Is this expression const?
std::vector< ClassNameCxxUtils::m_namespace
 The containing namespace. This vector is always either 0 or 1 elements long; this is a way of getting something sort of like a pointer but with completely automatic management.
std::string CxxUtils::m_name
 The primary name part of this expression.
std::vector< ClassNameCxxUtils::m_targs
 The template arguments for this name.

Detailed Description

Recursively separate out template arguments in a C++ class name.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Jun, 2014

Definition in file CxxUtils/CxxUtils/ClassName.h.