AppendersFactory.hh
Go to the documentation of this file.
00001 #if !defined(h_738a42b1_1502_4483_948a_a69e7bbbee6a)
00002 #define h_738a42b1_1502_4483_948a_a69e7bbbee6a
00003 
00004 #include <string>
00005 #include <map>
00006 #include <memory>
00007 #include "Portability.hh"
00008 #include "Appender.hh"
00009 #include "FactoryParams.hh"
00010 
00011 namespace log4cpp
00012 {
00013    class LOG4CPP_EXPORT AppendersFactory
00014    {
00015       public:
00016          typedef FactoryParams params_t;
00017          typedef std::auto_ptr<Appender> (*create_function_t)(const params_t& params);
00018 
00019          static AppendersFactory& getInstance();
00020          void registerCreator(const std::string& class_name, create_function_t create_function);
00021          std::auto_ptr<Appender> create(const std::string& class_name, const params_t& params);
00022          bool registered(const std::string& class_name) const;
00023 
00024       private:
00025          AppendersFactory(){};
00026 
00027          typedef std::map<std::string, create_function_t> creators_t;
00028          typedef creators_t::const_iterator const_iterator;
00029 
00030          creators_t creators_;
00031    };
00032 }
00033 
00034 #endif // h_738a42b1_1502_4483_948a_a69e7bbbee6a


log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sat Jun 8 2019 18:45:46