Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

skOutputDestination.h

00001 /*
00002   copyright 1996-2003
00003   Simon Whiteside
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Lesser General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Lesser General Public License for more details.
00014 
00015     You should have received a copy of the GNU Lesser General Public
00016     License along with this library; if not, write to the Free Software
00017     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019   $Id: skOutputDestination_8h-source.html,v 1.8 2003/04/14 15:52:43 simkin_cvs Exp $
00020 */
00021 #ifndef skOutputDestination_h
00022 #define skOutputDestination_h
00023 
00024 #include "skStringBuffer.h"
00025 #include <stdio.h>
00026 
00027 #ifdef STREAMS_ENABLED
00028 #include <fstream.h>
00029 #endif
00030 
00035 class CLASSEXPORT skOutputDestination
00036 #ifdef __SYMBIAN32__
00037 : public CBase
00038 #endif
00039 {
00040 public:
00044   virtual ~skOutputDestination();
00048   virtual void  write(const skString& s)=0;
00049 #ifdef __SYMBIAN32__
00050 
00054   virtual void  write(const TDesC& s)=0;
00055 #endif
00056 };
00057 class CLASSEXPORT skOutputFile : public skOutputDestination
00058 {
00059 public:
00064   IMPORT_C skOutputFile(const skString& file);
00068   virtual IMPORT_C ~skOutputFile();
00072   virtual IMPORT_C void write(const skString& s);
00073 #ifdef __SYMBIAN32__
00074 
00078   virtual IMPORT_C void write(const TDesC& s);
00079 #endif
00080 private:
00081 #ifdef STREAMS_ENABLED
00082   ofstream      m_Out;
00083 #else
00084   FILE *        m_Out;
00085 #endif
00086 };
00087 class CLASSEXPORT skOutputString : public skOutputDestination
00088 {
00089 public:
00094   IMPORT_C skOutputString(skStringBuffer& out);
00095   virtual IMPORT_C ~skOutputString();
00100   virtual IMPORT_C void write(const skString& s);
00101 #ifdef __SYMBIAN32__
00102 
00107   virtual IMPORT_C void write(const TDesC& s);
00108 #endif
00109 private:
00110   skStringBuffer& m_Out;
00111 };
00112 
00113 #endif

Generated on Mon Apr 14 16:52:32 2003 for Simkin by doxygen1.3