Wolframe, 0.0.3

procProviderInterface.hpp
Go to the documentation of this file.
1 /************************************************************************
2 
3  Copyright (C) 2011 - 2014 Project Wolframe.
4  All rights reserved.
5 
6  This file is part of Project Wolframe.
7 
8  Commercial Usage
9  Licensees holding valid Project Wolframe Commercial licenses may
10  use this file in accordance with the Project Wolframe
11  Commercial License Agreement provided with the Software or,
12  alternatively, in accordance with the terms contained
13  in a written agreement between the licensee and Project Wolframe.
14 
15  GNU General Public License Usage
16  Alternatively, you can redistribute this file and/or modify it
17  under the terms of the GNU General Public License as published by
18  the Free Software Foundation, either version 3 of the License, or
19  (at your option) any later version.
20 
21  Wolframe is distributed in the hope that it will be useful,
22  but WITHOUT ANY WARRANTY; without even the implied warranty of
23  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24  GNU General Public License for more details.
25 
26  You should have received a copy of the GNU General Public License
27  along with Wolframe. If not, see <http://www.gnu.org/licenses/>.
28 
29  If you have questions regarding the use of this file, please contact
30  Project Wolframe.
31 
32 ************************************************************************/
35 #ifndef _PROCESSOR_PROVIDER_INTERFACE_HPP_INCLUDED
36 #define _PROCESSOR_PROVIDER_INTERFACE_HPP_INCLUDED
37 #include "filter/filter.hpp"
39 #include <string>
40 #include <vector>
41 namespace _Wolframe {
42 namespace db
43 {
45 class Transaction;
47 class Database;
48 }
49 namespace types
50 {
52 class Form;
54 class FormDescription;
56 class NormalizeFunction;
59 }
60 namespace cmdbind
61 {
63 class CommandHandler;
65 class ProtocolHandler;
67 class DoctypeDetector;
68 }
69 namespace langbind
70 {
72 class AuthorizationFunction;
74 class AuditFunction;
75 }
76 
77 namespace proc {
78 
82 {
83 public:
90  virtual cmdbind::CommandHandler* cmdhandler( const std::string& command, const std::string& docformat) const=0;
93  virtual cmdbind::ProtocolHandler* protocolHandler( const std::string& protocol) const=0;
97  virtual bool hasProtocol( const std::string& protocol) const=0;
101  virtual bool hasCommand( const std::string& command) const=0;
104  virtual db::Database* transactionDatabase() const=0;
108  virtual db::Transaction* transaction( const std::string& name) const=0;
113  virtual db::Transaction* transaction( const std::string& dbname, const std::string& name) const=0;
114 
118  virtual const langbind::AuthorizationFunction* authorizationFunction( const std::string& name) const=0;
122  virtual const langbind::AuditFunction* auditFunction( const std::string& name) const=0;
126  virtual const types::NormalizeFunction* normalizeFunction( const std::string& name) const=0;
130  virtual const types::NormalizeFunctionType* normalizeFunctionType( const std::string& name) const=0;
134  virtual const langbind::FormFunction* formFunction( const std::string& name) const=0;
138  virtual const types::FormDescription* formDescription( const std::string& name) const=0;
142  virtual const langbind::FilterType* filterType( const std::string& name) const=0;
146  virtual const types::CustomDataType* customDataType( const std::string& name) const=0;
149  virtual cmdbind::DoctypeDetector* doctypeDetector() const=0;
152  virtual const std::string& referencePath() const=0;
153 };
154 
155 }}//namespace
156 #endif
157 
virtual const langbind::AuditFunction * auditFunction(const std::string &name) const =0
Get an audit function by name.
virtual const types::NormalizeFunction * normalizeFunction(const std::string &name) const =0
Get a normalization function.
virtual cmdbind::DoctypeDetector * doctypeDetector() const =0
Create a new document type and format detector (defined in modules)
Class of basic normalization functions instantiated by arguments.
Definition: normalizeFunction.hpp:81
virtual const types::NormalizeFunctionType * normalizeFunctionType(const std::string &name) const =0
Get a normalization function type.
virtual db::Transaction * transaction(const std::string &name) const =0
Get a database transaction object for the given name.
Transaction interface.
Definition: transaction.hpp:52
virtual const types::FormDescription * formDescription(const std::string &name) const =0
Get a form description.
Command handler interface.
Definition: commandHandler.hpp:54
Abstract class as processor provider interface.
Definition: procProviderInterface.hpp:81
virtual cmdbind::CommandHandler * cmdhandler(const std::string &command, const std::string &docformat) const =0
Create a command handler for a specific command and doc format.
virtual const std::string & referencePath() const =0
Get the application configuration reference path.
Interface of a an authorization function.
Definition: authorizationFunction.hpp:51
virtual const types::CustomDataType * customDataType(const std::string &name) const =0
Get a custom data type.
Form data structure.
Definition: form.hpp:130
Structure defining a type of a filter (used as virtual constructor to create filter instances) ...
Definition: filter.hpp:111
Basic normalization function for atomic values (variant type)
Definition: normalizeFunction.hpp:52
virtual bool hasProtocol(const std::string &protocol) const =0
Find out if a protocol with a specific name exists.
virtual cmdbind::ProtocolHandler * protocolHandler(const std::string &protocol) const =0
Create a new protocol handler for a command and for a document format (e.g. XML,JSON,...)
Interface for executing functions with structure input/output in the language bindings.
virtual db::Database * transactionDatabase() const =0
Get the database for transactions.
virtual const langbind::FormFunction * formFunction(const std::string &name) const =0
Get a form function.
Custom Data Type Definition.
Definition: customDataType.hpp:105
virtual ~ProcessorProviderInterface()
Destructor.
Definition: procProviderInterface.hpp:85
Form function interface.
Definition: formFunction.hpp:78
Description of a form structure.
Definition: form.hpp:56
Interface of a an auditing function as special form function.
Definition: auditFunction.hpp:44
Interface to document type and format detection.
Definition: doctypeDetector.hpp:46
virtual bool hasCommand(const std::string &command) const =0
Find out if there exists a command handler for a specific command without creating it...
Base class for database interface. All databases should provide this interface.
Definition: database.hpp:50
Protocol handler interface.
Definition: protocolHandler.hpp:52
virtual const langbind::FilterType * filterType(const std::string &name) const =0
Get a filter type.
virtual const langbind::AuthorizationFunction * authorizationFunction(const std::string &name) const =0
Get an authorization function by name.
Interface for filter class.