ROSE 0.11.145.147
|
#include <Rosebud/Ast.h>
Public Types | |
using | Ptr = DefinitionPtr |
Shared-ownership pointer. | |
Public Types inherited from Rosebud::Ast::Node | |
using | Ptr = NodePtr |
Public Types inherited from Sawyer::Tree::Vertex< Node > | |
using | UserBase = Node |
User's base class. | |
using | UserBasePtr = std::shared_ptr< UserBase > |
Pointer to user's base class. | |
using | TraversalEvent = Sawyer::Tree::TraversalEvent |
Alias for traversal events. | |
Public Member Functions | |
AttributePtr | findAttribute (const std::string &fqName) |
Finds an attribute with the specified fully qualified name. | |
Public Member Functions inherited from Rosebud::Ast::Node | |
template<class T > | |
std::shared_ptr< T > | findAncestor () |
Public Member Functions inherited from Sawyer::Tree::Vertex< Node > | |
UserBasePtr | pointer () |
Returns a shared pointer to this vertex. | |
std::shared_ptr< T > | isa () |
Tests whether this object is a certain type. | |
auto | traverseReverse (const Visitor &visitor) |
Traverse in reverse direction from children to parents. | |
auto | traverse (const Visitor &visitor) |
Traverse in forward direction from parents to children. | |
auto | traversePre (const Visitor &visitor) |
Pre-order forward traversal. | |
auto | traversePost (const Visitor &visitor) |
Post-order forward traversal. | |
std::shared_ptr< T > | findFirstAncestor () |
Traversal that finds the closest ancestor of type T or derived from T. | |
std::shared_ptr< T > | findLastAncestor () |
Traversal that finds the farthest ancestor of type T or derived from T. | |
std::vector< std::shared_ptr< T > > | findDescendants () |
Traversal that finds all the descendants of a particular type. | |
UserBasePtr | child (size_t i) const |
Returns the pointer for a child. | |
size_t | nChildren () const |
Returns the number of children. | |
Public Attributes | |
Token | startToken |
Token at the start of the definition. | |
std::string | name |
Unqualified name for the definition. | |
Token | nameToken |
Token for the definition's unqualified name. | |
std::string | doc |
Doxygen documentation comment. | |
Token | docToken |
Token associated with the Doxygen comment. | |
Edge< CppStack > | cppStack |
C preprocessor pending conditional compilation directives. | |
std::string | priorText |
Input text before the definition. | |
Token | priorTextToken |
Token describing the location of the prior text. | |
EdgeVector< Attribute > | attributes |
Non-null pointer to the list of attributes controlling this property. | |
Public Attributes inherited from Sawyer::Tree::Vertex< Node > | |
ReverseEdge | parent |
Pointer to the parent in the tree. | |
Protected Member Functions | |
Definition () | |
Default constructor used only by derived classes. | |
Protected Member Functions inherited from Sawyer::Tree::Vertex< Node > | |
virtual void | destructorHelper () |
AttributePtr Rosebud::Ast::Definition::findAttribute | ( | const std::string & | fqName | ) |
Finds an attribute with the specified fully qualified name.
Returns a non-null pointer to the attribute if found, null otherwise.
Token Rosebud::Ast::Definition::startToken |
std::string Rosebud::Ast::Definition::name |
Token Rosebud::Ast::Definition::nameToken |
std::string Rosebud::Ast::Definition::doc |
Token Rosebud::Ast::Definition::docToken |
std::string Rosebud::Ast::Definition::priorText |
Input text before the definition.
This is all the input text that appears before this definition and is not associated with any other definition. If there is a docToken, then its text is excluded from the prior text. Furthermore, white space at the ends of lines is removed, consecutive blank lines are replaced with a single blank line, and leading and trailing blank lines are removed.
Token Rosebud::Ast::Definition::priorTextToken |
EdgeVector<Attribute> Rosebud::Ast::Definition::attributes |