Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::Outport Class Referenceabstract

Abstract base class for all outports The Outport can be connected to an arbitrary number of Inports. More...

#include <outport.h>

+ Inheritance diagram for inviwo::Outport:

Public Member Functions

virtual bool isConnected () const override
 
virtual bool isReady () const override
 
virtual void invalidate (InvalidationLevel invalidationLevel)
 
virtual InvalidationLevel getInvalidationLevel () const
 
virtual void propagateEvent (Event *event, Inport *source)
 
bool isConnectedTo (const Inport *port) const
 
const std::vector< Inport * > & getConnectedInports () const
 
const BaseCallBack * onConnect (std::function< void()> lambda)
 
const BaseCallBack * onDisconnect (std::function< void()> lambda)
 
void removeOnConnect (const BaseCallBack *callback)
 
void removeOnDisconnect (const BaseCallBack *callback)
 
virtual void setValid ()
 
virtual bool hasData () const =0
 
virtual void clear ()=0
 
- Public Member Functions inherited from inviwo::Port
 Port (const Port &)=delete
 
Portoperator= (const Port &)=delete
 
 Port (Port &&)=delete
 
Portoperator= (Port &&)=delete
 
const std::string & getIdentifier () const
 
void setIdentifier (const std::string &name)
 
ProcessorgetProcessor () const
 
std::string getPath () const
 Get the port path i.e. <processor identifier>.<port identifier>
 
void getPath (std::pmr::string &out) const
 
virtual std::string_view getClassIdentifier () const =0
 
virtual glm::uvec3 getColorCode () const =0
 
virtual Document getInfo () const =0
 
const DocumentgetHelp () const
 
DocumentgetHelp ()
 
PortsetHelp (Document help)
 
virtual void serialize (Serializer &s) const override
 
virtual void deserialize (Deserializer &d) override
 
- Public Member Functions inherited from inviwo::Serializable

Protected Member Functions

 Outport (std::string_view identifier, Document help)
 
virtual void connectTo (Inport *port)
 
virtual void disconnectFrom (Inport *port)
 
- Protected Member Functions inherited from inviwo::Port
 Port (std::string_view identifier, Document help)
 
void setProcessor (Processor *processor)
 

Protected Attributes

StateCoordinator< bool > isReady_
 
InvalidationLevel invalidationLevel_
 
std::vector< Inport * > connectedInports_
 
CallBackList onConnectCallback_
 
CallBackList onDisconnectCallback_
 
- Protected Attributes inherited from inviwo::Port
std::string identifier_
 
Processorprocessor_
 
Document help_
 

Friends

class Inport
 
class Processor
 

Detailed Description

Abstract base class for all outports The Outport can be connected to an arbitrary number of Inports.

Constructor & Destructor Documentation

◆ Outport()

inviwo::Outport::Outport ( std::string_view identifier,
Document help )
protected
Note
The internal isReady_ lambda function must be set by derived class, e.g., perform isReady_.setUpdate(...) in the constructor of your derived class as in DataOutport.

Member Function Documentation

◆ clear()

◆ hasData()

◆ invalidate()

virtual void inviwo::Outport::invalidate ( InvalidationLevel invalidationLevel)
virtual

Called by Processor::invalidate, will invalidate its connected inports.

Note
Port is set to valid after its processor successfully finish processing.
See also
setValid

Reimplemented in inviwo::BrushingAndLinkingOutport, and inviwo::ImageOutport.

◆ isConnected()

virtual bool inviwo::Outport::isConnected ( ) const
overridevirtual

Implements inviwo::Port.

◆ isReady()

virtual bool inviwo::Outport::isReady ( ) const
overridevirtual

An outport is ready if it has data and is valid. The port is set valid after its processor successfully finishes processing.

See also
invalidate
setValid

Implements inviwo::Port.

◆ onConnect()

const BaseCallBack * inviwo::Outport::onConnect ( std::function< void()> lambda)

Called each time connected to an inport.

◆ onDisconnect()

const BaseCallBack * inviwo::Outport::onDisconnect ( std::function< void()> lambda)

Called each time disconnected from an inport.

◆ propagateEvent()

virtual void inviwo::Outport::propagateEvent ( Event * event,
Inport * source )
virtual

Propagate events upwards, i.e. to the owning processor.

Reimplemented in inviwo::ImageOutport.

◆ setValid()

virtual void inviwo::Outport::setValid ( )
virtual

Called by Processor::setValid, will call setValid its connected inports.

Reimplemented in inviwo::BrushingAndLinkingOutport.


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