1 /* $Id: factory_filter.hpp,v 1.2 2006-01-05 16:39:37 adam Exp $
2 Copyright (c) 2005, Index Data.
7 #ifndef FACTORY_FILTER_HPP
8 #define FACTORY_FILTER_HPP
15 #include <boost/noncopyable.hpp>
16 #include <boost/scoped_ptr.hpp>
21 class FactoryFilter : public boost::noncopyable
23 typedef yp2::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 yp2::filter::Base* create(std::string fi);
38 bool add_creator_dyn(const std::string &fi, const std::string &path);
41 class NotFound : public std::runtime_error {
43 NotFound(const std::string msg);
46 boost::scoped_ptr<Rep> m_p;
54 * indent-tabs-mode: nil
55 * c-file-style: "stroustrup"
57 * vim: shiftwidth=4 tabstop=8 expandtab