Wolframe, 0.0.3

_Wolframe::proc::ProcessorProvider Class Reference

Processor provider, the class that provides access to configured global objects to processors. More...

#include <procProvider.hpp>

Inheritance diagram for _Wolframe::proc::ProcessorProvider:
_Wolframe::proc::ProcessorProviderInterface

Classes

class  CommandHandlerDef
 Definition of a command handler with its configuration. More...
 

Public Member Functions

 ProcessorProvider (const ProcProviderConfig *conf, const module::ModulesDirectory *modules, prgbind::ProgramLibrary *programs_)
 Constructor. More...
 
virtual ~ProcessorProvider ()
 Destructor. More...
 
bool resolveDB (const db::DatabaseProvider &db)
 Pass the references to the built database interfaces and let the provider find its transaction database. More...
 
bool loadPrograms ()
 Load all configured programs. More...
 
virtual cmdbind::CommandHandlercmdhandler (const std::string &command, const std::string &docformat) const
 Create a new command handler for a command and for a document format (e.g. XML,JSON,...) More...
 
virtual cmdbind::ProtocolHandlerprotocolHandler (const std::string &protocol) const
 Create a new protocol handler. More...
 
virtual bool hasProtocol (const std::string &protocol) const
 Find out if a protocol with a specific name exists. More...
 
virtual bool hasCommand (const std::string &command) const
 Find out if a command with a specific name exists. More...
 
virtual db::DatabasetransactionDatabase () const
 Get a reference to the transaction database. More...
 
virtual db::Transactiontransaction (const std::string &name) const
 Return a database transaction object for a transaction identified by name. More...
 
virtual db::Transactiontransaction (const std::string &dbname, const std::string &name) const
 Return a database transaction object for a transaction identified by name on an alternative database than the default transaction database. More...
 
virtual const
langbind::AuthorizationFunction
authorizationFunction (const std::string &name) const
 Get a reference to an authorization function identified by name. More...
 
virtual const
langbind::AuditFunction
auditFunction (const std::string &name) const
 Get a reference to an audit function identified by name. More...
 
virtual const
types::NormalizeFunction
normalizeFunction (const std::string &name) const
 Get a reference to a normalization function identified by name. More...
 
virtual const
types::NormalizeFunctionType
normalizeFunctionType (const std::string &name) const
 Get a reference to a normalization function type identified by name. More...
 
virtual const
langbind::FormFunction
formFunction (const std::string &name) const
 Get a reference to a form function type identified by name. More...
 
virtual const
types::FormDescription
formDescription (const std::string &name) const
 Get a reference to a form description identified by name. More...
 
virtual const
langbind::FilterType
filterType (const std::string &name) const
 Get a reference to a filter type identified by name. More...
 
virtual const
types::CustomDataType
customDataType (const std::string &name) const
 Get a reference to a custom data type identified by name. More...
 
virtual cmdbind::DoctypeDetectordoctypeDetector () const
 Create a new document type and format detector (defined in modules) More...
 
virtual const std::string & referencePath () const
 Get the application reference path for local path expansion. More...
 
- Public Member Functions inherited from _Wolframe::proc::ProcessorProviderInterface
virtual ~ProcessorProviderInterface ()
 Destructor. More...
 

Private Attributes

std::string m_dbLabel
 idenfifier of the transaction database More...
 
db::Databasem_db
 reference to the transaction database More...
 
const db::DatabaseProviderm_dbProvider
 alternative database More...
 
std::vector< CommandHandlerDefm_cmd
 list of defined command handlers More...
 
types::keymap< std::size_t > m_cmdMap
 map of command names to indices in 'm_cmd' More...
 
types::keymap
< cmdbind::ProtocolHandlerUnitR
m_protocols
 map protocol identifiers to handler units More...
 
std::vector
< cmdbind::DoctypeDetectorType
m_doctypes
 list of document type detectors loaded from modules More...
 
std::vector< std::string > m_programfiles
 list of all programs to load More...
 
prgbind::ProgramLibrarym_programs
 program library More...
 
std::string m_referencePath
 application reference path More...
 

Detailed Description

Processor provider, the class that provides access to configured global objects to processors.

Constructor & Destructor Documentation

_Wolframe::proc::ProcessorProvider::ProcessorProvider ( const ProcProviderConfig conf,
const module::ModulesDirectory modules,
prgbind::ProgramLibrary programs_ 
)

Constructor.

virtual _Wolframe::proc::ProcessorProvider::~ProcessorProvider ( )
virtual

Destructor.

Member Function Documentation

virtual const langbind::AuditFunction* _Wolframe::proc::ProcessorProvider::auditFunction ( const std::string &  name) const
virtual

Get a reference to an audit function identified by name.

Implements _Wolframe::proc::ProcessorProviderInterface.

virtual const langbind::AuthorizationFunction* _Wolframe::proc::ProcessorProvider::authorizationFunction ( const std::string &  name) const
virtual

Get a reference to an authorization function identified by name.

Implements _Wolframe::proc::ProcessorProviderInterface.

virtual cmdbind::CommandHandler* _Wolframe::proc::ProcessorProvider::cmdhandler ( const std::string &  command,
const std::string &  docformat 
) const
virtual

