NanoTekSpice
DigitalElectronics
Public Member Functions | List of all members
C4030 Class Reference

Quad 2-input EXCLUSIVE-OR gate. More...

#include <C4030.hpp>

Inheritance diagram for C4030:
Component::MyComponent nts::IComponent

Public Member Functions

 C4030 ()
 Component 4030 Constructor. More...
 
 ~C4030 ()
 Component 4030 Destructor.
 
nts::Tristate compute (std::size_t pin=1) override
 Compute. More...
 
void setLink (std::size_t pin, nts::IComponent &other, std::size_t otherPin) final
 Set link method. More...
 
void dump () const noexcept override
 Display information. More...
 
void setInput (std::size_t pin, nts::IComponent &other, std::size_t otherPin) final
 Set input link method. More...
 
void setOutput (std::size_t pin, nts::IComponent &other, std::size_t otherPin) final
 Set output link method. More...
 
- Public Member Functions inherited from Component::MyComponent
 MyComponent (const nts::Type &type)
 
void createAllComponents (const std::vector< Component::ComponentSetting > &settings)
 
virtual void setState (const std::string &state)
 
virtual void setState (const std::string &name, const std::string &state)
 
const std::string & getName () const noexcept final
 
void setName (const std::string &name) noexcept final
 
const nts::Type & getType () const noexcept final
 
void displayState (std::size_t) const noexcept override
 
- Public Member Functions inherited from nts::IComponent
virtual void createAllComponents (const std::vector< Component::ComponentSetting > &settings)=0
 

Additional Inherited Members

- Protected Attributes inherited from Component::MyComponent
std::string _name
 
nts::Type _type
 

Detailed Description

Quad 2-input EXCLUSIVE-OR gate.

Constructor & Destructor Documentation

◆ C4030()

C4030::C4030 ( )

Component 4030 Constructor.

Initializes four EXCLUSIVE-OR gates with their own output and input pins.

Member Function Documentation

◆ compute()

nts::Tristate C4030::compute ( std::size_t  pin = 1)
overridevirtual

Compute.

Searches for the door containing the requested pin and calculates the exit status.

Parameters
pinPin requested
Returns
Output's door state. Can be true, false or undefined

Implements nts::IComponent.

◆ dump()

void C4030::dump ( ) const
overridevirtualnoexcept

Display information.

Display all pins state and link of component 4030

Implements nts::IComponent.

◆ setInput()

void C4030::setInput ( std::size_t  pin,
nts::IComponent other,
std::size_t  otherPin 
)
finalvirtual

Set input link method.

Method call by another component to bind to component 4030's input

Parameters
pinPin linked
otherOther Component
otherPinOhter component pin

Implements nts::IComponent.

◆ setLink()

void C4030::setLink ( std::size_t  pin,
nts::IComponent other,
std::size_t  otherPin 
)
finalvirtual

Set link method.

Link this component to another

Parameters
pinComponent pin that needs to be linked
otherThe other Component
otherPinThe other component pin

Implements nts::IComponent.

◆ setOutput()

void C4030::setOutput ( std::size_t  pin,
nts::IComponent other,
std::size_t  otherPin 
)
finalvirtual

Set output link method.

Method call by another component to bind to component 4030's output

Parameters
pinPin linked
otherOther Component
otherPinOhter component pin

Implements nts::IComponent.


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