ssEditFileWriter.h

Go to the documentation of this file.
00001 /* $Id: ssEditFileWriter.h,v 1.16 2007/04/12 15:42:34 pfb Exp $ */
00002 
00003 #ifndef _ssEditFileWriter_h
00004 #define _ssEditFileWriter_h
00005 
00010 #include "ssRawDataWriter.h"
00011 #include "../../../../Common/Utility/Misc/GoNogo.h"
00012 
00019 //class ostream;
00020 
00021 class VTK_EXPORT ssEditFileWriter : public GoNogo, public ssRawDataWriter
00022   {
00023   //****************************************************************************
00024                              public:
00025 
00030   static ssEditFileWriter *New();
00031 
00032   vtkTypeMacro(ssEditFileWriter, ssRawDataWriter);
00033 
00039   void PrintSelf(ostream& os, vtkIndent indent);
00040    
00049   virtual ostream *OpenVTKFile();
00050 
00051 #if 0
00052 
00056   void SetInput(vtkPolyData *input);
00057 #endif
00058 
00062   virtual void TruncateFile();
00063 
00069   void PointsPerLine(vtkIdType n);
00070 
00075   void Seek(vtkIdType loc);
00076 
00081   vtkIdType Tell() const;
00082 
00083   //****************************************************************************
00084                              protected:
00085 
00089   ssEditFileWriter();
00090 
00094   virtual ~ssEditFileWriter();
00095 
00099   virtual void WriteData();
00100 
00101   //****************************************************************************
00102                              private:
00103 
00107   ssEditFileWriter(const ssEditFileWriter& );
00108   ssEditFileWriter& operator=(const ssEditFileWriter& );
00109 
00113   void writeMeta();
00114 
00118   void writePoints();
00119 
00123   void writeLines();
00124   
00128   void CloseVTKFile();
00129 
00130   ofstream *metaptr;
00131   FILE *pointsptr;
00132   FILE *linesptr;
00133 
00134   vtkIdType npoints;
00135   vtkIdType nlines;
00136   vtkIdType npointsperline;
00137   vtkIdType pointstell;
00138   vtkIdType linestell;
00139   };
00140 
00141 /*
00142  * $Log: ssEditFileWriter.h,v $
00143  * Revision 1.16  2007/04/12 15:42:34  pfb
00144  * Changes made necessary by the upgrade from Debian Sarge to Etch.
00145  *
00146  * Revision 1.15  2005/09/30 05:04:29  pfb
00147  * Update from VTK 4.4 to VTK 4.5
00148  *
00149  * Revision 1.14  2005/05/11 11:40:11  pfb
00150  * Added module info.
00151  *
00152  * Revision 1.13  2004/11/09 03:45:20  pfb
00153  * Documentation change.
00154  *
00155  * Revision 1.12  2003/07/10 07:33:23  pfb
00156  * Added notifies to Observer on state change.
00157  *
00158  * Revision 1.11  2003/07/08 04:55:16  pfb
00159  * Removed Execute() (does not belong here).
00160  *
00161  * Revision 1.10  2003/07/07 08:44:08  pfb
00162  * Work in progress.
00163  *
00164  * Revision 1.9  2003/07/02 05:32:33  pfb
00165  * Added SetInput().
00166  *
00167  * Revision 1.8  2003/06/27 17:39:59  pfb
00168  * Added PointsPerLine().
00169  *
00170  * Revision 1.7  2003/06/24 12:21:13  pfb
00171  * Added Seek() and Tell().
00172  *
00173  * Revision 1.6  2003/06/24 08:31:57  pfb
00174  * Work in progress.
00175  *
00176  * Revision 1.5  2003/06/16 11:29:11  pfb
00177  * Work in progress.
00178  *
00179  * Revision 1.4  2003/06/12 08:52:33  pfb
00180  * Work in progress.
00181  *
00182  * Revision 1.3  2003/06/09 05:58:07  pfb
00183  * Added TruncateFile() and writeMeta().
00184  *
00185  * Revision 1.2  2003/06/06 02:26:47  pfb
00186  * Work in proress.
00187  *
00188  * Revision 1.1  2003/06/02 12:00:52  pfb
00189  * Initial rev.
00190  *
00191  *
00192  */
00193 
00197 #endif