Create a new command handler for a command and for a document format (e.g. XML,JSON,...)

Implements _Wolframe::proc::ProcessorProviderInterface.

virtual const types::CustomDataType* _Wolframe::proc::ProcessorProvider::customDataType ( const std::string &  name) const
virtual

Get a reference to a custom data type identified by name.

Implements _Wolframe::proc::ProcessorProviderInterface.

virtual cmdbind::DoctypeDetector* _Wolframe::proc::ProcessorProvider::doctypeDetector ( ) const
virtual

Create a new document type and format detector (defined in modules)

Returns
a document type and format detector reference allocated (owned and deleted by the caller)

Implements _Wolframe::proc::ProcessorProviderInterface.

virtual const langbind::FilterType* _Wolframe::proc::ProcessorProvider::filterType ( const std::string &  name) const
virtual

Get a reference to a filter type identified by name.

Implements _Wolframe::proc::ProcessorProviderInterface.

virtual const types::FormDescription* _Wolframe::proc::ProcessorProvider::formDescription ( const std::string &  name) const
virtual

Get a reference to a form description identified by name.

Implements _Wolframe::proc::ProcessorProviderInterface.

virtual const langbind::FormFunction* _Wolframe::proc::ProcessorProvider::formFunction ( const std::string &  name) const
virtual

Get a reference to a form function type identified by name.

Implements _Wolframe::proc::ProcessorProviderInterface.

virtual bool _Wolframe::proc::ProcessorProvider::hasCommand ( const std::string &  command) const
virtual

Find out if a command with a specific name exists.

Implements _Wolframe::proc::ProcessorProviderInterface.

virtual bool _Wolframe::proc::ProcessorProvider::hasProtocol ( const std::string &  protocol) const
virtual

Find out if a protocol with a specific name exists.

Implements _Wolframe::proc::ProcessorProviderInterface.

bool _Wolframe::proc::ProcessorProvider::loadPrograms ( )

Load all configured programs.

virtual const types::NormalizeFunction* _Wolframe::proc::ProcessorProvider::normalizeFunction ( const std::string &  name) const
virtual

Get a reference to a normalization function identified by name.

Implements _Wolframe::proc::ProcessorProviderInterface.

virtual const types::NormalizeFunctionType* _Wolframe::proc::ProcessorProvider::normalizeFunctionType ( const std::string &  name) const
virtual

Get a reference to a normalization function type identified by name.

Implements _Wolframe::proc::ProcessorProviderInterface.

virtual cmdbind::ProtocolHandler* _Wolframe::proc::ProcessorProvider::protocolHandler ( const std::string &  protocol) const
virtual

Create a new protocol handler.

Implements _Wolframe::proc::ProcessorProviderInterface.

virtual const std::string& _Wolframe::proc::ProcessorProvider::referencePath ( ) const
virtual

Get the application reference path for local path expansion.

Implements _Wolframe::proc::ProcessorProviderInterface.

bool _Wolframe::proc::ProcessorProvider::resolveDB ( const db::DatabaseProvider db)

Pass the references to the built database interfaces and let the provider find its transaction database.

virtual db::Transaction* _Wolframe::proc::ProcessorProvider::transaction ( const std::string &  name) const
virtual

Return a database transaction object for a transaction identified by name.

Implements _Wolframe::proc::ProcessorProviderInterface.

virtual db::Transaction* _Wolframe::proc::ProcessorProvider::transaction ( const std::string &  dbname,
const std::string &  name 
) const
virtual

Return a database transaction object for a transaction identified by name on an alternative database than the default transaction database.

Implements _Wolframe::proc::ProcessorProviderInterface.

virtual db::Database* _Wolframe::proc::ProcessorProvider::transactionDatabase ( ) const
virtual

Get a reference to the transaction database.

Implements _Wolframe::proc::ProcessorProviderInterface.

Member Data Documentation

std::vector<CommandHandlerDef> _Wolframe::proc::ProcessorProvider::m_cmd
private

list of defined command handlers

types::keymap<std::size_t> _Wolframe::proc::ProcessorProvider::m_cmdMap
private

map of command names to indices in 'm_cmd'

db::Database* _Wolframe::proc::ProcessorProvider::m_db
private

reference to the transaction database

std::string _Wolframe::proc::ProcessorProvider::m_dbLabel
private

idenfifier of the transaction database

const db::DatabaseProvider* _Wolframe::proc::ProcessorProvider::m_dbProvider
private

alternative database

std::vector<cmdbind::DoctypeDetectorType> _Wolframe::proc::ProcessorProvider::m_doctypes
private

list of document type detectors loaded from modules

std::vector<std::string> _Wolframe::proc::ProcessorProvider::m_programfiles
private

list of all programs to load

prgbind::ProgramLibrary* _Wolframe::proc::ProcessorProvider::m_programs
private

program library

types::keymap<cmdbind::ProtocolHandlerUnitR> _Wolframe::proc::ProcessorProvider::m_protocols
private

map protocol identifiers to handler units

std::string _Wolframe::proc::ProcessorProvider::m_referencePath
private

application reference path


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