Inheritance diagram for ttg::TerminalBase:
ttg::InTerminalBase< void > ttg::OutTerminalBase< void > ttg::InTerminalBase< keyT > ttg::OutTerminalBase< keyT > ttg::In< keyT, valueT > ttg::Out< keyT, valueT > ttg::Out< keyT, valueT >

Documentation

Provides basic information and graph connectivity (eventually statistics, etc.)

Definition at line 12 of file terminal.h.

Public Types

enum class  Type { Write , Read , Consume }
 describes the terminal type More...
 

Public Member Functions

TTBaseget_tt () const
 Return ptr to containing tt. More...
 
size_t get_index () const
 Returns index of terminal. More...
 
const std::string & get_name () const
 Returns name of terminal. More...
 
const std::string & get_key_type_str () const
 Returns string representation of key type. More...
 
const std::string & get_value_type_str () const
 Returns string representation of value type. More...
 
Type get_type () const
 Returns the terminal type. More...
 
const std::vector< TerminalBase * > & get_connections () const
 Get connections to successors. More...
 
const std::vector< TerminalBase * > & get_predecessors () const
 
void connect_pull_nopred (TerminalBase *p)
 
bool is_connected () const
 Returns true if this terminal (input or output) is connected. More...
 
virtual void connect (TerminalBase *in)=0
 
virtual ~TerminalBase ()=default
 

Public Attributes

bool is_pull_terminal = false
 

Static Public Attributes

static constexpr bool is_a_terminal = true
 

Protected Member Functions

 TerminalBase (Type type)
 
void set (TTBase *tt, size_t index, const std::string &name, const std::string &key_type_str, const std::string &value_type_str, Type type)
 
void connect_base (TerminalBase *successor)
 
void connect_pull (TerminalBase *predecessor)
 

Friends

class TTBase
 
template<typename keyT , typename valueT >
class In
 
template<typename keyT , typename valueT >
class Out
 

Member Enumeration Documentation

◆ Type

describes the terminal type

Enumerator
Write 

can only be written to

Read 

can only be used to read immutable data

Consume 

can only be used to read consumable data

Definition at line 18 of file terminal.h.

Constructor & Destructor Documentation

◆ TerminalBase()

ttg::TerminalBase::TerminalBase ( Type  type)
inlineprotected

Definition at line 46 of file terminal.h.

◆ ~TerminalBase()

virtual ttg::TerminalBase::~TerminalBase ( )
virtualdefault

Member Function Documentation

◆ connect()

virtual void ttg::TerminalBase::connect ( TerminalBase in)
pure virtual

Connect this (a TTG output terminal) to a TTG input terminal. The base class method forwards to the the derived class connect method and so type checking for the key/value will be done at runtime when performing the dynamic down cast from TerminalBase* to In<keyT,valueT>.

Implemented in ttg::Out< keyT, valueT >, and ttg::Out< keyT, valueT >.

◆ connect_base()

void ttg::TerminalBase::connect_base ( TerminalBase successor)
inlineprotected

Add directed connection (this --> successor) in internal representation of the TTG. This is called by the derived class's connect method

Definition at line 60 of file terminal.h.

◆ connect_pull()

void ttg::TerminalBase::connect_pull ( TerminalBase predecessor)
inlineprotected

Definition at line 66 of file terminal.h.

◆ connect_pull_nopred()

void ttg::TerminalBase::connect_pull_nopred ( TerminalBase p)
inline

Definition at line 113 of file terminal.h.

◆ get_connections()

const std::vector<TerminalBase *>& ttg::TerminalBase::get_connections ( ) const
inline

Get connections to successors.

Definition at line 107 of file terminal.h.

◆ get_index()

size_t ttg::TerminalBase::get_index ( ) const
inline

Returns index of terminal.

Definition at line 80 of file terminal.h.

◆ get_key_type_str()

const std::string& ttg::TerminalBase::get_key_type_str ( ) const
inline

Returns string representation of key type.

Definition at line 92 of file terminal.h.

◆ get_name()

const std::string& ttg::TerminalBase::get_name ( ) const
inline

Returns name of terminal.

Definition at line 86 of file terminal.h.

◆ get_predecessors()

const std::vector<TerminalBase *>& ttg::TerminalBase::get_predecessors ( ) const
inline

Definition at line 109 of file terminal.h.

◆ get_tt()

TTBase* ttg::TerminalBase::get_tt ( ) const
inline

Return ptr to containing tt.

Definition at line 74 of file terminal.h.

◆ get_type()

Type ttg::TerminalBase::get_type ( ) const
inline

Returns the terminal type.

Definition at line 104 of file terminal.h.

◆ get_value_type_str()

const std::string& ttg::TerminalBase::get_value_type_str ( ) const
inline

Returns string representation of value type.

Definition at line 98 of file terminal.h.

◆ is_connected()

bool ttg::TerminalBase::is_connected ( ) const
inline

Returns true if this terminal (input or output) is connected.

Definition at line 118 of file terminal.h.

◆ set()

void ttg::TerminalBase::set ( TTBase tt,
size_t  index,
const std::string &  name,
const std::string &  key_type_str,
const std::string &  value_type_str,
Type  type 
)
inlineprotected

Definition at line 48 of file terminal.h.

Friends And Related Function Documentation

◆ In

template<typename keyT , typename valueT >
friend class In
friend

Definition at line 41 of file terminal.h.

◆ Out

template<typename keyT , typename valueT >
friend class Out
friend

Definition at line 43 of file terminal.h.

◆ TTBase

friend class TTBase
friend

Definition at line 39 of file terminal.h.

Member Data Documentation

◆ is_a_terminal

constexpr bool ttg::TerminalBase::is_a_terminal = true
staticconstexpr

Definition at line 14 of file terminal.h.

◆ is_pull_terminal

bool ttg::TerminalBase::is_pull_terminal = false

Definition at line 15 of file terminal.h.


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