Midge  v3.9.2
Data Processing Framework
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
diptera Class Reference

#include <diptera.hh>

Inheritance diagram for diptera:
Inheritance graph

Public Member Functions

 diptera ()
 
 ~diptera ()
 
void add (node *p_node)
 Add a node. More...
 
void connect (const std::string &p_string)
 Connect a signal to a slot: signal_node.signal:slot_node.slot. More...
 
void join (const std::string &p_string)
 Join one node to another. More...
 
std::exception_ptr run (const std::string &p_string)
 
void throw_ex (std::exception_ptr e_ptr)
 To be used by running nodes to throw an exception. More...
 
void reset ()
 
void instruct (instruction p_inst)
 
void set_running_callback (std::function< void() > a_callback)
 

Static Public Member Functions

static const std::string & connector ()
 
static const std::string & designator ()
 
static const std::string & separator ()
 

Private Types

typedef std::map< std::string, node *> node_map_t
 
typedef node_map_t::iterator node_it_t
 
typedef node_map_t::const_iterator node_cit_t
 
typedef node_map_t::value_type node_entry_t
 
typedef std::set< instructable *> inst_set_t
 
typedef inst_set_t::iterator inst_it_t
 
typedef inst_set_t::const_iterator inst_cit_t
 
typedef inst_set_t::value_type inst_entry_t
 
typedef std::vector< std::thread > thread_vector_t
 
typedef thread_vector_t::iterator thread_it_t
 
typedef thread_vector_t::const_iterator thread_cit_t
 

Private Member Functions

virtual void do_cancellation (int a_code)
 
virtual void do_reset_cancellation ()
 

Private Attributes

node_map_t f_nodes
 
inst_set_t f_instructables
 
thread_vector_t f_threads
 
std::mutex f_threads_mutex
 
std::exception_ptr f_run_e_ptr
 
std::function< void() > f_running_callback
 

Static Private Attributes

static const std::string s_connector = string_t( ":" )
 
static const std::string s_designator = string_t( "." )
 
static const std::string s_separator = string_t( ":" )
 

Detailed Description

Definition at line 20 of file diptera.hh.

Member Typedef Documentation

◆ inst_cit_t

typedef inst_set_t::const_iterator inst_cit_t
private

Definition at line 75 of file diptera.hh.

◆ inst_entry_t

typedef inst_set_t::value_type inst_entry_t
private

Definition at line 76 of file diptera.hh.

◆ inst_it_t

typedef inst_set_t::iterator inst_it_t
private

Definition at line 74 of file diptera.hh.

◆ inst_set_t

typedef std::set< instructable* > inst_set_t
private

Definition at line 73 of file diptera.hh.

◆ node_cit_t

typedef node_map_t::const_iterator node_cit_t
private

Definition at line 68 of file diptera.hh.

◆ node_entry_t

typedef node_map_t::value_type node_entry_t
private

Definition at line 69 of file diptera.hh.

◆ node_it_t

typedef node_map_t::iterator node_it_t
private

Definition at line 67 of file diptera.hh.

◆ node_map_t

typedef std::map< std::string, node* > node_map_t
private

Definition at line 66 of file diptera.hh.

◆ thread_cit_t

typedef thread_vector_t::const_iterator thread_cit_t
private

Definition at line 82 of file diptera.hh.

◆ thread_it_t

typedef thread_vector_t::iterator thread_it_t
private

Definition at line 81 of file diptera.hh.

◆ thread_vector_t

typedef std::vector< std::thread > thread_vector_t
private

Definition at line 80 of file diptera.hh.

Constructor & Destructor Documentation

◆ diptera()

diptera ( )

Definition at line 24 of file diptera.cc.

◆ ~diptera()

~diptera ( )

Definition at line 34 of file diptera.cc.

Member Function Documentation

◆ add()

void add ( node p_node)

Add a node.

Definition at line 39 of file diptera.cc.

◆ connect()

void connect ( const std::string &  p_string)

Connect a signal to a slot: signal_node.signal:slot_node.slot.

Definition at line 72 of file diptera.cc.

◆ connector()

const std::string & connector ( )
static

Definition at line 484 of file diptera.cc.

◆ designator()

const std::string & designator ( )
static

Definition at line 489 of file diptera.cc.

◆ do_cancellation()

void do_cancellation ( int  a_code)
privatevirtual

Definition at line 415 of file diptera.cc.

◆ do_reset_cancellation()

void do_reset_cancellation ( )
privatevirtual

Definition at line 467 of file diptera.cc.

◆ instruct()

void instruct ( instruction  p_inst)

Definition at line 403 of file diptera.cc.

◆ join()

void join ( const std::string &  p_string)

Join one node to another.

Option 1: Join by data stream "my-producer.out_0:my-consumer.in_0" Output 0 of my-producer will be connected to input 0 of my-consumer

Option 2: Join by pointer "my-consumer:my-producer" my-consumer will get a pointer to my-producer stored in the f_node_links map

Definition at line 147 of file diptera.cc.

◆ reset()

void reset ( )

Definition at line 379 of file diptera.cc.

◆ run()

std::exception_ptr run ( const std::string &  p_string)

Run a set of nodes; only the nodes specified will be executed "my-consumer:my-producer"

Definition at line 269 of file diptera.cc.

◆ separator()

const std::string & separator ( )
static

Definition at line 494 of file diptera.cc.

◆ set_running_callback()

void set_running_callback ( std::function< void() >  a_callback)
inline

Definition at line 96 of file diptera.hh.

◆ throw_ex()

void throw_ex ( std::exception_ptr  e_ptr)

To be used by running nodes to throw an exception.

Definition at line 347 of file diptera.cc.

Member Data Documentation

◆ f_instructables

inst_set_t f_instructables
private

Definition at line 78 of file diptera.hh.

◆ f_nodes

node_map_t f_nodes
private

Definition at line 71 of file diptera.hh.

◆ f_run_e_ptr

std::exception_ptr f_run_e_ptr
private

Definition at line 87 of file diptera.hh.

◆ f_running_callback

std::function< void() > f_running_callback
private

Definition at line 89 of file diptera.hh.

◆ f_threads

thread_vector_t f_threads
private

Definition at line 84 of file diptera.hh.

◆ f_threads_mutex

std::mutex f_threads_mutex
private

Definition at line 85 of file diptera.hh.

◆ s_connector

const string_t s_connector = string_t( ":" )
staticprivate

Definition at line 91 of file diptera.hh.

◆ s_designator

const string_t s_designator = string_t( "." )
staticprivate

Definition at line 92 of file diptera.hh.

◆ s_separator

const string_t s_separator = string_t( ":" )
staticprivate

Definition at line 93 of file diptera.hh.


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