nbaseoutput.h

Go to the documentation of this file.
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 #ifndef NBASEOUTPUT_H
00023 #define NBASEOUTPUT_H
00024 
00029 #include "nstring.h"
00030 
00034 class DllDeclSpec NBaseOutput {
00035       public:
00039             enum Base {
00040                   HEXADECIMAL,      
00041                   DECIMAL,          
00042                   OCTAL             
00043             };
00044 
00048             NBaseOutput(void);
00049             
00053             virtual ~NBaseOutput(void);
00054             
00060             NBaseOutput &setBase(Base base);
00061       
00062       protected:
00067             void print(nint32 val);
00068             
00073             void print(nuint32 val);
00074             
00075             
00080             void print(nint64 val);
00081             
00086             void print(nuint64 val);
00087             
00092             static void print(double d);
00093             
00098             static void print(char c);
00099             
00104             static void print(const NString &str);
00105             
00110             static void print(const void *ptr);
00111             
00112             
00120             static void print(const char *str);
00121             
00126             static void println(const NString &str);
00127       
00128       private:
00129             Base m_base;
00130 };
00131 
00132 #endif // NBASEOUTPUT_H

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