PDI 1.7.1

the PDI data interface

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

Classes

class  Iterator
 An iterator used to go through the descriptor store. More...
 

Public Types

typedef std::function< Datatype_template_ptr(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_descriptordesc (const std::string &name)=0
 Accesses the descriptor for a specific name.
 
virtual Data_descriptordesc (const char *name)=0
 Accesses the descriptor for a specific name.
 
virtual Data_descriptoroperator[] (const std::string &name)=0
 Accesses the descriptor for a specific name.
 
virtual Data_descriptoroperator[] (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 void event (const char *name)=0
 Triggers a PDI "event".
 
virtual Loggerlogger ()=0
 Logger getter.
 
virtual Callbackscallbacks ()=0
 Callbacks of the context.
 
virtual Datatype_template_ptr 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 void finalize_and_exit ()=0
 Finalizes PDI and exits application.
 

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)
 

Member Typedef Documentation

◆ Datatype_template_parser

A function that parses a PC_tree_t to create a datatype_template.

Constructor & Destructor Documentation

◆ ~Context()

virtual PDI::Context::~Context ( )
virtual

Member Function Documentation

◆ get_iterator() [1/2]

Iterator PDI::Context::get_iterator ( const std::unordered_map< std::string, std::unique_ptr< Data_descriptor > >::iterator &  data)
protected

◆ get_iterator() [2/2]

Iterator PDI::Context::get_iterator ( std::unordered_map< std::string, std::unique_ptr< Data_descriptor > >::iterator &&  data)
protected

◆ desc() [1/2]

virtual Data_descriptor & PDI::Context::desc ( const std::string &  name)
pure virtual

Accesses the descriptor for a specific name.

Might be uninitialized

Implemented in PDI::Context_proxy.

◆ desc() [2/2]

virtual Data_descriptor & PDI::Context::desc ( const char *  name)
pure virtual

Accesses the descriptor for a specific name.

Might be uninitialized

Implemented in PDI::Context_proxy.

◆ operator[]() [1/2]

virtual Data_descriptor & PDI::Context::operator[] ( const std::string &  name)
pure virtual

Accesses the descriptor for a specific name.

Might be uninitialized

Implemented in PDI::Context_proxy.

◆ operator[]() [2/2]

virtual Data_descriptor & PDI::Context::operator[] ( const char *  name)
pure virtual

Accesses the descriptor for a specific name.

Might be uninitialized

Implemented in PDI::Context_proxy.

◆ begin()

virtual Iterator PDI::Context::begin ( )
pure virtual

Returns an iterator on the first descriptor.

Implemented in PDI::Context_proxy.

◆ end()

virtual Iterator PDI::Context::end ( )
pure virtual

Returns an iterator past the last descriptor.

Implemented in PDI::Context_proxy.

◆ event()

virtual void PDI::Context::event ( const char *  name)
pure virtual

Triggers a PDI "event".

Parameters
[in]namethe event name

Implemented in PDI::Context_proxy.

◆ logger()

virtual Logger & PDI::Context::logger ( )
pure virtual

Logger getter.

Returns
logger

Implemented in PDI::Context_proxy.

◆ callbacks()

virtual Callbacks & PDI::Context::callbacks ( )
pure virtual

Callbacks of the context.

Returns
context callbacks

Implemented in PDI::Context_proxy.

◆ datatype()

virtual Datatype_template_ptr PDI::Context::datatype ( PC_tree_t  node)
pure virtual

Creates a new datatype template from a paraconf-style config.

Parameters
[in]nodethe configuration to read
Returns
the type generated

Implemented in PDI::Context_proxy.

◆ add_datatype()

virtual void PDI::Context::add_datatype ( const std::string &  name,
Datatype_template_parser  parser 
)
pure virtual

Adds new datatype parser to the context.

Parameters
[in]namename of the datatype to add
[in]parserfunction that creates new datatype_template from PC_tree_t

Implemented in PDI::Context_proxy.

◆ finalize_and_exit()

virtual void PDI::Context::finalize_and_exit ( )
pure virtual

Finalizes PDI and exits application.

Implemented in PDI::Context_proxy.


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