Common/vtkOStreamWrapper.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00026 #ifndef __vtkOStreamWrapper_h
00027 #define __vtkOStreamWrapper_h
00028
00029 #ifndef __VTK_SYSTEM_INCLUDES__INSIDE
00030 Do_not_include_vtkOStreamWrapper_directly__vtkSystemIncludes_includes_it;
00031 #endif
00032
00033 class vtkIndent;
00034 class vtkObjectBase;
00035 class vtkLargeInteger;
00036 class vtkSmartPointerBase;
00037
00038 class VTK_COMMON_EXPORT vtkOStreamWrapper
00039 {
00040 public:
00042
00044 vtkOStreamWrapper(ostream& os);
00045 vtkOStreamWrapper(vtkOStreamWrapper& r);
00047
00049 struct EndlType {};
00050
00052
00053 vtkOStreamWrapper& operator << (const EndlType&);
00054 vtkOStreamWrapper& operator << (const vtkIndent&);
00055 vtkOStreamWrapper& operator << (vtkObjectBase&);
00056 vtkOStreamWrapper& operator << (const vtkLargeInteger&);
00057 vtkOStreamWrapper& operator << (const vtkSmartPointerBase&);
00058 vtkOStreamWrapper& operator << (ostream&);
00059 vtkOStreamWrapper& operator << (const char*);
00060 vtkOStreamWrapper& operator << (void*);
00061 vtkOStreamWrapper& operator << (char);
00062 vtkOStreamWrapper& operator << (short);
00063 vtkOStreamWrapper& operator << (int);
00064 vtkOStreamWrapper& operator << (long);
00065 vtkOStreamWrapper& operator << (unsigned char);
00066 vtkOStreamWrapper& operator << (unsigned short);
00067 vtkOStreamWrapper& operator << (unsigned int);
00068 vtkOStreamWrapper& operator << (unsigned long);
00069 vtkOStreamWrapper& operator << (float);
00070 vtkOStreamWrapper& operator << (double);
00072
00073
00074
00075
00076 #ifdef VTK_COMPILER_HAS_BOOL
00077 vtkOStreamWrapper& operator << (bool);
00078 #endif
00079
00080
00081 #if defined(__IBMCPP__)
00082 vtkOStreamWrapper& WriteInternal(const char*);
00083 vtkOStreamWrapper& WriteInternal(void*);
00084 template <typename T>
00085 vtkOStreamWrapper& operator << (T* p)
00086 {
00087 return this->WriteInternal(p);
00088 }
00089 #endif
00090
00091 #ifdef VTK_NEED_ID_TYPE_STREAM_OPERATORS
00092 vtkOStreamWrapper& operator << (vtkIdType);
00093 #endif
00094 vtkOStreamWrapper& operator << (void (*)(void*));
00095 vtkOStreamWrapper& operator << (void* (*)(void*));
00096 vtkOStreamWrapper& operator << (int (*)(void*));
00097 vtkOStreamWrapper& operator << (int* (*)(void*));
00098 vtkOStreamWrapper& operator << (float* (*)(void*));
00099 vtkOStreamWrapper& operator << (const char* (*)(void*));
00100 vtkOStreamWrapper& operator << (void (*)(void*, int*));
00101
00103 vtkOStreamWrapper& write(const char*, unsigned long);
00104
00106 ostream& GetOStream();
00107
00111 operator ostream&();
00112
00114 operator int();
00115
00117 void flush();
00118
00121 static void UseEndl(const EndlType&) {}
00122 protected:
00123
00124 ostream& ostr;
00125 private:
00126 vtkOStreamWrapper& operator=(const vtkOStreamWrapper& r);
00127 };
00128
00129 #endif