HierarchyMaintainer.hh
Go to the documentation of this file.
1 /*
2  * HierarchyMaintainer.hh
3  *
4  * Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
5  * Copyright 2000, Bastiaan Bakker. All rights reserved.
6  *
7  * See the COPYING file for the terms of usage and distribution.
8  */
9 
10 #ifndef _LOG4CPP_HIERARCHYMAINTAINER_HH
11 #define _LOG4CPP_HIERARCHYMAINTAINER_HH
12 
13 #include <log4cpp/Portability.hh>
14 #include <string>
15 #include <map>
16 #include <vector>
17 #include <log4cpp/Category.hh>
19 
20 namespace log4cpp {
21 
28  friend class Log4cppCleanup;
29 
30  public:
31  typedef std::map<std::string, Category*> CategoryMap;
32  typedef void (*shutdown_fun_ptr)();
33 
35 
37  virtual ~HierarchyMaintainer();
38  virtual Category* getExistingInstance(const std::string& name);
39  virtual Category& getInstance(const std::string& name);
40  virtual std::vector<Category*>* getCurrentCategories() const;
41  virtual void shutdown();
43  virtual void deleteAllCategories();
44 
45  typedef Category* (*creator_function_t)(const std::string& name,
46  log4cpp::Category* parent,
47  log4cpp::Priority::Value priority);
48 
49  static void set_category_factory(creator_function_t creator_function);
50 
51  protected:
52  virtual Category* _getExistingInstance(const std::string& name);
53  virtual Category& _getInstance(const std::string& name);
54  CategoryMap _categoryMap;
56 
57  private:
58  typedef std::vector<shutdown_fun_ptr> handlers_t;
59 
61  handlers_t handlers_;
62 
63  static Category* make_category(const std::string& name,
64  log4cpp::Category* parent,
65  log4cpp::Priority::Value priority);
67  };
68 }
69 
70 #endif // _LOG4CPP_HIERARCHYMAINTAINER_HH
std::map< std::string, Category * > CategoryMap
virtual Category & getInstance(const std::string &name)
static void set_category_factory(creator_function_t creator_function)
Category *(* creator_function_t)(const std::string &name, log4cpp::Category *parent, log4cpp::Priority::Value priority)
std::vector< shutdown_fun_ptr > handlers_t
virtual Category * getExistingInstance(const std::string &name)
static HierarchyMaintainer * _defaultMaintainer
virtual Category & _getInstance(const std::string &name)
static creator_function_t _creator_function
static Category * make_category(const std::string &name, log4cpp::Category *parent, log4cpp::Priority::Value priority)
static HierarchyMaintainer & getDefaultMaintainer()
virtual std::vector< Category * > * getCurrentCategories() const
virtual Category * _getExistingInstance(const std::string &name)
void register_shutdown_handler(shutdown_fun_ptr handler)


log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sun Jun 23 2019 19:14:17