Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkIOStream.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkIOStream.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00032 #ifndef __vtkIOStream_h
00033 #define __vtkIOStream_h
00034 
00035 #include "vtkConfigure.h"
00036 
00037 #define __VTK_SYSTEM_INCLUDES__INSIDE
00038 #include "vtkWin32Header.h" // For export macros.
00039 #undef __VTK_SYSTEM_INCLUDES__INSIDE
00040 
00041 #ifdef VTK_USE_ANSI_STDLIB
00042 
00043 #ifdef _MSC_VER
00044 #pragma warning (push, 3)
00045 #endif
00046 
00047 # include <iostream>  // Include real ansi istream and ostream.
00048 # include <strstream> // Include real ansi strstreams.
00049 # include <fstream>   // Include real ansi ifstream and ofstream.
00050 # include <iomanip>   // Include real ansi io manipulators.
00051 
00052 // Need these in global namespace so the same code will work with ansi
00053 // and old-style streams.
00054 using std::dec;
00055 using std::hex;
00056 using std::setw;
00057 using std::setfill;
00058 using std::setprecision;
00059 using std::cerr;
00060 using std::cout;
00061 using std::cin;
00062 using std::ios;
00063 using std::endl;
00064 using std::ends;
00065 using std::ostream;
00066 using std::istream;
00067 using std::ostrstream;
00068 using std::istrstream;
00069 using std::strstream;
00070 using std::ofstream;
00071 using std::ifstream;
00072 using std::fstream;
00073 
00074 #ifdef _MSC_VER
00075 #pragma warning(pop)
00076 #endif
00077 
00078 #else
00079 
00080 // Include old-style streams.
00081 # ifdef _WIN32_WCE
00082 #  include "vtkWinCE.h"   // Include mini-streams for Windows CE.
00083 # else
00084 #  include <iostream.h>   // Include old-style istream and ostream.
00085 #  include <iomanip.h>
00086 #  if defined(_MSC_VER)
00087 #   include <strstrea.h>  // Include old-style strstream from MSVC.
00088 #  else
00089 #   include <strstream.h> // Include old-style strstream.
00090 #  endif
00091 #  include <fstream.h>    // Include old-style ifstream and ofstream.
00092 # endif
00093 #endif
00094 
00095 #if defined(VTK_IOSTREAM_NEED_OPERATORS_LL)
00096 
00097 # if !defined(VTK_ISTREAM_SUPPORTS_LONG_LONG)
00098 VTK_COMMON_EXPORT istream& vtkIOStreamScan(istream&, vtkIOStreamSLL&);
00099 #  if !defined(VTK_DO_NOT_DEFINE_ISTREAM_SLL)
00100 inline istream& operator >> (istream& is, vtkIOStreamSLL& value)
00101 {
00102   return vtkIOStreamScan(is, value);
00103 }
00104 #  endif
00105 
00106 VTK_COMMON_EXPORT istream& vtkIOStreamScan(istream&, vtkIOStreamULL&);
00107 #  if !defined(VTK_DO_NOT_DEFINE_ISTREAM_ULL)
00108 inline istream& operator >> (istream& is, vtkIOStreamULL& value)
00109 {
00110   return vtkIOStreamScan(is, value);
00111 }
00112 #  endif
00113 # endif
00114 
00115 # if !defined(VTK_OSTREAM_SUPPORTS_LONG_LONG)
00116 VTK_COMMON_EXPORT ostream& vtkIOStreamPrint(ostream&, vtkIOStreamSLL);
00117 #  if !defined(VTK_DO_NOT_DEFINE_OSTREAM_SLL)
00118 inline ostream& operator << (ostream& os, vtkIOStreamSLL value)
00119 {
00120   return vtkIOStreamPrint(os, value);
00121 }
00122 #  endif
00123 
00124 VTK_COMMON_EXPORT ostream& vtkIOStreamPrint(ostream&, vtkIOStreamULL);
00125 #  if !defined(VTK_DO_NOT_DEFINE_OSTREAM_ULL)
00126 inline ostream& operator << (ostream& os, vtkIOStreamULL value)
00127 {
00128   return vtkIOStreamPrint(os, value);
00129 }
00130 #  endif
00131 # endif
00132 
00133 #endif
00134 
00135 #endif // __vtkIOStream_h