log4shib  1.0.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 _LOG4SHIB_HIERARCHYMAINTAINER_HH
11 #define _LOG4SHIB_HIERARCHYMAINTAINER_HH
12 
13 #include <log4shib/Portability.hh>
14 #include <string>
15 #include <map>
16 #include <vector>
17 #include <log4shib/Category.hh>
19 
20 namespace log4shib {
21 
28  friend class Log4cppCleanup;
29 
30  public:
31  typedef std::map<std::string, Category*> CategoryMap;
32 
34 
36  virtual ~HierarchyMaintainer();
37  virtual Category* getExistingInstance(const std::string& name);
38  virtual Category& getInstance(const std::string& name);
39  virtual std::vector<Category*>* getCurrentCategories() const;
40  virtual void shutdown();
41  virtual void deleteAllCategories();
42 
43  protected:
44  virtual Category* _getExistingInstance(const std::string& name);
45  virtual Category& _getInstance(const std::string& name);
48 
49  private:
50  static HierarchyMaintainer* _defaultMaintainer;
51  };
52 }
53 
54 #endif // _LOG4SHIB_HIERARCHYMAINTAINER_HH