Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::DataOutport< T > Class Template Reference

#include <inviwo/core/ports/dataoutport.h>

+ Inheritance diagram for inviwo::DataOutport< T >:

Public Types

using type = T
 

Public Member Functions

virtual void clear () override
 
 DataOutport (const DataOutport &)=delete
 
 DataOutport (DataOutport &&)=delete
 
 DataOutport (std::string_view identifier, Document help={})
 
virtual std::shared_ptr< const T > detachData ()
 
virtual std::string_view getClassIdentifier () const override
 
virtual glm::uvec3 getColorCode () const override
 
virtual std::shared_ptr< const T > getData () const
 
virtual DataInfo getDataInfo () const override
 
virtual Document getInfo () const override
 
virtual bool hasData () const override
 
DataOutportoperator= (const DataOutport &)=delete
 
DataOutportoperator= (DataOutport &&)=delete
 
virtual void setData (const T *data)
 
virtual void setData (std::shared_ptr< const T > data)
 
template<typename U = T, typename = std::enable_if_t<std::is_move_constructible_v<U>>>
void setData (T &&data)
 
- Public Member Functions inherited from inviwo::Outport
const std::vector< Inport * > & getConnectedInports () const
 
virtual void invalidate (InvalidationLevel invalidationLevel)
 
virtual bool isConnected () const override
 
bool isConnectedTo (const Inport *port) const
 
virtual bool isReady () const override
 
const BaseCallBack * onConnect (std::function< void()> lambda)
 
const BaseCallBack * onDisconnect (std::function< void()> lambda)
 
virtual void propagateEvent (Event *event, Inport *source)
 
void removeOnConnect (const BaseCallBack *callback)
 
void removeOnDisconnect (const BaseCallBack *callback)
 
virtual void setValid ()
 
- Public Member Functions inherited from inviwo::Port
virtual void deserialize (Deserializer &d) override
 
DocumentgetHelp ()
 
const DocumentgetHelp () const
 
const std::string & getIdentifier () const
 
std::string getPath () const
 Get the port path i.e. <processor identifier>.<port identifier>
 
void getPath (std::pmr::string &out) const
 
ProcessorgetProcessor () const
 
Portoperator= (const Port &)=delete
 
Portoperator= (Port &&)=delete
 
 Port (const Port &)=delete
 
 Port (Port &&)=delete
 
virtual void serialize (Serializer &s) const override
 
PortsetHelp (Document help)
 
void setIdentifier (const std::string &name)
 

Protected Attributes

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

Additional Inherited Members

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

Detailed Description

template<typename T>
class inviwo::DataOutport< T >

DataOutport hold data of type T

Member Function Documentation

◆ clear()

template<typename T >
void inviwo::DataOutport< T >::clear ( )
overridevirtual

Clear the outport of any data

Implements inviwo::Outport.

Reimplemented in inviwo::ImageOutport.

◆ detachData()

template<typename T >
std::shared_ptr< const T > inviwo::DataOutport< T >::detachData ( )
virtual

Return data and release ownership. Data in the port will be nullptr after call.

Reimplemented in inviwo::ImageOutport.

◆ getClassIdentifier()

template<typename T >
std::string_view inviwo::DataOutport< T >::getClassIdentifier ( ) const
overridevirtual

Implements inviwo::Port.

◆ getColorCode()

template<typename T >
glm::uvec3 inviwo::DataOutport< T >::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.

◆ getDataInfo()

template<typename T >
DataInfo inviwo::DataOutport< T >::getDataInfo ( ) const
overridevirtual

Implements inviwo::Port.

◆ getInfo()

template<typename T >
Document inviwo::DataOutport< T >::getInfo ( ) const
overridevirtual

This function should describe the state of the port and the data it holds. Derived ports should extend this function and add information about their state. The port help is usually included in this information. The description is usually shown as a tooltip in the GUI.

Implements inviwo::Port.

Reimplemented in inviwo::ImageOutport.

◆ hasData()

template<typename T >
bool inviwo::DataOutport< T >::hasData ( ) const
overridevirtual

Query if the outport has any data

Implements inviwo::Outport.

◆ setData()

template<typename T >
template<typename , typename >
void inviwo::DataOutport< T >::setData ( T && data)

Pass data along to the port using the Move constructor. Example:

++
void SomeProcessor::process() {
std::vector<vec3> points;
myPort_.setData(std::move(points));
}

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