Hedgehog  3.1.0
A library to generate hybrid pipeline workflow systems
Loading...
Searching...
No Matches
hh::behavior::Copyable< NodeType > Class Template Reference

Copy interface used to copy a node when either a group of nodes is created or a node is duplicated when an execution pipeline is created. More...

#include "copyable.h"

Inheritance diagram for hh::behavior::Copyable< NodeType >:
Inheritance graph
Collaboration diagram for hh::behavior::Copyable< NodeType >:
Collaboration graph

Public Member Functions

 Copyable (size_t const numberThreads)
 Copyable constructor, set the number of threads for a node.
 
virtual ~Copyable ()=default
 Default destructor.
 
size_t numberThreads () const
 Number of threads accessor.
 
std::vector< NodeType const * > group () const
 Get the group of nodes that hold the current nodes.
 
virtual std::shared_ptr< NodeType > copy ()
 Copy method called to either create a group of node or duplicate a node when an execution pipeline is created.
 

Private Attributes

size_t const numberThreads_ = 0
 Number of threads.
 

Detailed Description

template<class NodeType>
class hh::behavior::Copyable< NodeType >

Copy interface used to copy a node when either a group of nodes is created or a node is duplicated when an execution pipeline is created.

Template Parameters
NodeTypeType of node

Definition at line 37 of file copyable.h.

Constructor & Destructor Documentation

◆ Copyable()

template<class NodeType >
hh::behavior::Copyable< NodeType >::Copyable ( size_t const  numberThreads)
inlineexplicit

Copyable constructor, set the number of threads for a node.

Parameters
numberThreadsNumber of threads attached to a node to form a group

Definition at line 44 of file copyable.h.

◆ ~Copyable()

template<class NodeType >
virtual hh::behavior::Copyable< NodeType >::~Copyable ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ copy()

template<class NodeType >
virtual std::shared_ptr< NodeType > hh::behavior::Copyable< NodeType >::copy ( )
inlinevirtual

Copy method called to either create a group of node or duplicate a node when an execution pipeline is created.

Returns
A new instance of the node

Reimplemented in hh::StateManager< Separator, AllTypes >, and hh::StateManager< Separator, AllTypes... >.

Definition at line 82 of file copyable.h.

◆ group()

template<class NodeType >
std::vector< NodeType const * > hh::behavior::Copyable< NodeType >::group ( ) const
inline

Get the group of nodes that hold the current nodes.

Returns
Group of nodes that hold the current nodes

Definition at line 55 of file copyable.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ numberThreads()

template<class NodeType >
size_t hh::behavior::Copyable< NodeType >::numberThreads ( ) const
inline

Number of threads accessor.

Returns
Number of threads attached to a node

Definition at line 51 of file copyable.h.

Member Data Documentation

◆ numberThreads_

template<class NodeType >
size_t const hh::behavior::Copyable< NodeType >::numberThreads_ = 0
private

Number of threads.

Definition at line 39 of file copyable.h.