TPIE

11a2c2d
tpie::pipelining::bits::virt_node Class Reference

Ownership of nodes. More...

#include <tpie/pipelining/virtual.h>

Public Types

typedef std::shared_ptr< virt_nodeptr
 

Public Member Functions

void set_container (virtual_container *ctr)
 Set and/or reset the virtual_container assigned to this virtual node. More...
 

Static Public Member Functions

static ptr take_own (node *pipe)
 Take std::new-ownership of given node. More...
 
static ptr combine (ptr left, ptr right)
 Aggregate ownership of virt_nodes. More...
 

Detailed Description

Ownership of nodes.

This class can only be instantiated through static methods that return a virt_node::ptr, providing reference counting so that nodes are only instantiated once each and are destroyed when the pipeline object goes out of scope.

This class either owns a node or two virt_nodes. The first case is used in the virtual_chunk constructors that accept a single pipe_base. The second case is used in the virtual_chunk pipe operators.

Definition at line 295 of file virtual.h.

Member Function Documentation

◆ combine()

static ptr tpie::pipelining::bits::virt_node::combine ( ptr  left,
ptr  right 
)
inlinestatic

Aggregate ownership of virt_nodes.

Definition at line 319 of file virtual.h.

319  {
320  virt_node * n = new virt_node();
321  n->m_left = left;
322  n->m_right = right;
323  ptr res(n);
324  return res;
325  }

Referenced by tpie::pipelining::virtual_chunk_begin< Output >::operator|(), and tpie::pipelining::virtual_chunk_pull_begin< Output >::operator|().

◆ set_container()

void tpie::pipelining::bits::virt_node::set_container ( virtual_container ctr)
inline

Set and/or reset the virtual_container assigned to this virtual node.

Definition at line 331 of file virtual.h.

331  {
332  m_container.reset(ctr);
333  }

◆ take_own()

static ptr tpie::pipelining::bits::virt_node::take_own ( node pipe)
inlinestatic

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