ROSE  0.11.145.0
Public Types | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Rosebud::Ast::Class Class Reference

Description

Represents a class definition.

Definition at line 355 of file Ast.h.

#include <Rosebud/Ast.h>

Inheritance diagram for Rosebud::Ast::Class:
Inheritance graph
[legend]
Collaboration diagram for Rosebud::Ast::Class:
Collaboration graph
[legend]

Public Types

using Ptr = ClassPtr
 Shared-ownership pointer. More...
 
using Inheritance = std::vector< std::pair< std::string, std::string >>
 A list of access specifiers and class names used for class inheritance. More...
 
- Public Types inherited from Rosebud::Ast::Definition
using Ptr = DefinitionPtr
 Shared-ownership pointer. More...
 
- 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. More...
 
using UserBasePtr = std::shared_ptr< UserBase >
 Pointer to user's base class. More...
 
using TraversalEvent = Sawyer::Tree::TraversalEvent
 Alias for traversal events. More...
 

Static Public Member Functions

static Ptr instance ()
 Allocating constructor. More...
 

Public Attributes

EdgeVector< Propertyproperties
 Non-null list of zero or more properties. More...
 
Inheritance inheritance
 Information about base classes. More...
 
std::string endText
 Text after the last member definition. More...
 
Token endTextToken
 Token that encloses endText. More...
 
std::string tag
 If non-empty, overrides the tag name for this type. More...
 
- Public Attributes inherited from Rosebud::Ast::Definition
Token startToken
 Token at the start of the definition. More...
 
std::string name
 Unqualified name for the definition. More...
 
Token nameToken
 Token for the definition's unqualified name. More...
 
std::string doc
 Doxygen documentation comment. More...
 
Token docToken
 Token associated with the Doxygen comment. More...
 
Edge< CppStackcppStack
 C preprocessor pending conditional compilation directives. More...
 
std::string priorText
 Input text before the definition. More...
 
Token priorTextToken
 Token describing the location of the prior text. More...
 
EdgeVector< Attributeattributes
 Non-null pointer to the list of attributes controlling this property. More...
 
- Public Attributes inherited from Sawyer::Tree::Vertex< Node >
ReverseEdge parent
 Pointer to the parent in the tree. More...
 
EdgeBase * treeEdges_
 

Protected Member Functions

 Class ()
 Default constructor used only by derived classes. More...
 
- Protected Member Functions inherited from Rosebud::Ast::Definition
 Definition ()
 Default constructor used only by derived classes. More...
 
- Protected Member Functions inherited from Sawyer::Tree::Vertex< Node >
virtual void destructorHelper ()
 

Additional Inherited Members

- Public Member Functions inherited from Rosebud::Ast::Definition
AttributePtr findAttribute (const std::string &fqName)
 Finds an attribute with the specified fully qualified name. More...
 
- 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. More...
 
std::shared_ptr< T > isa ()
 Tests whether this object is a certain type. More...
 
auto traverseReverse (const Visitor &visitor)
 Traverse in reverse direction from children to parents. More...
 
auto traverse (const Visitor &visitor)
 Traverse in forward direction from parents to children. More...
 
auto traversePre (const Visitor &visitor)
 Pre-order forward traversal. More...
 
auto traversePost (const Visitor &visitor)
 Post-order forward traversal. More...
 
std::shared_ptr< T > findFirstAncestor ()
 Traversal that finds the closest ancestor of type T or derived from T. More...
 
std::shared_ptr< T > findLastAncestor ()
 Traversal that finds the farthest ancestor of type T or derived from T. More...
 
std::vector< std::shared_ptr< T > > findDescendants ()
 Traversal that finds all the descendants of a particular type. More...
 
UserBasePtr child (size_t i) const
 Returns the pointer for a child. More...
 
size_t nChildren () const
 Returns the number of children. More...
 

Member Typedef Documentation

Shared-ownership pointer.

Definition at line 358 of file Ast.h.

using Rosebud::Ast::Class::Inheritance = std::vector<std::pair<std::string , std::string>>

A list of access specifiers and class names used for class inheritance.

Definition at line 361 of file Ast.h.

Constructor & Destructor Documentation

Rosebud::Ast::Class::Class ( )
protected

Default constructor used only by derived classes.

Member Function Documentation

static Ptr Rosebud::Ast::Class::instance ( )
static

Allocating constructor.

Member Data Documentation

EdgeVector<Property> Rosebud::Ast::Class::properties

Non-null list of zero or more properties.

Definition at line 365 of file Ast.h.

Inheritance Rosebud::Ast::Class::inheritance

Information about base classes.

Definition at line 368 of file Ast.h.

std::string Rosebud::Ast::Class::endText

Text after the last member definition.

This is the input text that appears after the last property definition and before the end of the entire class definition. It ends just before the closing curly brace for the class definition. If the class has no properties, then this is the entire body of the class definition (everthing between the opening and closing curly braces, excluding the braces).

The text is modified by removing trailing white space from each line, replacing consecutive blank lines with a single blank line, and removing leading and trailing blank lines.

Definition at line 378 of file Ast.h.

Token Rosebud::Ast::Class::endTextToken

Token that encloses endText.

This generated token of type TOK_OTHER encloses the file content that produced endText.

Definition at line 383 of file Ast.h.

std::string Rosebud::Ast::Class::tag

If non-empty, overrides the tag name for this type.

Definition at line 386 of file Ast.h.


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