00001 /****************************************************************************** 00002 * 00003 * package: Log4Qt 00004 * file: denyallfilter.h 00005 * created: September 2007 00006 * author: Martin Heinrich 00007 * 00008 * 00009 * changes Feb 2009, Martin Heinrich 00010 * - Fixed a compile error on VS 2008 by using Q_UNUSED(&rEvent) 00011 * instead of Q_UNUSED(rEvent) 00012 * 00013 * 00014 * Copyright 2007 - 2009 Martin Heinrich 00015 * 00016 * Licensed under the Apache License, Version 2.0 (the "License"); 00017 * you may not use this file except in compliance with the License. 00018 * You may obtain a copy of the License at 00019 * 00020 * http://www.apache.org/licenses/LICENSE-2.0 00021 * 00022 * Unless required by applicable law or agreed to in writing, software 00023 * distributed under the License is distributed on an "AS IS" BASIS, 00024 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00025 * See the License for the specific language governing permissions and 00026 * limitations under the License. 00027 * 00028 ******************************************************************************/ 00029 00030 #ifndef LOG4QT_DENYALLFILTER_H 00031 #define LOG4QT_DENYALLFILTER_H 00032 00033 00034 /****************************************************************************** 00035 * Dependencies 00036 ******************************************************************************/ 00037 00038 #include "log4qt/spi/filter.h" 00039 00040 00041 /****************************************************************************** 00042 * Declarations 00043 ******************************************************************************/ 00044 00045 namespace Log4Qt 00046 { 00047 00054 class DenyAllFilter : public Filter 00055 { 00056 Q_OBJECT 00057 00058 public: 00059 DenyAllFilter(QObject *pParent = 0); 00060 // DenyAllFilter(const DenyAllFilter &rOther); // Use compiler default 00061 // virtual ~DenyAllFilter(); // Use compiler default 00062 // DenyAllFilter &operator=(const DenyAllFilter &rOther); // Use compiler default 00063 00064 virtual Decision decide(const LoggingEvent &rEvent) const; 00065 00066 protected: 00067 #ifndef QT_NO_DEBUG_STREAM 00068 00077 virtual QDebug debug(QDebug &rDebug) const; 00078 #endif // QT_NO_DEBUG_STREAM 00079 }; 00080 00081 00082 /************************************************************************* 00083 * Operators, Helper 00084 *************************************************************************/ 00085 00086 00087 /************************************************************************* 00088 * Inline 00089 *************************************************************************/ 00090 00091 inline DenyAllFilter::DenyAllFilter(QObject *pParent) : 00092 Filter(pParent) 00093 {} 00094 00095 inline Filter::Decision DenyAllFilter::decide(const LoggingEvent &rEvent) const 00096 { Q_UNUSED(&rEvent); return Filter::DENY; } 00097 00098 00099 } // namespace Log4Qt 00100 00101 00102 // Q_DECLARE_TYPEINFO(Log4Qt::DenyAllFilter, Q_MOVABLE_TYPE); // Use default 00103 00104 00105 #endif // LOG4QT_DENYALLFILTER_H