Inviwo  0.9.10.1
Inviwo documentation
inviwo::DataInport< T, N, Flat > Class Template Reference

#include <datainport.h>

+ Inheritance diagram for inviwo::DataInport< T, N, Flat >:

Public Types

using type = T
 

Public Member Functions

 DataInport (std::string identifier)
 
virtual std::string getClassIdentifier () const override
 
virtual uvec3 getColorCode () const override
 
virtual Document getInfo () const override
 
virtual size_t getMaxNumberOfConnections () const override
 
virtual bool canConnectTo (const Port *port) const override
 
virtual void connectTo (Outport *port) override
 
virtual bool isConnected () const override
 
virtual std::shared_ptr< const T > getData () const
 
virtual std::vector< std::shared_ptr< const T > > getVectorData () const
 
virtual std::vector< std::pair< Outport *, std::shared_ptr< const T > > > getSourceVectorData () const
 
bool hasData () const
 
- Public Member Functions inherited from inviwo::Inport
virtual bool isReady () const override
 
void setOptional (bool optional)
 
bool isOptional () const
 
virtual bool isChanged () const
 
virtual void disconnectFrom (Outport *outport)
 
virtual bool isConnectedTo (const Outport *outport) const
 
virtual OutportgetConnectedOutport () const
 
virtual const std::vector< Outport * > & getConnectedOutports () const
 
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)
 
- Public Member Functions inherited from inviwo::Port
std::string getIdentifier () const
 
void setIdentifier (const std::string &name)
 
ProcessorgetProcessor () const
 
virtual void serialize (Serializer &s) const override
 
virtual void deserialize (Deserializer &d) override
 
- Public Member Functions inherited from inviwo::InportIterable< T, Flat >
 InportIterable (std::vector< Outport * > *connections)
 
const_iterator begin () const
 
const_iterator end () const
 

Additional Inherited Members

- Protected Member Functions inherited from inviwo::Inport
 Inport (std::string identifier="")
 
virtual void invalidate (InvalidationLevel invalidationLevel)
 
virtual void setValid (const Outport *source)
 
void readyUpdate ()
 
virtual void setChanged (bool changed=true, const Outport *source=nullptr)
 
void callOnChangeIfChanged () const
 
- Protected Member Functions inherited from inviwo::Port
 Port (std::string identifier="")
 
void setProcessor (Processor *processor)
 
- Protected Attributes inherited from inviwo::Inport
StateCoordinator< bool > isReady_
 
StateCoordinator< bool > isOptional_
 
std::vector< Outport * > connectedOutports_
 
- Protected Attributes inherited from inviwo::Port
std::string identifier_
 
Processorprocessor_
 

Detailed Description

template<typename T, size_t N = 1, bool Flat = false>
class inviwo::DataInport< T, N, Flat >

DataInport represents a general inport providing data as a std:shared_ptr<const T> If N is set to 0 the port will accept multiple connections, and will provide a std::vector<std::shared_ptr<const T>> of data. If N is larger then 1 exaclyt that many connections are accepted. If Flat is set to true, the inport will also accept connections from outport with vector data of type T and merge them into the data return data vector.

Member Function Documentation

◆ getColorCode()

template<typename T , size_t N, bool Flat>
uvec3 DataInport< T, N, Flat >::getColorCode ( ) const
overridevirtual

Returns the RGB color code used to colorize all ports of this type. This color code is for instance used in the NetworkEditor. To distinguish different port types through their color, this method should be overloaded in derived classes.

Implements inviwo::Port.


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