Compute Library
 21.11
SubStream Class Referencefinal

Sub stream class. More...

#include <SubStream.h>

Collaboration diagram for SubStream:
[legend]

Public Member Functions

 SubStream (IStream &s)
 Default Constructor. More...
 
void add_layer (ILayer &layer) override
 Adds a layer to the stream. More...
 
Graphgraph () override
 Returns the underlying graph. More...
 
const Graphgraph () const override
 Returns the underlying graph. More...
 
- Public Member Functions inherited from IStream
virtual ~IStream ()=default
 
NodeID tail_node ()
 Returns the tail node of the Stream. More...
 
StreamHintshints ()
 Returns the stream hints that are currently used. More...
 
void forward_tail (NodeID nid)
 Forwards tail of stream to a given nid. More...
 

Detailed Description

Sub stream class.

Definition at line 47 of file SubStream.h.

Constructor & Destructor Documentation

◆ SubStream()

SubStream ( IStream s)

Default Constructor.

Parameters
[in]sParent stream

Definition at line 35 of file SubStream.cpp.

References IStream::hints(), and IStream::tail_node().

36  : _s(s)
37 {
38  _hints = s.hints();
39  _tail_node = s.tail_node();
40 }
StreamHints & hints()
Returns the stream hints that are currently used.
Definition: IStream.h:73

Member Function Documentation

◆ add_layer()

void add_layer ( ILayer layer)
overridevirtual

Adds a layer to the stream.

Parameters
[in]layerLayer to add

Implements IStream.

Definition at line 42 of file SubStream.cpp.

References ILayer::create_layer().

43 {
44  auto nid = layer.create_layer(*this);
45  _tail_node = nid;
46 }

◆ graph() [1/2]

Graph & graph ( )
overridevirtual

Returns the underlying graph.

Returns
Underlying graph

Implements IStream.

Definition at line 53 of file SubStream.cpp.

References IStream::graph().

54 {
55  return _s.graph();
56 }
virtual Graph & graph()=0
Returns the underlying graph.

◆ graph() [2/2]

const Graph & graph ( ) const
overridevirtual

Returns the underlying graph.

Returns
Underlying graph

Implements IStream.

Definition at line 48 of file SubStream.cpp.

References IStream::graph().

49 {
50  return _s.graph();
51 }
virtual Graph & graph()=0
Returns the underlying graph.

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