1 /* $Id: filter_factory.hpp,v 1.7 2005-12-10 09:59:10 adam Exp $
2 Copyright (c) 2005, Index Data.
7 #ifndef FILTER_FACTORY_HPP
8 #define FILTER_FACTORY_HPP
15 #include <boost/noncopyable.hpp>
16 #include <boost/scoped_ptr.hpp>
23 class FilterFactoryException : public std::runtime_error {
25 FilterFactoryException(const std::string message);
28 class FilterFactory : public boost::noncopyable
30 typedef yp2::filter::Base* (*CreateFilterCallback)();
34 /// true if registration ok
39 bool add_creator(std::string fi, CreateFilterCallback cfc);
41 bool drop_creator(std::string fi);
43 yp2::filter::Base* create(std::string fi);
45 bool add_creator_dyn(const std::string &fi, const std::string &path);
47 boost::scoped_ptr<Rep> m_p;
55 * indent-tabs-mode: nil
56 * c-file-style: "stroustrup"
58 * vim: shiftwidth=4 tabstop=8 expandtab