Minsky
minsky::anonymous_namespace{operation.cc}::OrInputPort Struct Reference
Inheritance diagram for minsky::anonymous_namespace{operation.cc}::OrInputPort:
Inheritance graph
Collaboration diagram for minsky::anonymous_namespace{operation.cc}::OrInputPort:
Collaboration graph

Public Member Functions

void combineInput (double &x, double y) const override
 combine two input wires More...
 
 OrInputPort (Item &item)
 
- Public Member Functions inherited from minsky::MultiWireInputPort
bool multiWireAllowed () const override
 true if multiple wires are allowed to connect to an input port, such as an input port of an add operation. Irrelevant, otherwise More...
 
 MultiWireInputPort (Item &item)
 
- Public Member Functions inherited from minsky::InputPort
bool input () const override
 true if input port More...
 
 InputPort (Item &item)
 
- Public Member Functions inherited from minsky::Port
std::vector< Wire * > const & wires () const
 returns a vector of weak references to the wires attached to this port More...
 
std::size_t numWires () const
 
void eraseWire (Wire *)
 remove wire from wires. No ownership passed. More...
 
void deleteWires ()
 delete all attached wires More...
 
virtual double identity () const
 input port value if no wire attached More...
 
float x () const
 
float y () const
 
void moveTo (float x, float y)
 
 Port (Item &item)
 
 ~Port ()
 
double value () const
 value associated with this port More...
 
Units units (bool) const
 
Units checkUnits () const
 dimensional analysis with consistency check More...
 
Itemitem ()
 owner of this port More...
 
const Itemitem () const
 owner of this port More...
 

Detailed Description

Definition at line 78 of file operation.cc.

Constructor & Destructor Documentation

◆ OrInputPort()

minsky::anonymous_namespace{operation.cc}::OrInputPort::OrInputPort ( Item item)
inline

Definition at line 81 of file operation.cc.

MultiWireInputPort(Item &item)
Definition: port.h:117
Item & item()
owner of this port
Definition: port.h:66

Member Function Documentation

◆ combineInput()

void minsky::anonymous_namespace{operation.cc}::OrInputPort::combineInput ( double &  x,
double  y 
) const
inlineoverridevirtual

combine two input wires

Parameters
xinput to be updated
yinput to be combined with x

Reimplemented from minsky::Port.

Definition at line 80 of file operation.cc.

80 {x=(x>0.5)||(y>0.5);}
float y() const
Definition: port.cc:44
float x() const
Definition: port.cc:39

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