00001 /* 00002 * LayoutAppender.hh 00003 * 00004 * Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved. 00005 * Copyright 2000, Bastiaan Bakker. All rights reserved. 00006 * 00007 * See the COPYING file for the terms of usage and distribution. 00008 */ 00009 00010 #ifndef _LOG4CPP_LAYOUTAPPENDER_HH 00011 #define _LOG4CPP_LAYOUTAPPENDER_HH 00012 00013 #include <string> 00014 #include <log4cpp/Portability.hh> 00015 #include <log4cpp/AppenderSkeleton.hh> 00016 #include <log4cpp/BasicLayout.hh> 00017 00018 LOG4CPP_NS_BEGIN 00019 00024 class LOG4CPP_EXPORT LayoutAppender : public AppenderSkeleton { 00025 public: 00026 00027 typedef BasicLayout DefaultLayoutType; 00028 00029 LayoutAppender(const std::string& name); 00030 virtual ~LayoutAppender(); 00031 00038 virtual bool requiresLayout() const; 00039 virtual void setLayout(Layout* layout = NULL); 00040 00041 protected: 00047 Layout& _getLayout(); 00048 00049 private: 00050 Layout* _layout; 00051 private: 00052 // suppress assignment operator 00053 LayoutAppender & operator=(const LayoutAppender &); 00054 }; 00055 LOG4CPP_NS_END 00056 00057 00058 #endif // _LOG4CPP_LAYOUTAPPENDER_HH 00059