00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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