SILICON
Loading...
Searching...
No Matches
Bus Class Reference

#include <wire.hpp>

Public Member Functions

 Bus ()=default
 Bus (unsigned short size)
 Bus (std::vector< Wire_ptr > busData)
 Bus (std::initializer_list< Wire > initList)
 Bus (std::initializer_list< Wire_ptr > initList)
void setSize (unsigned short size)
bool forceSetCurrentValue (const BusValue &value)
bool forceSetCurrentValue (const BusValue &value, const Component_weakPtr &authorizedBy)
 Forces the bus value without authorization check.
bool setCurrentValue (const BusValue &value, const Component_weakPtr &requestedBy)
BusValue getCurrentValue () const
bool isInErrorState () const
bool hasUnknowns () const
bool sharesWireWith (const Bus &other) const
const Wire_ptr & operator[] (const unsigned short index) const
Wire_ptr & operator[] (const unsigned short index)
 operator std::vector< Wire_ptr > () const
 operator std::vector< Wire_ptr > ()
auto begin ()
auto end ()
auto begin () const
auto end () const
auto size ()
auto size () const
bool operator== (const Bus &other) const
std::strong_ordering operator<=> (const Bus &other) const

Private Attributes

std::vector< Wire_ptr > busData

Detailed Description

Definition at line 138 of file wire.hpp.

Constructor & Destructor Documentation

◆ Bus() [1/5]

Bus ( )
default

◆ Bus() [2/5]

Bus ( unsigned short size)
explicit

Definition at line 456 of file wire.cpp.

◆ Bus() [3/5]

Bus ( std::vector< Wire_ptr > busData)
explicit

Definition at line 471 of file wire.cpp.

◆ Bus() [4/5]

Bus ( std::initializer_list< Wire > initList)

Definition at line 479 of file wire.cpp.

◆ Bus() [5/5]

Bus ( std::initializer_list< Wire_ptr > initList)

Definition at line 474 of file wire.cpp.

Member Function Documentation

◆ begin() [1/2]

auto begin ( )
inline

Definition at line 177 of file wire.hpp.

◆ begin() [2/2]

auto begin ( ) const
inlinenodiscard

Definition at line 180 of file wire.hpp.

◆ end() [1/2]

auto end ( )
inline

Definition at line 178 of file wire.hpp.

◆ end() [2/2]

auto end ( ) const
inlinenodiscard

Definition at line 181 of file wire.hpp.

◆ forceSetCurrentValue() [1/2]

bool forceSetCurrentValue ( const BusValue & value)

Definition at line 487 of file wire.cpp.

◆ forceSetCurrentValue() [2/2]

bool forceSetCurrentValue ( const BusValue & value,
const Component_weakPtr & authorizedBy )
nodiscard

Forces the bus value without authorization check.

Parameters
valueThe value to set
authorizedByThe component that authorized this change
Returns
Non-zero if value exceeds bus size (overflow), zero otherwise

Definition at line 501 of file wire.cpp.

◆ getCurrentValue()

BusValue getCurrentValue ( ) const
nodiscard

Definition at line 530 of file wire.cpp.

◆ hasUnknowns()

bool hasUnknowns ( ) const
nodiscard

Definition at line 545 of file wire.cpp.

◆ isInErrorState()

bool isInErrorState ( ) const
nodiscard

Definition at line 538 of file wire.cpp.

◆ operator std::vector< Wire_ptr >() [1/2]

operator std::vector< Wire_ptr > ( )
inlineexplicit

Definition at line 175 of file wire.hpp.

◆ operator std::vector< Wire_ptr >() [2/2]

operator std::vector< Wire_ptr > ( ) const
inlineexplicit

Definition at line 174 of file wire.hpp.

◆ operator<=>()

std::strong_ordering operator<=> ( const Bus & other) const

Definition at line 566 of file wire.cpp.

◆ operator==()

bool operator== ( const Bus & other) const

Definition at line 582 of file wire.cpp.

◆ operator[]() [1/2]

Wire_ptr & operator[] ( const unsigned short index)
inline

Definition at line 172 of file wire.hpp.

◆ operator[]() [2/2]

const Wire_ptr & operator[] ( const unsigned short index) const
inline

Definition at line 169 of file wire.hpp.

◆ setCurrentValue()

bool setCurrentValue ( const BusValue & value,
const Component_weakPtr & requestedBy )
nodiscard

Definition at line 516 of file wire.cpp.

◆ setSize()

void setSize ( unsigned short size)

Definition at line 463 of file wire.cpp.

◆ sharesWireWith()

bool sharesWireWith ( const Bus & other) const
nodiscard

Definition at line 552 of file wire.cpp.

◆ size() [1/2]

auto size ( )
inlinenodiscard

Definition at line 183 of file wire.hpp.

◆ size() [2/2]

auto size ( ) const
inlinenodiscard

Definition at line 184 of file wire.hpp.

Member Data Documentation

◆ busData

std::vector<Wire_ptr> busData
private

Definition at line 140 of file wire.hpp.


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