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

# appenderattachable.h

Go to the documentation of this file.

    00001 // Module:  Log4CPLUS
    00002 // File:    appenderattachable.h
    00003 // Created: 6/2001
    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_SPI_APPENDER_ATTACHABLE_HEADER_
    00017 #define _LOG4CPLUS_SPI_APPENDER_ATTACHABLE_HEADER_
    00018
    00019 #include <log4cplus/config.h>
    00020 #include <log4cplus/appender.h>
    00021 #include <log4cplus/tstring.h>
    00022 #include <log4cplus/helpers/pointer.h>
    00023 #include <vector>
    00024
    00025 namespace log4cplus {
    00026     // Forward Declarations
    00027     typedef helpers::SharedObjectPtr<Appender> SharedAppenderPtr;
    00028     typedef std::vector<log4cplus::SharedAppenderPtr> SharedAppenderPtrList;
    00029
    00030     namespace spi {
    00031
    00035         class LOG4CPLUS_EXPORT AppenderAttachable {
    00036         public:
    00037           // Methods
    00041             virtual void addAppender(SharedAppenderPtr newAppender) = 0;
    00042
    00046             virtual SharedAppenderPtrList getAllAppenders() = 0;
    00047
    00051             virtual SharedAppenderPtr getAppender(const log4cplus::tstring& name) = 0;
    00052
    00056             virtual void removeAllAppenders() = 0;
    00057
    00061             virtual void removeAppender(SharedAppenderPtr appender) = 0;
    00062
    00067             virtual void removeAppender(const log4cplus::tstring& name) = 0;
    00068
    00069           // Dtor
    00070             virtual ~AppenderAttachable(){}
    00071         };
    00072
    00073     } // end namespace spi
    00074 } // end namespace log4cplus
    00075
    00076 #endif // _LOG4CPLUS_SPI_APPENDER_ATTACHABLE_HEADER_
    00077