Lluvia
ll::Node Class Referenceabstract

#include <Node.h>

Inheritance diagram for ll::Node:

Public Member Functions

virtual ~Node ()=default
 
void setState (const ll::NodeState tState)
 
ll::NodeState getState () const noexcept
 
void init ()
 
virtual ll::NodeType getType () const noexcept=0
 Gets the node type. More...
 
virtual bool hasPort (const std::string &name) const noexcept=0
 Returns whether or not a port exists with a given name. More...
 
virtual std::shared_ptr< ll::ObjectgetPort (const std::string &name) const =0
 Gets a port descriptor given its name. More...
 
virtual void setParameter (const std::string &name, const ll::Parameter &value)=0
 Sets a parameter. More...
 
virtual const ll::ParametergetParameter (const std::string &name) const =0
 Gets a parameter. More...
 
virtual void bind (const std::string &name, const std::shared_ptr< ll::Object > &obj)=0
 Binds a ll::Object as port index for this node. More...
 
virtual void record (ll::CommandBuffer &commandBuffer) const =0
 Records the operations required to run this node in a ll::CommandBuffer. More...
 

Protected Member Functions

virtual void onInit ()=0
 

Constructor & Destructor Documentation

◆ ~Node()

virtual ll::Node::~Node ( )
virtualdefault

Member Function Documentation

◆ bind()

virtual void ll::Node::bind ( const std::string &  name,
const std::shared_ptr< ll::Object > &  obj 
)
pure virtual

Binds a ll::Object as port index for this node.

Parameters
[in]nameThe port name.
[in]objThe object to bind.
Exceptions
std::system_errorif obj cannot be mapped as a port at position index.

Implemented in ll::ContainerNode, and ll::ComputeNode.

◆ getParameter()

virtual const ll::Parameter& ll::Node::getParameter ( const std::string &  name) const
pure virtual

Gets a parameter.

Parameters
[in]nameThe parameter name
Returns
The parameter.
Exceptions
std::system_errorWith error code ll::ErrorCode::KeyNotFound if name is not in the parameters table.

Implemented in ll::ContainerNode, and ll::ComputeNode.

◆ getPort()

virtual std::shared_ptr<ll::Object> ll::Node::getPort ( const std::string &  name) const
pure virtual

Gets a port descriptor given its name.

Parameters
[in]nameThe name
Returns
The port descriptor.
Exceptions
std::system_errorWith error code ll::ErrorCode::KeyNotFound if name is not in the ports table.

Implemented in ll::ContainerNode, and ll::ComputeNode.

◆ getState()

ll::NodeState ll::Node::getState ( ) const
noexcept

◆ getType()

virtual ll::NodeType ll::Node::getType ( ) const
pure virtualnoexcept

Gets the node type.

Returns
The type.
See also
ll::NodeType

Implemented in ll::ContainerNode, and ll::ComputeNode.

◆ hasPort()

virtual bool ll::Node::hasPort ( const std::string &  name) const
pure virtualnoexcept

Returns whether or not a port exists with a given name.

Parameters
[in]nameThe name of the port.
Returns
true if the port exists, false otherwise.

Implemented in ll::ContainerNode, and ll::ComputeNode.

◆ init()

void ll::Node::init ( )

◆ onInit()

virtual void ll::Node::onInit ( )
protectedpure virtual

Implemented in ll::ContainerNode, and ll::ComputeNode.

◆ record()

virtual void ll::Node::record ( ll::CommandBuffer commandBuffer) const
pure virtual

Records the operations required to run this node in a ll::CommandBuffer.

Parameters
[in]commandBufferThe command buffer.
Exceptions
std::system_errorwith corresponding error code and message.

Implemented in ll::ContainerNode, and ll::ComputeNode.

◆ setParameter()

virtual void ll::Node::setParameter ( const std::string &  name,
const ll::Parameter value 
)
pure virtual

Sets a parameter.

Parameters
[in]nameThe name
[in]defaultValueThe value.
Returns
A reference to this object.

Implemented in ll::ContainerNode, and ll::ComputeNode.

◆ setState()

void ll::Node::setState ( const ll::NodeState  tState)

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