PDI 0.6.1

Data exchange made easy

PDI::Context_proxy Class Reference
Inheritance diagram for PDI::Context_proxy:
PDI::Context

Public Member Functions

 Context_proxy (Context &ctx, std::string plugin_name, PC_tree_t logging_tree)
 
Data_descriptordesc (const std::string &name) override
 Context::desc proxy for plugins. More...
 
Data_descriptordesc (const char *name) override
 Context::desc proxy for plugins. More...
 
Data_descriptoroperator[] (const std::string &name) override
 Context::operator[] proxy for plugins. More...
 
Data_descriptoroperator[] (const char *name) override
 Context::operator[] proxy for plugins. More...
 
Iterator begin () override
 Context::begin proxy for plugins. More...
 
Iterator end () override
 Context::end proxy for plugins. More...
 
void event (const char *name) override
 Context::event proxy for plugins. More...
 
Logger_sptr logger () const override
 Returns local logger. More...
 
Logger_sptr pdi_core_logger () const
 Context::logger proxy for plugins. More...
 
Datatype_template_uptr datatype (PC_tree_t node) override
 Context::datatype proxy for plugins. More...
 
void add_datatype (const std::string &name, Datatype_template_parser parser) override
 Context::add_datatype proxy for plugins. More...
 
std::function< void()> add_init_callback (const std::function< void()> &callback) override
 Adds new init callback to context. More...
 
std::function< void()> add_data_callback (const std::function< void(const std::string &, Ref)> &callback, const std::string &name={}) override
 Adds new data callback to context. More...
 
std::function< void()> add_event_callback (const std::function< void(const std::string &)> &callback, const std::string &name={}) override
 Adds new event callback to context. More...
 
std::function< void()> add_empty_desc_access_callback (const std::function< void(const std::string &)> &callback, const std::string &name={}) override
 Adds new empty desc access callback to context. More...
 
- Public Member Functions inherited from PDI::Context
virtual ~Context ()
 

Additional Inherited Members

- Public Types inherited from PDI::Context
typedef std::function< Datatype_template_uptr(Context &, PC_tree_t)> Datatype_template_parser
 A function that parses a PC_tree_t to create a datatype_template. More...
 
- Protected Member Functions inherited from PDI::Context
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)
 

Constructor & Destructor Documentation

◆ Context_proxy()

PDI::Context_proxy::Context_proxy ( Context ctx,
std::string  plugin_name,
PC_tree_t  logging_tree 
)

Member Function Documentation

◆ desc() [1/2]

Data_descriptor& PDI::Context_proxy::desc ( const std::string &  name)
overridevirtual

Context::desc proxy for plugins.

Implements PDI::Context.

◆ desc() [2/2]

Data_descriptor& PDI::Context_proxy::desc ( const char *  name)
overridevirtual

Context::desc proxy for plugins.

Implements PDI::Context.

◆ operator[]() [1/2]

Data_descriptor& PDI::Context_proxy::operator[] ( const std::string &  name)
overridevirtual

Context::operator[] proxy for plugins.

Implements PDI::Context.

◆ operator[]() [2/2]

Data_descriptor& PDI::Context_proxy::operator[] ( const char *  name)
overridevirtual

Context::operator[] proxy for plugins.

Implements PDI::Context.

◆ begin()

Iterator PDI::Context_proxy::begin ( )
overridevirtual

Context::begin proxy for plugins.

Implements PDI::Context.

◆ end()

Iterator PDI::Context_proxy::end ( )
overridevirtual

Context::end proxy for plugins.

Implements PDI::Context.

◆ event()

void PDI::Context_proxy::event ( const char *  name)
overridevirtual

Context::event proxy for plugins.

Implements PDI::Context.

◆ logger()

Logger_sptr PDI::Context_proxy::logger ( ) const
overridevirtual

Returns local logger.

Implements PDI::Context.

◆ pdi_core_logger()

Logger_sptr PDI::Context_proxy::pdi_core_logger ( ) const

Context::logger proxy for plugins.

◆ datatype()

Datatype_template_uptr PDI::Context_proxy::datatype ( PC_tree_t  node)
overridevirtual

Context::datatype proxy for plugins.

Implements PDI::Context.

◆ add_datatype()

void PDI::Context_proxy::add_datatype ( const std::string &  name,
Datatype_template_parser  parser 
)
overridevirtual

Context::add_datatype proxy for plugins.

Implements PDI::Context.

◆ add_init_callback()

std::function<void()> PDI::Context_proxy::add_init_callback ( const std::function< void()> &  callback)
overridevirtual

Adds new init callback to context.

Parameters
[in]callbackfunction to call when data and metadata are loaded
Returns
function that removes callback

Implements PDI::Context.

◆ add_data_callback()

std::function<void()> PDI::Context_proxy::add_data_callback ( const std::function< void(const std::string &, Ref)> &  callback,
const std::string &  name = {} 
)
overridevirtual

Adds new data callback to context.

Parameters
[in]callbackfunction to call when data is being available
[in]namethe name of the data on which call the callback, if not specified it's called on any data
Returns
function that removes callback

Implements PDI::Context.

◆ add_event_callback()

std::function<void()> PDI::Context_proxy::add_event_callback ( const std::function< void(const std::string &)> &  callback,
const std::string &  name = {} 
)
overridevirtual

Adds new event callback to context.

Parameters
[in]callbackfunction to call when event is called
[in]namethe name of the event on which call the callback, if not specified it's called on any event
Returns
function that removes callback

Implements PDI::Context.

◆ add_empty_desc_access_callback()

std::function<void()> PDI::Context_proxy::add_empty_desc_access_callback ( const std::function< void(const std::string &)> &  callback,
const std::string &  name = {} 
)
overridevirtual

Adds new empty desc access callback to context.

Parameters
[in]callbackfunction to call when event is called
[in]namethe name of the data on which call the callback, if not specified it's called on any data
Returns
function that removes callback

Implements PDI::Context.


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