1 /* $Id: factory_filter.hpp,v 1.4 2006-03-16 10:40:59 adam Exp $
2 Copyright (c) 2005-2006, Index Data.
7 #ifndef FACTORY_FILTER_HPP
8 #define FACTORY_FILTER_HPP
15 #include <boost/noncopyable.hpp>
16 #include <boost/scoped_ptr.hpp>
20 namespace metaproxy_1 {
21 class FactoryFilter : public boost::noncopyable
23 typedef metaproxy_1::filter::Base* (*CreateFilterCallback)();
27 /// true if registration ok
32 bool add_creator(std::string fi, CreateFilterCallback cfc);
34 bool drop_creator(std::string fi);
36 metaproxy_1::filter::Base* create(std::string fi);
37 bool exist(std::string fi);
39 bool add_creator_dl(const std::string &fi, const std::string &path);
41 bool have_dl_support();
43 class NotFound : public std::runtime_error {
45 NotFound(const std::string msg);
48 boost::scoped_ptr<Rep> m_p;
56 * indent-tabs-mode: nil
57 * c-file-style: "stroustrup"
59 * vim: shiftwidth=4 tabstop=8 expandtab