00001 // Module: Log4CPLUS 00002 // File: appenderattachable.h 00003 // Created: 6/2001 00004 // Author: Tad E. Smith 00005 // 00006 // 00007 // Copyright 2001-2009 Tad E. Smith 00008 // 00009 // Licensed under the Apache License, Version 2.0 (the "License"); 00010 // you may not use this file except in compliance with the License. 00011 // You may obtain a copy of the License at 00012 // 00013 // http://www.apache.org/licenses/LICENSE-2.0 00014 // 00015 // Unless required by applicable law or agreed to in writing, software 00016 // distributed under the License is distributed on an "AS IS" BASIS, 00017 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00018 // See the License for the specific language governing permissions and 00019 // limitations under the License. 00020 00023 #ifndef _LOG4CPLUS_SPI_APPENDER_ATTACHABLE_HEADER_ 00024 #define _LOG4CPLUS_SPI_APPENDER_ATTACHABLE_HEADER_ 00025 00026 #include "dcmtk/oflog/config.h" 00027 #include "dcmtk/oflog/appender.h" 00028 #include "dcmtk/oflog/tstring.h" 00029 #include "dcmtk/oflog/helpers/pointer.h" 00030 //#include <vector> 00031 00032 namespace log4cplus { 00033 // Forward Declarations 00034 typedef helpers::SharedObjectPtr<Appender> SharedAppenderPtr; 00035 typedef OFList<log4cplus::SharedAppenderPtr> SharedAppenderPtrList; 00036 typedef OFListIterator(log4cplus::SharedAppenderPtr) SharedAppenderPtrListIterator; 00037 00038 namespace spi { 00039 00043 class LOG4CPLUS_EXPORT AppenderAttachable { 00044 public: 00045 // Methods 00049 virtual void addAppender(SharedAppenderPtr newAppender) = 0; 00050 00054 virtual SharedAppenderPtrList getAllAppenders() = 0; 00055 00059 virtual SharedAppenderPtr getAppender(const log4cplus::tstring& name) = 0; 00060 00064 virtual void removeAllAppenders() = 0; 00065 00069 virtual void removeAppender(SharedAppenderPtr appender) = 0; 00070 00075 virtual void removeAppender(const log4cplus::tstring& name) = 0; 00076 00077 // Dtor 00078 virtual ~AppenderAttachable() = 0; 00079 }; 00080 00081 } // end namespace spi 00082 } // end namespace log4cplus 00083 00084 #endif // _LOG4CPLUS_SPI_APPENDER_ATTACHABLE_HEADER_ 00085