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 {
00037 public:
00038 virtual void write(const skString& s)=0;
00039 };
00040 class CLASSEXPORT skOutputFile : public skOutputDestination
00041 {
00042 public:
00043 skOutputFile(const skString& file);
00044 ~skOutputFile();
00045 void write(const skString& s);
00046 private:
00047 #ifdef STREAMS_ENABLED
00048 ofstream m_Out;
00049 #else
00050 FILE * m_Out;
00051 #endif
00052 };
00053 class CLASSEXPORT skOutputString : public skOutputDestination
00054 {
00055 public:
00056 skOutputString(skStringBuffer& out);
00057 void write(const skString& s);
00058 private:
00059 skStringBuffer& m_Out;
00060 };
00061
00062 #endif