33 typedef std::shared_ptr<Group>
GroupPtr;
45 virtual bool input()
const=0;
53 class Port:
public classdesc::Exclude<PortExclude>
71 std::vector<Wire*>
const&
wires()
const {
return m_wires;}
72 std::size_t
numWires()
const {
return m_wires.size();}
80 virtual bool input()
const {
return false;}
102 double value()
const;
110 bool input()
const override {
return true;}
122 #pragma omit RESTProcess minsky::PortExclude
virtual bool input() const
true if input port
std::vector< Wire * > const & wires() const
returns a vector of weak references to the wires attached to this port
Port(const Port &)=delete
void moveTo(float x, float y)
virtual bool input() const =0
virtual void combineInput(double &x, double y) const
combine two input wires
std::shared_ptr< VariableValue > getVariableValue() const
returns the variableValue associated with this port. May be null if not applicable ...
void setVariableValue(const std::shared_ptr< VariableValue > &v)
sets the VariableValue associated with this port. Only for output ports
void deleteWires()
delete all attached wires
double value() const
value associated with this port
Units checkUnits() const
dimensional analysis with consistency check
std::vector< Wire * > m_wires
Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky's state cha...
represents the units (in sense of dimensional analysis) of a variable.
components of Port excluded from reflection
PortExclude(const Item &item)
virtual bool multiWireAllowed() const
true if multiple wires are allowed to connect to an input port, such as an input port of an add opera...
void operator=(const Port &)=delete
std::shared_ptr< Group > GroupPtr
std::weak_ptr< VariableValue > variableValue
std::size_t numWires() const
Item & item()
owner of this port
virtual ~PortExclude()=default
void eraseWire(Wire *)
remove wire from wires. No ownership passed.
const Item & item() const
owner of this port
virtual double identity() const
input port value if no wire attached