HAL
hal::Node Class Reference

The Node class object represents a module or a gate. More...

#include <gui_def.h>

Collaboration diagram for hal::Node:
Collaboration graph

Public Types

enum  NodeType { None , Module , Gate }
 

Public Member Functions

 Node (u32 i=0, NodeType t=None)
 
NodeType type () const
 type getter for type information More...
 
u32 id () const
 id getter for ID information More...
 
bool isNull () const
 isNull test for null-Node object typically returned from functions More...
 
bool isGate () const
 isGate test whether node is a gate More...
 
bool isModule () const
 isModule test wheter node is a module More...
 
bool operator< (const Node &rhs) const
 operator < to provide an ordering scheme for maps and ordered lists More...
 
bool operator== (const Node &rhs) const
 operator == to test whether two nodes are equal More...
 
bool operator!= (const Node &rhs) const
 operator != to test whether two nodes are not equal More...
 

Detailed Description

The Node class object represents a module or a gate.

The Node class has two private members, the Id and the type which is of type Module or Gate. Node objects can be compared, used as Hash keys or returned by functions. For the latter case there is a null-Node object (type==None) to be returned if the function failed to find an appropriate node.

Definition at line 60 of file gui_def.h.

Member Enumeration Documentation

◆ NodeType

Enumerator
None 
Module 
Gate 

Definition at line 63 of file gui_def.h.

Constructor & Destructor Documentation

◆ Node()

hal::Node::Node ( u32  i = 0,
NodeType  t = None 
)
inline

Definition at line 65 of file gui_def.h.

Member Function Documentation

◆ id()

◆ isGate()

bool hal::Node::isGate ( ) const
inline

isGate test whether node is a gate

Returns
true if node is a gate

Definition at line 89 of file gui_def.h.

References Gate.

Referenced by hal::NodeBoxes::addBox(), hal::CommentEntry::dump(), hal::GridPlacement::setGatePosition(), and hal::GridPlacement::setModulePosition().

◆ isModule()

bool hal::Node::isModule ( ) const
inline

isModule test wheter node is a module

Returns
true if node is a module

Definition at line 95 of file gui_def.h.

References Module.

Referenced by hal::NodeBoxes::addBox(), hal::NetlistRelay::addToModuleDialog(), and hal::WaitToBeSeatedEntry::isModule().

◆ isNull()

bool hal::Node::isNull ( ) const
inline

◆ operator!=()

bool hal::Node::operator!= ( const Node rhs) const
inline

operator != to test whether two nodes are not equal

Parameters
rhsthe other Node to be compared with
Returns
true if nodes have either different type or different ID

Definition at line 126 of file gui_def.h.

◆ operator<()

bool hal::Node::operator< ( const Node rhs) const
inline

operator < to provide an ordering scheme for maps and ordered lists

Parameters
rhsthe other Node to be compared with
Returns
true if node is 'smaller' according to test

Definition at line 102 of file gui_def.h.

◆ operator==()

bool hal::Node::operator== ( const Node rhs) const
inline

operator == to test whether two nodes are equal

Parameters
rhsthe other Node to be compared with
Returns
true if nodes are of same type and have same ID

Definition at line 116 of file gui_def.h.

◆ type()


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