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

#include <MoveNodeSet.hh>

Collaboration diagram for MoveNodeSet:
Collaboration graph

Public Member Functions

 MoveNodeSet ()
 
int count () const
 
MoveNodeat (int index)
 
void addMoveNode (MoveNode &)
 
void removeMoveNode (MoveNode &)
 
std::string toString () const
 
std::vector< MoveNode * >::iterator begin ()
 
std::vector< MoveNode * >::iterator end ()
 

Private Attributes

std::vector< MoveNode * > moveNodes_
 

Detailed Description

Definition at line 41 of file MoveNodeSet.hh.

Constructor & Destructor Documentation

◆ MoveNodeSet()

MoveNodeSet::MoveNodeSet ( )

Fairly empty constructor.

Definition at line 38 of file MoveNodeSet.cc.

38  {
39  }

Member Function Documentation

◆ addMoveNode()

void MoveNodeSet::addMoveNode ( MoveNode newMove)

Add MoveNode to the MoveNodeSet

Parameters
newMoveNew MoveNode to add to set

Definition at line 62 of file MoveNodeSet.cc.

62  {
63  for (std::vector<MoveNode*>::iterator i = moveNodes_.begin();
64  i != moveNodes_.end(); i++) {
65  if (*i == &newMove) {
66  return; // already in the set. please even play to be a set if named a set
67  }
68  }
69  moveNodes_.push_back(&newMove);
70 }

References moveNodes_.

Referenced by ProgramOperation::addInputNode(), ProgramOperation::addOutputNode(), SequentialScheduler::scheduleMove(), BasicBlockScheduler::scheduleMove(), SequentialScheduler::scheduleOperation(), and BasicBlockScheduler::scheduleOperation().

◆ at()

MoveNode& MoveNodeSet::at ( int  index)
inline

◆ begin()

std::vector<MoveNode*>::iterator MoveNodeSet::begin ( )
inline

Definition at line 51 of file MoveNodeSet.hh.

51 { return moveNodes_.begin(); }

References moveNodes_.

Referenced by ExecutionPipelineResource::nodeOfInputPort().

◆ count()

int MoveNodeSet::count ( ) const
inline

◆ end()

std::vector<MoveNode*>::iterator MoveNodeSet::end ( )
inline

Definition at line 52 of file MoveNodeSet.hh.

52 { return moveNodes_.end(); }

References moveNodes_.

◆ removeMoveNode()

void MoveNodeSet::removeMoveNode ( MoveNode node)

Definition at line 73 of file MoveNodeSet.cc.

73  {
74  for (std::vector<MoveNode*>::iterator i = moveNodes_.begin();
75  i != moveNodes_.end(); i++) {
76  if (*i == &node) {
77  moveNodes_.erase(i);
78  return;
79  }
80  }
81  throw IllegalRegistration(
82  __FILE__,__LINE__,__func__,"MoveNode not in MoveNodeSet");
83 }

References __func__, and moveNodes_.

Referenced by ProgramOperation::removeInputNode(), and ProgramOperation::removeOutputNode().

◆ toString()

std::string MoveNodeSet::toString ( ) const

Returns the disassembly of the moves in the set in a single line.

Returns
the disassembly.

Definition at line 48 of file MoveNodeSet.cc.

48  {
49  std::string disasm = "";
50  for (int i = 0; i < count(); ++i) {
51  disasm += moveNodes_.at(i)->toString() + " ; ";
52  }
53  return disasm;
54 }

References count(), and moveNodes_.

Here is the call graph for this function:

Member Data Documentation

◆ moveNodes_

std::vector<MoveNode*> MoveNodeSet::moveNodes_
private

Definition at line 55 of file MoveNodeSet.hh.

Referenced by addMoveNode(), begin(), end(), removeMoveNode(), and toString().


The documentation for this class was generated from the following files:
__func__
#define __func__
Definition: Application.hh:67
MoveNodeSet::moveNodes_
std::vector< MoveNode * > moveNodes_
Definition: MoveNodeSet.hh:55
IllegalRegistration
Definition: Exception.hh:532
MoveNodeSet::count
int count() const