ROSE 0.11.145.147
|
Attribute containing a regex expression as a string.
An AstRegExAttribute is added to each part of an AST tree pattern specification to a RegEx tree.
Definition at line 484 of file AstAttributeMechanism.h.
#include <midend/astProcessing/AstAttributeMechanism.h>
Public Member Functions | |
AstRegExAttribute (const std::string &s) | |
virtual AstAttribute * | copy () const override |
Virtual copy constructor. | |
virtual std::string | attribute_class_name () const override |
Attribute class name. | |
Public Member Functions inherited from AstAttribute | |
virtual OwnershipPolicy | getOwnershipPolicy () const |
Who owns this attribute. | |
virtual AstAttribute * | constructor () const |
Virtual default constructor. | |
virtual AstAttribute * | copy () |
virtual std::string | toString () |
Convert an attribute to a string. | |
virtual bool | commentOutNodeInGraph () |
Eliminate IR nodes in DOT graphs. | |
virtual int | packed_size () |
Packing support. | |
virtual char * | packed_data () |
Packing support. | |
virtual void | unpacked_data (int size, char *data) |
Packing support. | |
virtual std::string | additionalNodeOptions () |
DOT support. | |
virtual std::vector< AttributeEdgeInfo > | additionalEdgeInfo () |
DOT support. | |
virtual std::vector< AttributeNodeInfo > | additionalNodeInfo () |
DOT support. | |
Public Attributes | |
std::string | expression |
Additional Inherited Members | |
Public Types inherited from AstAttribute | |
enum | OwnershipPolicy { CONTAINER_OWNERSHIP , NO_OWNERSHIP , CUSTOM_OWNERSHIP , UNKNOWN_OWNERSHIP } |
Who owns this attribute. More... | |
|
inline |
Definition at line 488 of file AstAttributeMechanism.h.
|
inlineexplicit |
Definition at line 490 of file AstAttributeMechanism.h.
|
inlineoverridevirtual |
Virtual copy constructor.
Copy-constructs a new object on the heap and returns its pointer. All subclasses must implement this in order to instantiate the correct dynamic type, although many don't. If this copy method returns a null pointer (like the base implementation) then the attribute is not copied as part of copying its container. E.g., an attribute stored in an AST will not be copied when the AST is copied if that attribute is directly derived from AstAttribute and fails to implement copy. If a subclass fails to implement copy and inherits from a class that does implement a copy that returns non-null, then the copied attribute will have an incorrect dynamic type.
It would be nice if we could make this pure virtual, but unfortunately ROSETTA-generated code fails to compile because it generates an instantiation of this interface (whether or not that code is ever executed is unkown). [Robb Matzke 2015-11-10]
Reimplemented from AstAttribute.
Definition at line 493 of file AstAttributeMechanism.h.
|
inlineoverridevirtual |
Attribute class name.
Returns the name of the dynamic type. All subclasses must implement this in order to return the correct type name, although many don't. If a subclass fails to implement this then it will return an incorrect class name.
It would be nice if this could be pure virtual, but unfortunately ROSETTA-generated code fails to compile because it generates an instantiation of this interface (whether or not that code is ever executed is unknown). [Robb Matzke 2015-11-10]
Reimplemented from AstAttribute.
Definition at line 497 of file AstAttributeMechanism.h.
std::string AstRegExAttribute::expression |
Definition at line 486 of file AstAttributeMechanism.h.