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.7 2004/12/17 21:31:15 sdw 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 #ifdef STL_STREAMS
00029 #include <fstream>
00030 using std::ofstream;
00031 #else
00032 #include <fstream.h>
00033 #endif
00034 #endif
00035 
00040 class CLASSEXPORT skOutputDestination
00041 #ifdef __SYMBIAN32__
00042 : public CBase
00043 #endif
00044 {
00045 public:
00049   virtual ~skOutputDestination();
00053   virtual void  write(const skString& s)=0;
00054 #ifdef __SYMBIAN32__
00055 
00059   virtual void  write(const TDesC& s)=0;
00060 #endif
00061 };
00062 class CLASSEXPORT skOutputFile : public skOutputDestination
00063 {
00064 public:
00069   IMPORT_C skOutputFile(const skString& file);
00073   virtual IMPORT_C ~skOutputFile();
00077   virtual IMPORT_C void write(const skString& s);
00078 #ifdef __SYMBIAN32__
00079 
00083   virtual IMPORT_C void write(const TDesC& s);
00084 #endif
00085 private:
00086 #ifdef STREAMS_ENABLED
00087   ofstream      m_Out;
00088 #else
00089   FILE *        m_Out;
00090 #endif
00091 };
00092 class CLASSEXPORT skOutputString : public skOutputDestination
00093 {
00094 public:
00099   IMPORT_C skOutputString(skStringBuffer& out);
00100   virtual IMPORT_C ~skOutputString();
00105   virtual IMPORT_C void write(const skString& s);
00106 #ifdef __SYMBIAN32__
00107 
00112   virtual IMPORT_C void write(const TDesC& s);
00113 #endif
00114 private:
00115   skStringBuffer& m_Out;
00116 };
00117 
00118 #endif

Generated on Fri Dec 17 20:28:26 2004 for Simkin C++ for Symbian by doxygen1.3