hacking filter factory, need to go to meeting and stop here, does not work yet
[metaproxy-moved-to-github.git] / src / filter_factory.hpp
1 /* $Id: filter_factory.hpp,v 1.1 2005-10-28 10:35:30 marc Exp $
2    Copyright (c) 2005, Index Data.
3
4 %LICENSE%
5  */
6
7 #ifndef FILTER_FACTORY_HPP
8 #define FILTER_FACTORY_HPP
9
10 #include <stdexcept>
11 #include <iostream>
12 #include <string>
13 #include <map>
14
15 #include "config.hpp"
16 #include "filter.hpp"
17
18
19 namespace yp2 {
20
21     namespace filter {
22         class FilterFactory {
23
24 #if 0
25         public:
26             typedef yp2::filter::Base* (*CreateFilterCallback)();
27             /// true if registration ok
28             bool register_filter(std::string fi, CreateFilterCallback cfc);
29             /// true if unregistration ok
30             bool unregister_filter(std::string fi);
31             /// factory create method
32             yp2::filter::Base* create(std::string fi);
33             
34         private:
35             typedef std::map<std::string, CreateFilterCallback> CallbackMap;
36
37 #endif      
38
39         };
40     }
41     
42     class FilterFactoryException : public std::runtime_error {
43     public:
44         FilterFactoryException(const std::string message)
45             : std::runtime_error("FilterException: " + message){
46         };
47     };
48
49   
50 }
51
52 #endif
53 /*
54  * Local variables:
55  * c-basic-offset: 4
56  * indent-tabs-mode: nil
57  * c-file-style: "stroustrup"
58  * End:
59  * vim: shiftwidth=4 tabstop=8 expandtab
60  */