Loading...
Searching...
No Matches
HierarchyMaintainer.hh
Go to the documentation of this file.
/*
* HierarchyMaintainer.hh
*
* Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
* Copyright 2000, Bastiaan Bakker. All rights reserved.
*
* See the COPYING file for the terms of usage and distribution.
*/
#ifndef _LOG4SHIB_HIERARCHYMAINTAINER_HH
#define _LOG4SHIB_HIERARCHYMAINTAINER_HH
#include <log4shib/Portability.hh>
#include <string>
#include <map>
#include <vector>
#include <log4shib/Category.hh>
#include <log4shib/threading/Threading.hh>
namespace log4shib {
class HierarchyMaintainer {
friend class Log4cppCleanup;
public:
typedef std::map<std::string, Category*> CategoryMap;
static HierarchyMaintainer& getDefaultMaintainer();
HierarchyMaintainer();
virtual ~HierarchyMaintainer();
virtual Category* getExistingInstance(const std::string& name);
virtual Category& getInstance(const std::string& name);
virtual std::vector<Category*>* getCurrentCategories() const;
virtual void shutdown();
virtual void deleteAllCategories();
protected:
virtual Category* _getExistingInstance(const std::string& name);
virtual Category& _getInstance(const std::string& name);
CategoryMap _categoryMap;
mutable threading::Mutex _categoryMutex;
private:
static HierarchyMaintainer* _defaultMaintainer;
};
}
#endif // _LOG4SHIB_HIERARCHYMAINTAINER_HH
Category.hh
Portability.hh
Threading.hh
log4shib::Category
This is the central class in the log4j package.
Definition Category.hh:32
log4shib::HierarchyMaintainer::getCurrentCategories
virtual std::vector< Category * > * getCurrentCategories() const
Definition HierarchyMaintainer.cpp:84
log4shib::HierarchyMaintainer::shutdown
virtual void shutdown()
Definition HierarchyMaintainer.cpp:97
log4shib::HierarchyMaintainer::HierarchyMaintainer
HierarchyMaintainer()
Definition HierarchyMaintainer.cpp:31
log4shib::HierarchyMaintainer::getDefaultMaintainer
static HierarchyMaintainer & getDefaultMaintainer()
Definition HierarchyMaintainer.cpp:25
log4shib::HierarchyMaintainer::_getExistingInstance
virtual Category * _getExistingInstance(const std::string &name)
Definition HierarchyMaintainer.cpp:44
log4shib::HierarchyMaintainer::Log4cppCleanup
friend class Log4cppCleanup
Definition HierarchyMaintainer.hh:28
log4shib::HierarchyMaintainer::getExistingInstance
virtual Category * getExistingInstance(const std::string &name)
Definition HierarchyMaintainer.cpp:39
log4shib::HierarchyMaintainer::_getInstance
virtual Category & _getInstance(const std::string &name)
Definition HierarchyMaintainer.cpp:61
log4shib::HierarchyMaintainer::deleteAllCategories
virtual void deleteAllCategories()
Definition HierarchyMaintainer.cpp:106
log4shib::HierarchyMaintainer::_categoryMutex
threading::Mutex _categoryMutex
Definition HierarchyMaintainer.hh:47
log4shib::HierarchyMaintainer::getInstance
virtual Category & getInstance(const std::string &name)
Definition HierarchyMaintainer.cpp:55
log4shib::HierarchyMaintainer::_categoryMap
CategoryMap _categoryMap
Definition HierarchyMaintainer.hh:46
log4shib::HierarchyMaintainer::CategoryMap
std::map< std::string, Category * > CategoryMap
Definition HierarchyMaintainer.hh:31
log4shib::HierarchyMaintainer::~HierarchyMaintainer
virtual ~HierarchyMaintainer()
Definition HierarchyMaintainer.cpp:34
log4shib::threading::Mutex
Definition PThreads.hh:29
log4shib
The top level namespace for all 'Log for C++' types and classes.
Definition AbortAppender.hh:16