PDI 0.4.1

Data exchange made easy

PDI::Context Class Referenceabstract

Classes

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

Public Types

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...
 

Public Member Functions

virtual ~Context ()
 
virtual Data_descriptordesc (const std::string &name)=0
 Accesses the descriptor for a specific name. More...
 
virtual Data_descriptordesc (const char *name)=0
 Accesses the descriptor for a specific name. More...
 
virtual Data_descriptoroperator[] (const std::string &name)=0
 Accesses the descriptor for a specific name. More...
 
virtual Data_descriptoroperator[] (const char *name)=0
 Accesses the descriptor for a specific name. More...
 
virtual Iterator begin ()=0
 Returns an iterator on the first descriptor. More...
 
virtual Iterator end ()=0
 Returns an iterator past the last descriptor. More...
 
virtual void event (const char *name)=0
 Triggers a PDI "event". More...
 
virtual Logger_sptr logger () const =0
 
virtual Datatype_template_uptr datatype (PC_tree_t node)=0
 Creates a new datatype template from a paraconf-style config. More...
 
virtual void add_datatype (const std::string &name, Datatype_template_parser parser)=0
 Adds new datatype parser to the context. More...
 

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

◆ desc() [2/2]

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

Accesses the descriptor for a specific name.

Might be uninitialized

◆ 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

◆ operator[]() [2/2]

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

Accesses the descriptor for a specific name.

Might be uninitialized

◆ begin()

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

Returns an iterator on the first descriptor.

◆ end()

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

Returns an iterator past the last descriptor.

◆ event()

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

Triggers a PDI "event".

Parameters
[in]namethe event name

◆ logger()

virtual Logger_sptr PDI::Context::logger ( ) const
pure virtual

◆ datatype()

virtual Datatype_template_uptr 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

◆ 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

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