ndebug.cpp

00001 // LICENSE: (Please see the file COPYING for details)
00002 //
00003 // NUS - Nemesis Utilities System: A C++ application development framework 
00004 // Copyright (C) 2006, 2007 Otavio Rodolfo Piske
00005 //
00006 //  This file is part of NUS
00007 //
00008 //  This library is free software; you can redistribute it and/or
00009 //  modify it under the terms of the GNU Lesser General Public
00010 //  License as published by the Free Software Foundation version 2.1
00011 //  of the License.
00012 //
00013 //  This library is distributed in the hope that it will be useful,
00014 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 //  Lesser General Public License for more details.
00017 //
00018 //  You should have received a copy of the GNU Lesser General Public
00019 //  License along with this library; if not, write to the Free Software
00020 //  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00021 //
00022 #include "ndebug.h"
00023 
00024 NDebug::NDebug(void)
00025       : NBaseOutput()
00026 {}
00027 
00028 
00029 NDebug::~NDebug(void) {
00030 #ifdef NLIB_DEBUG
00031       printf("\n");
00032 #endif // NLIB_DEBUG
00033 }
00034 
00035 
00036 NDebug NDebug::print(void) { 
00037       NDebug tmp;
00038       
00039 #ifdef NLIB_DEBUG
00040       NBaseOutput::print("[DEBUG] ");
00041 
00042 #endif // NLIB_DEBUG
00043       return tmp;
00044 
00045 }
00046 
00047 
00048 NDebug &NDebug::operator<<(nint32 val) {
00049 #ifdef NLIB_DEBUG
00050       NBaseOutput::print(val);
00051 #endif // NLIB_DEBUG
00052       
00053       return *this;
00054 }
00055 
00056 NDebug &NDebug::operator<<(nuint32 val) {
00057 #ifdef NLIB_DEBUG
00058       NBaseOutput::print(val);
00059 #endif // NLIB_DEBUG
00060       
00061       return *this;
00062 }
00063 
00064 
00065 NDebug &NDebug::operator<<(nint64 val) {
00066 #ifdef NLIB_DEBUG
00067       NBaseOutput::print(val);
00068 #endif // NLIB_DEBUG
00069       
00070       return *this;
00071 }
00072 
00073 NDebug &NDebug::operator<<(nuint64 val) {
00074 #ifdef NLIB_DEBUG
00075       NBaseOutput::print(val);
00076 #endif // NLIB_DEBUG
00077       
00078       return *this;
00079 }
00080 
00081 
00082 NDebug &NDebug::operator<<(double d) {
00083 #ifdef NLIB_DEBUG
00084       NBaseOutput::print(d);
00085 #endif // NLIB_DEBUG
00086       
00087       return *this;
00088 }
00089 
00090 
00091 NDebug &NDebug::operator<<(char c) {
00092 #ifdef NLIB_DEBUG
00093       NBaseOutput::print(c);
00094 #endif // NLIB_DEBUG
00095       
00096       return *this;
00097 }
00098 
00099 NDebug &NDebug::operator<<(const NString &str) {
00100 #ifdef NLIB_DEBUG
00101       NBaseOutput::print(str);
00102 #endif // NLIB_DEBUG
00103       
00104       return *this;
00105 }
00106 
00107 
00108 NDebug &NDebug::operator<<(const void *ptr) {
00109 #ifdef NLIB_DEBUG
00110       NBaseOutput::print(ptr);
00111 #endif // NLIB_DEBUG
00112       
00113       return *this;
00114 }
00115 
00116 
00117 NDebug &NDebug::operator<<(const char *str) {
00118 #ifdef NLIB_DEBUG
00119       NBaseOutput::print(str);
00120 #endif // NLIB_DEBUG
00121       
00122       return *this;
00123 }

Generated on Wed Mar 5 23:10:35 2008 for NemesisUtilitiesSystem by  doxygen 1.5.4