LayoutsFactory.hh
Go to the documentation of this file.
00001 #if !defined(h_409ac787_0acf_47ff_ac15_3e9024d40315)
00002 #define h_409ac787_0acf_47ff_ac15_3e9024d40315
00003 
00004 #include <string>
00005 #include <map>
00006 #include <memory>
00007 #include "Portability.hh"
00008 #include "Layout.hh"
00009 #include "FactoryParams.hh"
00010 
00011 namespace log4cpp
00012 {
00013    class LOG4CPP_EXPORT LayoutsFactory
00014    {
00015       public:
00016          typedef FactoryParams params_t;
00017          typedef std::auto_ptr<Layout> (*create_function_t)(const params_t& params);
00018 
00019          static LayoutsFactory& getInstance();
00020          void registerCreator(const std::string& class_name, create_function_t create_function);
00021          std::auto_ptr<Layout> create(const std::string& class_name, const params_t& params);
00022          bool registed(const std::string& class_name) const;
00023 
00024       private:
00025          LayoutsFactory(){};
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 
00035 #endif // h_409ac787_0acf_47ff_ac15_3e9024d40315


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