Abstract base class for all inports An Inport can be connected to an Outport. The approved connection can be determined by the canConnectTo function.
More...
#include <inport.h>
|
virtual bool | isConnected () const override |
|
virtual bool | isReady () const override |
|
void | setOptional (bool optional) |
|
bool | isOptional () const |
|
virtual bool | isChanged () const |
|
virtual bool | canConnectTo (const Port *port) const =0 |
|
virtual void | connectTo (Outport *outport) |
|
virtual void | disconnectFrom (Outport *outport) |
|
virtual bool | isConnectedTo (const Outport *outport) const |
|
virtual Outport * | getConnectedOutport () const |
|
virtual const std::vector< Outport * > & | getConnectedOutports () const |
|
virtual size_t | getMaxNumberOfConnections () const =0 |
|
virtual size_t | getNumberOfConnections () const |
|
virtual std::vector< const Outport * > | getChangedOutports () const |
|
virtual void | propagateEvent (Event *event, Outport *target=nullptr) |
|
template<typename T > |
const BaseCallBack * | onChange (T *o, void(T::*m)()) |
|
const BaseCallBack * | onChange (std::function< void()> lambda) |
|
template<typename T > |
const BaseCallBack * | onInvalid (T *o, void(T::*m)()) |
|
const BaseCallBack * | onInvalid (std::function< void()> lambda) |
|
const BaseCallBack * | onConnect (std::function< void()> lambda) |
|
const BaseCallBack * | onDisconnect (std::function< void()> lambda) |
|
void | removeOnChange (const BaseCallBack *callback) |
|
template<typename T > |
void | removeOnChange (T *o) |
|
void | removeOnInvalid (const BaseCallBack *callback) |
|
template<typename T > |
void | removeOnInvalid (T *o) |
|
void | removeOnConnect (const BaseCallBack *callback) |
|
void | removeOnDisconnect (const BaseCallBack *callback) |
|
std::string | getIdentifier () const |
|
void | setIdentifier (const std::string &name) |
|
Processor * | getProcessor () const |
|
virtual std::string | getClassIdentifier () const =0 |
|
virtual uvec3 | getColorCode () const =0 |
|
virtual Document | getInfo () const =0 |
|
virtual void | serialize (Serializer &s) const override |
|
virtual void | deserialize (Deserializer &d) override |
|
|
class | Outport |
|
class | Processor |
|
class | ProcessorNetwork |
|
class | ProcessorNetworkEvaluator |
|
Abstract base class for all inports An Inport can be connected to an Outport. The approved connection can be determined by the canConnectTo function.
◆ invalidate()
◆ isChanged()
bool inviwo::Inport::isChanged |
( |
| ) |
const |
|
virtual |
An inport is changed when it has new data, and it's processor has not been processed.
◆ isReady()
bool inviwo::Inport::isReady |
( |
| ) |
const |
|
overridevirtual |
◆ onChange()
template<typename T >
const BaseCallBack * inviwo::Inport::onChange |
( |
T * |
o, |
|
|
void(T::*)() |
m |
|
) |
| |
The on change call back is invoked before Processor::process after a port has been connected, disconnected, or has changed its validation level. Note it is only called if process is also going to be called.
◆ onInvalid()
template<typename T >
const BaseCallBack * inviwo::Inport::onInvalid |
( |
T * |
o, |
|
|
void(T::*)() |
m |
|
) |
| |
the onInvalid callback is called directly after the port has been invalidated. It's only called once for each transition from valid to invalid.
◆ propagateEvent()
void inviwo::Inport::propagateEvent |
( |
Event * |
event, |
|
|
Outport * |
target = nullptr |
|
) |
| |
|
virtual |
Propagate event upwards towards connected outports, if targets is nullptr, propagate the even to all connected outport, otherwise only to target.
◆ readyUpdate()
void inviwo::Inport::readyUpdate |
( |
| ) |
|
|
protected |
Called by the connected outports to let the inport know that their ready status has changed.
◆ setOptional()
void inviwo::Inport::setOptional |
( |
bool |
optional | ) |
|
An inport can be set optional, in which case the processor will by default be ready even if no outport is connected. This means that an optional inport may not have any connected outports when evaluating the ProcessorNetwork, i.e. when Processor::process() is called. Hence one needs to check manually that the port isReady before using it.
- See also
- isReady
◆ setValid()
void inviwo::Inport::setValid |
( |
const Outport * |
source | ) |
|
|
protectedvirtual |
The documentation for this class was generated from the following files: