HAL
hal::ModulePin Class Reference

#include <module_pin.h>

Inheritance diagram for hal::ModulePin:
Inheritance graph
Collaboration diagram for hal::ModulePin:
Collaboration graph

Public Member Functions

 ModulePin (const u32 id, const std::string &name, Net *net, PinDirection direction, PinType type=PinType::none)
 
bool operator== (const ModulePin &other) const
 
bool operator!= (const ModulePin &other) const
 
Netget_net () const
 
- Public Member Functions inherited from hal::BasePin< ModulePin >
virtual ~BasePin ()=default
 
bool operator== (const BasePin &other) const
 
bool operator!= (const BasePin &other) const
 
ssize_t get_hash () const
 
u32 get_id () const
 
void set_name (const std::string &name)
 
const std::string & get_name () const
 
void set_direction (PinDirection direction)
 
PinDirection get_direction () const
 
void set_type (PinType type)
 
PinType get_type () const
 
const std::pair< PinGroup< ModulePin > *, i32 > & get_group () const
 

Additional Inherited Members

- Protected Member Functions inherited from hal::BasePin< ModulePin >
 BasePin (const u32 id, const std::string &name, PinDirection direction, PinType type=PinType::none)
 
- Protected Attributes inherited from hal::BasePin< ModulePin >
u32 m_id
 
std::string m_name
 
PinDirection m_direction
 
PinType m_type
 
std::pair< PinGroup< ModulePin > *, i32m_group
 

Detailed Description

The pin of a module. Each pin has a name, a direction, and a type and is associated with a net.

Definition at line 44 of file module_pin.h.

Constructor & Destructor Documentation

◆ ModulePin()

hal::ModulePin::ModulePin ( const u32  id,
const std::string &  name,
Net net,
PinDirection  direction,
PinType  type = PinType::none 
)

Construct a new module pin from its name, net, direction and type.

Parameters
[in]id- The pin ID.
[in]name- The pin name.
[in]net- The net passing through the pin.
[in]direction- The direction of the pin.
[in]type- The type of the pin.

Definition at line 5 of file module_pin.cpp.

Member Function Documentation

◆ get_net()

Net * hal::ModulePin::get_net ( ) const

Get the net passing through the pin.

Returns
The net of the pin.

Definition at line 19 of file module_pin.cpp.

Referenced by hal::ModulePinsTreeModel::handleModulePortsChanged(), hal::module_pin_init(), and operator==().

◆ operator!=()

bool hal::ModulePin::operator!= ( const ModulePin other) const

Check whether two module pins are unequal.

Parameters
[in]other- The module pin to compare against.
Returns
True if both module pins are unequal, false otherwise.

Definition at line 14 of file module_pin.cpp.

References operator==().

◆ operator==()

bool hal::ModulePin::operator== ( const ModulePin other) const

Check whether two module pins are equal.

Parameters
[in]other- The module pin to compare against.
Returns
True if both module pins are equal, false otherwise.

Definition at line 9 of file module_pin.cpp.

References hal::Net::get_id(), get_net(), and hal::BasePin< T >::operator==().

Referenced by operator!=().


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