ROSE 0.11.145.192
Public Types | Public Member Functions | List of all members
AstSgNodeListAttribute Class Reference

Description

Definition at line 519 of file AstAttributeMechanism.h.

Inheritance diagram for AstSgNodeListAttribute:
Inheritance graph
[legend]
Collaboration diagram for AstSgNodeListAttribute:
Collaboration graph
[legend]

Public Types

typedef AstValueAttribute< std::vector< SgNode * > > Super
 
- Public Types inherited from AstValueAttribute< std::vector< SgNode * > >
typedef std::vector< SgNode * > Value
 Type of value this wrapper holds.
 
- Public Types inherited from AstAttribute
enum  OwnershipPolicy {
  CONTAINER_OWNERSHIP ,
  NO_OWNERSHIP ,
  CUSTOM_OWNERSHIP ,
  UNKNOWN_OWNERSHIP
}
 Who owns this attribute. More...
 

Public Member Functions

 AstSgNodeListAttribute (std::vector< SgNode * > &value)
 
 AstSgNodeListAttribute (const AstSgNodeListAttribute &other)
 
virtual AstAttributecopy () const override
 Virtual copy constructor.
 
virtual std::string attribute_class_name () const override
 Attribute class name.
 
std::vector< SgNode * > & getNodeList ()
 
void addNode (SgNode *n)
 
void setNode (SgNode *, int)
 
SgNodegetNode (int)
 
int size ()
 
- Public Member Functions inherited from AstValueAttribute< std::vector< SgNode * > >
 AstValueAttribute ()
 Default constructor.
 
 AstValueAttribute (const std::vector< SgNode * > &value)
 Constructs an attribute containing a specified value.
 
 AstValueAttribute (const AstValueAttribute &other)
 Copy constructor.
 
void set (const std::vector< SgNode * > &value)
 Assign a new value.
 
const std::vector< SgNode * > & get () const
 Return the stored value by reference.
 
std::vector< SgNode * > & get ()
 Return the stored value by reference.
 
- Public Member Functions inherited from AstAttribute
virtual OwnershipPolicy getOwnershipPolicy () const
 Who owns this attribute.
 
virtual AstAttributeconstructor () const
 Virtual default constructor.
 
virtual AstAttributecopy ()
 
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< AttributeEdgeInfoadditionalEdgeInfo ()
 DOT support.
 
virtual std::vector< AttributeNodeInfoadditionalNodeInfo ()
 DOT support.
 

Member Typedef Documentation

◆ Super

Definition at line 521 of file AstAttributeMechanism.h.

Constructor & Destructor Documentation

◆ AstSgNodeListAttribute() [1/3]

AstSgNodeListAttribute::AstSgNodeListAttribute ( )
inline

Definition at line 522 of file AstAttributeMechanism.h.

◆ AstSgNodeListAttribute() [2/3]

AstSgNodeListAttribute::AstSgNodeListAttribute ( std::vector< SgNode * > &  value)
inlineexplicit

Definition at line 523 of file AstAttributeMechanism.h.

◆ AstSgNodeListAttribute() [3/3]

AstSgNodeListAttribute::AstSgNodeListAttribute ( const AstSgNodeListAttribute other)
inline

Definition at line 524 of file AstAttributeMechanism.h.

Member Function Documentation

◆ copy()

virtual AstAttribute * AstSgNodeListAttribute::copy ( ) const
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 AstValueAttribute< std::vector< SgNode * > >.

Definition at line 525 of file AstAttributeMechanism.h.

◆ attribute_class_name()

virtual std::string AstSgNodeListAttribute::attribute_class_name ( ) const
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 AstValueAttribute< std::vector< SgNode * > >.

Definition at line 526 of file AstAttributeMechanism.h.

◆ getNodeList()

std::vector< SgNode * > & AstSgNodeListAttribute::getNodeList ( )
inline

Definition at line 527 of file AstAttributeMechanism.h.

◆ addNode()

void AstSgNodeListAttribute::addNode ( SgNode n)
inline

Definition at line 528 of file AstAttributeMechanism.h.

◆ size()

int AstSgNodeListAttribute::size ( )
inline

Definition at line 531 of file AstAttributeMechanism.h.


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