Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

hierarchylocker.h

Go to the documentation of this file.
00001 // Module:  Log4CPLUS
00002 // File:    hierarchylocker.h
00003 // Created: 8/2003
00004 // Author:  Tad E. Smith
00005 //
00006 //
00007 // Copyright (C) Tad E. Smith  All rights reserved.
00008 //
00009 // This software is published under the terms of the Apache Software
00010 // License version 1.1, a copy of which has been included with this
00011 // distribution in the LICENSE.APL file.
00012 //
00013 
00016 #ifndef _LOG4CPLUS_HIERARCHY_LOCKER_HEADER_
00017 #define _LOG4CPLUS_HIERARCHY_LOCKER_HEADER_
00018 
00019 #include <log4cplus/hierarchy.h>
00020 
00021 
00022 namespace log4cplus {
00023 
00027     class LOG4CPLUS_EXPORT HierarchyLocker {
00028     public:
00029       // ctor & dtor
00030         HierarchyLocker(Hierarchy& h);
00031         ~HierarchyLocker();
00032         
00036         void resetConfiguration(); 
00037         
00041         Logger getInstance(const log4cplus::tstring& name);
00042         
00046         Logger getInstance(const log4cplus::tstring& name, spi::LoggerFactory& factory);
00047         
00048         void addAppender(Logger &logger, log4cplus::SharedAppenderPtr& appender);
00049         
00050     private:
00051       // Data
00052         Hierarchy& h;
00053         log4cplus::thread::Guard hierarchyLocker;
00054         LoggerList loggerList;
00055     };
00056 
00057 } // end namespace log4cplus
00058 
00059 #endif // _LOG4CPLUS_HIERARCHY_LOCKER_HEADER_
00060 

Generated on Mon Feb 9 09:10:30 2004 for log4cplus by doxygen 1.3.2