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.2 2003/01/23 15:31:03 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 {
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

Generated on Thu Jan 23 15:25:39 2003 for Simkin by doxygen1.3-rc1