#include <context.h>
Classes | |
| class | Iterator |
| An iterator used to go through the descriptor store. More... | |
Public Types | |
| typedef std::function< Datatype_template_sptr(Context &, PC_tree_t)> | Datatype_template_parser |
| A function that parses a PC_tree_t to create a datatype_template. | |
Public Member Functions | |
| virtual | ~Context () |
| virtual Data_descriptor & | desc (const std::string &name)=0 |
| Accesses the descriptor for a specific name. | |
| virtual Data_descriptor & | desc (const char *name)=0 |
| Accesses the descriptor for a specific name. | |
| virtual Data_descriptor & | operator[] (const std::string &name)=0 |
| Accesses the descriptor for a specific name. | |
| virtual Data_descriptor & | operator[] (const char *name)=0 |
| Accesses the descriptor for a specific name. | |
| virtual Iterator | begin ()=0 |
| Returns an iterator on the first descriptor. | |
| virtual Iterator | end ()=0 |
| Returns an iterator past the last descriptor. | |
| virtual Iterator | find (const std::string &name)=0 |
| Find the Data_descriptor corresponding to a given name. | |
| virtual void | event (const char *name)=0 |
| Triggers a PDI "event". | |
| virtual Datatype_template_sptr | datatype (PC_tree_t node)=0 |
| Creates a new datatype template from a paraconf-style config. | |
| virtual void | add_datatype (const std::string &name, Datatype_template_parser parser)=0 |
| Adds new datatype parser to the context. | |
| virtual std::function< void()> | on_init (const std::function< void()> &callback)=0 |
| Adds new init callback to context. | |
| virtual std::function< void()> | on_data (const std::function< void(const std::string &, Ref)> &callback, const std::string &name={})=0 |
| Adds new data callback to context. | |
| virtual std::function< void()> | on_data_remove (const std::function< void(const std::string &, Ref)> &callback, const std::string &name={})=0 |
| Adds new data remove callback to context. | |
| virtual std::function< void()> | on_event (const std::function< void(const std::string &)> &callback, const std::string &name={})=0 |
| Adds new event callback to context. | |
| virtual std::function< void()> | on_missing_data (const std::function< void(const std::string &)> &callback, const std::string &name={})=0 |
| Adds new empty desc access callback to context. | |
Protected Member Functions | |
| Iterator | get_iterator (const std::unordered_map< std::string, std::unique_ptr< Data_descriptor > >::iterator &data) |
| Iterator | get_iterator (std::unordered_map< std::string, std::unique_ptr< Data_descriptor > >::iterator &&data) |
| typedef std::function<Datatype_template_sptr(Context&, PC_tree_t)> PDI::Context::Datatype_template_parser |
A function that parses a PC_tree_t to create a datatype_template.
|
virtual |
|
protected |
|
protected |
|
pure virtual |
Accesses the descriptor for a specific name.
Might be uninitialized
|
pure virtual |
Accesses the descriptor for a specific name.
Might be uninitialized
|
pure virtual |
Accesses the descriptor for a specific name.
Might be uninitialized
|
pure virtual |
Accesses the descriptor for a specific name.
Might be uninitialized
|
pure virtual |
Returns an iterator on the first descriptor.
|
pure virtual |
Returns an iterator past the last descriptor.
|
pure virtual |
Find the Data_descriptor corresponding to a given name.
| [in] | name | the Data_descriptor name |
|
pure virtual |
Triggers a PDI "event".
| [in] | name | the event name |
|
pure virtual |
Creates a new datatype template from a paraconf-style config.
| [in] | node | the configuration to read |
|
pure virtual |
Adds new datatype parser to the context.
| [in] | name | name of the datatype to add |
| [in] | parser | function that creates new datatype_template from PC_tree_t |
|
pure virtual |
Adds new init callback to context.
| [in] | callback | function to call when data and metadata are loaded |
|
pure virtual |
Adds new data callback to context.
| [in] | callback | function to call when data is being available |
| [in] | name | the name of the data on which call the callback, if not specified it's called on any data |
|
pure virtual |
Adds new data remove callback to context.
| [in] | callback | function to call when data is reclaimed/released |
| [in] | name | the name of the data on which call the callback, if not specified it's called on any data |
|
pure virtual |
Adds new event callback to context.
| [in] | callback | function to call when event is called |
| [in] | name | the name of the event on which call the callback, if not specified it's called on any event |
|
pure virtual |
Adds new empty desc access callback to context.
| [in] | callback | function to call when event is called |
| [in] | name | the name of the data on which call the callback, if not specified it's called on any data |