Nymph  v1.5.2
Flow-Based Data Processing Framework
KTProcessorToolboxPy.hh
Go to the documentation of this file.
1 
9 #ifndef KTPROCESSORTOOLBOXPY_HH_
10 #define KTPROCESSORTOOLBOXPY_HH_
11 
12 #include "KTProcessorToolbox.hh"
13 
14 // Make connection overloads
15  /* default values here? */
16 bool (Nymph::KTProcessorToolbox::*MakeConnection_3args)(const std::string&, const std::string&, int order) = &Nymph::KTProcessorToolbox::MakeConnection;
17 bool (Nymph::KTProcessorToolbox::*MakeConnection_4args)(const std::string&, const std::string&, const std::string&, const std::string&, int order) = &Nymph::KTProcessorToolbox::MakeConnection;
18 
19 // Run queue pushback overloads
23 
24 // Add Processor overloads
27 
28 // Get Processor overloads
30 
31 // Configure Processor overloads
33 
35 {
36  using namespace Nymph;
37  using namespace boost::python;
38  class_<KTProcessorToolbox, boost::noncopyable>("KTProcessorToolbox", init<std::string>())
39  .def("Run", &KTProcessorToolbox::Run, "Call Run() on all processors in the run queue")
40 
41  .def("GetProcessor", GetProcessor_wrap, return_value_policy<reference_existing_object>(), "Get a pointer to a processor in the toolbox")
42  .def("ConfigureProcessors", ConfigureProcessors_JsonStr, "Configure processors from a json dictionary. Top-level keys are processor names, values are dictionaries with their configurations")
43  .def("AddProcessor", AddProcessor_Ref, "add a processor to the toolbox, toolbox takes ownership")
44  .def("AddProcessor", AddProcessor_TypeStr, "add a processor to the toolbox, toolbox takes ownership")
45  .def("RemoveProcessor", &KTProcessorToolbox::RemoveProcessor, "remove a processor from the toolbox")
46 
47  //TODO: Not 100% certain that the reference count for this processor is now correct, given the return_value_policy
48  .def("ReleaseProcessor", &KTProcessorToolbox::ReleaseProcessor, return_value_policy<reference_existing_object>(), "Remove a processor from the toolbox and return it to the user, ownership is passed")
49 
50  .def("ClearProcessors", &KTProcessorToolbox::ClearProcessors, "Remove all processors and clear run queue")
51 
52  // make signal-slot connection
53  .def("MakeConnection", MakeConnection_3args, "Make a signal-slot connection")
54  .def("MakeConnection", MakeConnection_4args)
55 
56  // Push new processor(s) to back of run queue
57  .def("PushBackToRunQueue", PushBackToRunQueue_string, "Push processor(s) to the back of the run queue")
58  .def("PushBackToRunQueue", PushBackToRunQueue_init_list)
59  .def("PushBackToRunQueue", PushBackToRunQueue_vector)
60 
61  // Remove items from run queue
62  .def("PopBackOfRunQueue", &KTProcessorToolbox::PopBackOfRunQueue, "Remove the last item in the run queue, whether it's a single processor or a group of processors")
63  .def("ClearRunQueue", &KTProcessorToolbox::ClearRunQueue, "Clear the run queue")
64  ;
65 }
66 
67 #endif /* KTPROCESSORTOOLBOXPY_HH_ */
Nymph::KTProcessor *(Nymph::KTProcessorToolbox::* GetProcessor_wrap)(const std::string &)
KTProcessor * ReleaseProcessor(const std::string &procName)
void ClearRunQueue()
Clear the run queue.
bool(Nymph::KTProcessorToolbox::* MakeConnection_4args)(const std::string &, const std::string &, const std::string &, const std::string &, int order)
bool(Nymph::KTProcessorToolbox::* AddProcessor_TypeStr)(const std::string &, const std::string &)
bool(Nymph::KTProcessorToolbox::* AddProcessor_Ref)(const std::string &, Nymph::KTProcessor *)
Manages processors requested by the user at run time.
bool(Nymph::KTProcessorToolbox::* PushBackToRunQueue_vector)(std::vector< std::string >)
KTProcessor * GetProcessor(const std::string &procName)
Get a pointer to a processor in the toolbox.
bool(Nymph::KTProcessorToolbox::* PushBackToRunQueue_init_list)(std::initializer_list< std::string >)
bool AddProcessor(const std::string &procName, KTProcessor *proc)
bool PushBackToRunQueue(const std::string &name)
Push a single processor to the back of the run queue.
bool(Nymph::KTProcessorToolbox::* PushBackToRunQueue_string)(const std::string &name)
bool ConfigureProcessors(const scarab::param_node &node)
Configure processors (only those specified in the toolbox)
void PopBackOfRunQueue()
Remove the last item in the run queue, whether it&#39;s a single processor or a group of processors...
Contains KTProcessorToolbox.
bool MakeConnection(const std::string &signal, const std::string &slot, int order=std::numeric_limits< int >::min())
bool(Nymph::KTProcessorToolbox::* MakeConnection_3args)(const std::string &, const std::string &, int order)
bool RemoveProcessor(const std::string &procName)
Remove a processor from the toolbox.
void export_ProcessorToolbox()
bool(Nymph::KTProcessorToolbox::* ConfigureProcessors_JsonStr)(const std::string &)