1 /* $Id: factory_filter.hpp,v 1.1 2006-01-04 14:30:51 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 FactoryFilterException : public std::runtime_error {
23 FactoryFilterException(const std::string message);
26 class FactoryFilter : public boost::noncopyable
28 typedef yp2::filter::Base* (*CreateFilterCallback)();
32 /// true if registration ok
37 bool add_creator(std::string fi, CreateFilterCallback cfc);
39 bool drop_creator(std::string fi);
41 yp2::filter::Base* create(std::string fi);
43 bool add_creator_dyn(const std::string &fi, const std::string &path);
45 boost::scoped_ptr<Rep> m_p;
53 * indent-tabs-mode: nil
54 * c-file-style: "stroustrup"
56 * vim: shiftwidth=4 tabstop=8 expandtab