00001 /****************************************************************************** 00002 * 00003 * package: Log4Qt 00004 * file: simplelayout.h 00005 * created: September 2007 00006 * author: Martin Heinrich 00007 * 00008 * 00009 * Copyright 2007 Martin Heinrich 00010 * 00011 * Licensed under the Apache License, Version 2.0 (the "License"); 00012 * you may not use this file except in compliance with the License. 00013 * You may obtain a copy of the License at 00014 * 00015 * http://www.apache.org/licenses/LICENSE-2.0 00016 * 00017 * Unless required by applicable law or agreed to in writing, software 00018 * distributed under the License is distributed on an "AS IS" BASIS, 00019 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00020 * See the License for the specific language governing permissions and 00021 * limitations under the License. 00022 * 00023 ******************************************************************************/ 00024 00025 #ifndef LOG4QT_SIMPLELAYOUT_H 00026 #define LOG4QT_SIMPLELAYOUT_H 00027 00028 00029 /****************************************************************************** 00030 * Dependencies 00031 ******************************************************************************/ 00032 00033 #include "log4qt/layout.h" 00034 00035 00036 /****************************************************************************** 00037 * Declarations 00038 ******************************************************************************/ 00039 00040 00041 namespace Log4Qt 00042 { 00043 00051 class SimpleLayout : public Layout 00052 { 00053 Q_OBJECT 00054 00055 public: 00056 SimpleLayout(QObject *pParent = 0); 00057 // virtual ~SimpleLayout(); // Use compiler default 00058 private: 00059 SimpleLayout(const SimpleLayout &rOther); // Not implemented 00060 SimpleLayout &operator=(const SimpleLayout &rOther); // Not implemented 00061 00062 public: 00063 virtual QString format(const LoggingEvent &rEvent); 00064 00065 protected: 00066 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 SimpleLayout::SimpleLayout(QObject *pParent) : 00092 Layout(pParent) 00093 {} 00094 00095 00096 } // namespace Log4Qt 00097 00098 00099 // Q_DECLARE_TYPEINFO(Log4Qt::SimpleLayout, Q_COMPLEX_TYPE); // Use default 00100 00101 00102 #endif // LOG4QT_SIMPLELAYOUT_H