log4cpp  1.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AppendersFactory.hh
Go to the documentation of this file.
1 #if !defined(h_738a42b1_1502_4483_948a_a69e7bbbee6a)
2 #define h_738a42b1_1502_4483_948a_a69e7bbbee6a
3 
4 #include <string>
5 #include <map>
6 #include <memory>
7 #include "Portability.hh"
8 #include "Appender.hh"
9 #include "FactoryParams.hh"
10 
11 namespace log4cpp
12 {
14  {
15  public:
17  typedef std::auto_ptr<Appender> (*create_function_t)(const params_t& params);
18 
19  static AppendersFactory& getInstance();
20  void registerCreator(const std::string& class_name, create_function_t create_function);
21  std::auto_ptr<Appender> create(const std::string& class_name, const params_t& params);
22  bool registered(const std::string& class_name) const;
23 
24  private:
25  AppendersFactory(){};
26 
27  typedef std::map<std::string, create_function_t> creators_t;
28  typedef creators_t::const_iterator const_iterator;
29 
30  creators_t creators_;
31  };
32 }
33 
34 #endif // h_738a42b1_1502_4483_948a_a69e7bbbee6a
FactoryParams params_t
Definition: AppendersFactory.hh:16
#define LOG4CPP_EXPORT
Definition: Export.hh:19
Definition: FactoryParams.hh:54
Definition: AppendersFactory.hh:13