OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
OperationNode Class Reference

#include <OperationNode.hh>

Inheritance diagram for OperationNode:
Inheritance graph
Collaboration diagram for OperationNode:
Collaboration graph

Public Member Functions

 OperationNode (Operation &operation)
 
 OperationNode (const OperationNode &other)
 
virtual GraphNodeclone () const
 
virtual ~OperationNode ()
 
OperationreferencedOperation () const
 
virtual std::string toString () const
 
- Public Member Functions inherited from OperationDAGNode
virtual ~OperationDAGNode ()
 
- Public Member Functions inherited from GraphNode
 GraphNode (int nodeID)
 
 GraphNode ()
 
virtual ~GraphNode ()
 
int nodeID () const
 
virtual std::string dotString () const
 

Private Attributes

OperationreferencedOperation_
 

Detailed Description

One operation node of the operation DAG.

Definition at line 47 of file OperationNode.hh.

Constructor & Destructor Documentation

◆ OperationNode() [1/2]

OperationNode::OperationNode ( Operation op)

Constructor.

Parameters

Definition at line 44 of file OperationNode.cc.

44  :
46 }

Referenced by clone().

◆ OperationNode() [2/2]

OperationNode::OperationNode ( const OperationNode other)

Definition at line 48 of file OperationNode.cc.

48  :
50 }

◆ ~OperationNode()

virtual OperationNode::~OperationNode ( )
inlinevirtual

Definition at line 54 of file OperationNode.hh.

54 {}

Member Function Documentation

◆ clone()

GraphNode * OperationNode::clone ( ) const
virtual

Clones node. Needed for dynamic binding, when copying instances through the base class.

Returns
Dynamically allocated copy of the node.

Reimplemented from GraphNode.

Definition at line 60 of file OperationNode.cc.

60  {
61  return new OperationNode(*this);
62 }

References OperationNode().

Here is the call graph for this function:

◆ referencedOperation()

Operation & OperationNode::referencedOperation ( ) const

◆ toString()

std::string OperationNode::toString ( ) const
virtual

Returns a node description as a string.

Used for printing graph into .dot file. This is used for a label in the default dotString() implementation.

Returns
The node ID as a string.

Reimplemented from GraphNode.

Definition at line 76 of file OperationNode.cc.

76  {
77  return referencedOperation_->name();
78 }

References Operation::name(), and referencedOperation_.

Referenced by OperationDAGBuilder::connectOperandToNode().

Here is the call graph for this function:

Member Data Documentation

◆ referencedOperation_

Operation* OperationNode::referencedOperation_
private

Definition at line 60 of file OperationNode.hh.

Referenced by referencedOperation(), and toString().


The documentation for this class was generated from the following files:
OperationNode::referencedOperation
Operation & referencedOperation() const
Definition: OperationNode.cc:70
Operation::name
virtual TCEString name() const
Definition: Operation.cc:93
assert
#define assert(condition)
Definition: Application.hh:86
OperationDAGNode
Definition: OperationDAGNode.hh:45
OperationNode::referencedOperation_
Operation * referencedOperation_
Definition: OperationNode.hh:60
OperationNode::OperationNode
OperationNode(Operation &operation)
Definition: OperationNode.cc:44