12#include <functional_dag/impl/dag_impl.hpp>
13#include <functional_dag/dag_interface.hpp>
22 template <
typename IDType>
25 _dag_context m_context;
34 m_context.filter_off =
false;
35 m_context.run_single_threaded =
false;
41 m_context.filter_off =
true;
53 template <
typename In,
typename Out>
55 if(_new_filter !=
nullptr) {
57 if((*t)->dag_contains(_onto) || (*t)->get_id() == _onto) {
75 if((*t)->dag_contains(_id) || (*t)->get_id() == _id)
89 m_context.indent_str = _new_indent_str;
101 m_context.log = _new_stream;
115 m_context.run_single_threaded = _is_single_threaded;
128 template <
typename Out>
130 if(_new_filter !=
nullptr) {
144 *m_context.log << std::endl;
145 *m_context.log <<
"------------DAG Forest-----------\n";
148 *m_context.log <<
"---------------------------------\n";
157 m_context.filter_off =
true;
The DAG manager manages all of the dags created by the user.
Definition filter_sys.hpp:23
dag< Out, IDType > * add_dag(IDType _id, dag_source< Out > *_new_filter, bool _startImmediately)
Starts a new DAG with a given source of data out.
Definition filter_sys.hpp:129
void add_node(IDType _id, dag_node< In, Out > *_new_filter, IDType _onto)
Implementation to template funcs must be visible to link correctly.
Definition filter_sys.hpp:54
bool manager_contains_id(IDType _id)
Containment function for checking presence.
Definition filter_sys.hpp:73
void print_all_dags()
Print all of the trees for verification purposes.
Definition filter_sys.hpp:143
void run_single_threaded(bool _is_single_threaded)
Sets whether to run the DAGs on the same thread.
Definition filter_sys.hpp:114
void clear()
Clears all of the DAGs out of the "forest" of DAGs.
Definition filter_sys.hpp:165
dag_manager()
Default constructor.
Definition filter_sys.hpp:33
~dag_manager()
Default deconstructor.
Definition filter_sys.hpp:40
vector< _dag_base< IDType > * > m_all_dags
All of the DAGs the manager maintains.
Definition filter_sys.hpp:29
void set_indention_string(string _new_indent_str)
Indentation delimiter.
Definition filter_sys.hpp:88
void stahp()
Stops all of the DAGs from generating data out.
Definition filter_sys.hpp:156
void set_logging_stream(std::ostream *_new_stream)
Set a logging stream to print to.
Definition filter_sys.hpp:100
Interface for all external "mapping" lambdas.
Definition dag_interface.hpp:39
Interface for all external generator lambdas.
Definition dag_interface.hpp:19
The main DAG function that encapulates generation and mapping of the data across the DAG.
Definition dag_impl.hpp:59
void add_filter(IDType _newID, dag_node< In, Out > *_new_filter, IDType _on_node)
Adds a new function to the DAG.
Definition dag_impl.hpp:140
void print()
Simple print function to print the ID of this DAG and it's children.
Definition dag_impl.hpp:148