1 /* $Id: filter_factory.hpp,v 1.1 2005-10-28 10:35:30 marc Exp $
2 Copyright (c) 2005, Index Data.
7 #ifndef FILTER_FACTORY_HPP
8 #define FILTER_FACTORY_HPP
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);
35 typedef std::map<std::string, CreateFilterCallback> CallbackMap;
42 class FilterFactoryException : public std::runtime_error {
44 FilterFactoryException(const std::string message)
45 : std::runtime_error("FilterException: " + message){
56 * indent-tabs-mode: nil
57 * c-file-style: "stroustrup"
59 * vim: shiftwidth=4 tabstop=8 expandtab