OpenASIP  2.0
GraphNode.icc
Go to the documentation of this file.
1 /**
2  * @file GraphNode.icc
3  *
4  * Prototype of graph-based program representation: inline implementation of
5  * node.
6  *
7  * @author Heikki Kultala 2008 (hkultala@cs.tut.fi)
8  * @note rating: red
9  */
10 
11 /**
12  * Returns a node ID as integer.
13  *
14  * This id is unique among all the nodes in the graph.
15  *
16  * @return The nodeID as integer.
17  */
18 int
19 GraphNode::nodeID() const {
20  return nodeID_;
21 }
22 
23 /**
24  * Comparison based on node ID's for maps and sets.
25  */
26 bool
27 GraphNode::Comparator::operator()(
28  const GraphNode* mn1, const GraphNode* mn2) const {
29  return mn1->nodeID() < mn2->nodeID();
30 }