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

#include <TerminalNode.hh>

Inheritance diagram for TerminalNode:
Inheritance graph
Collaboration diagram for TerminalNode:
Collaboration graph

Public Member Functions

 TerminalNode (int operandIndex)
 
 TerminalNode (const TerminalNode &other)
 
virtual ~TerminalNode ()
 
virtual GraphNodeclone () const
 
virtual int operandIndex () 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

int operandIndex_
 

Detailed Description

Input and output node of the operation DAG.

A MoveNode represents one input or output value of an operation.

Definition at line 47 of file TerminalNode.hh.

Constructor & Destructor Documentation

◆ TerminalNode() [1/2]

TerminalNode::TerminalNode ( int  operandIndex)

Constructor.

Definition at line 39 of file TerminalNode.cc.

Referenced by clone().

◆ TerminalNode() [2/2]

TerminalNode::TerminalNode ( const TerminalNode other)

Copoy constructor.

Definition at line 45 of file TerminalNode.cc.

45  :

◆ ~TerminalNode()

virtual TerminalNode::~TerminalNode ( )
inlinevirtual

Definition at line 53 of file TerminalNode.hh.

53 {}

Member Function Documentation

◆ clone()

GraphNode * TerminalNode::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 55 of file TerminalNode.cc.

55  {
56  return new TerminalNode(*this);
57 }

References TerminalNode().

Here is the call graph for this function:

◆ operandIndex()

int TerminalNode::operandIndex ( ) const
virtual

◆ toString()

std::string TerminalNode::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 65 of file TerminalNode.cc.

65  {
66  return "IO(" + Conversion::toString(operandIndex_) + ")";
67 }

References operandIndex_, and Conversion::toString().

Here is the call graph for this function:

Member Data Documentation

◆ operandIndex_

int TerminalNode::operandIndex_
private

Definition at line 62 of file TerminalNode.hh.

Referenced by operandIndex(), and toString().


The documentation for this class was generated from the following files:
TerminalNode::TerminalNode
TerminalNode(int operandIndex)
Definition: TerminalNode.cc:39
Conversion::toString
static std::string toString(const T &source)
OperationDAGNode
Definition: OperationDAGNode.hh:45
TerminalNode::operandIndex_
int operandIndex_
Definition: TerminalNode.hh:62
TerminalNode::operandIndex
virtual int operandIndex() const
Definition: TerminalNode.cc:60