• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Hybrid/vtkX3DExporterFIWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkX3DExporterFIWriter.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 =========================================================================*/
00015 #ifndef __vtkX3DExporterFIWriter_h
00016 #define __vtkX3DExporterFIWriter_h
00017 
00018 #include "vtkX3DExporterWriter.h"
00019 
00020 class vtkX3DExporterFIByteWriter;
00021 class vtkX3DExporterFINodeInfoStack;
00022 class vtkZLibDataCompressor;
00023 
00024 class VTK_HYBRID_EXPORT vtkX3DExporterFIWriter : public vtkX3DExporterWriter
00025 {
00026 public:
00027   static vtkX3DExporterFIWriter *New();
00028   vtkTypeRevisionMacro(vtkX3DExporterFIWriter, vtkX3DExporterWriter);
00029   void PrintSelf(ostream& os, vtkIndent indent);
00030 
00031   virtual void CloseFile();
00032   virtual int OpenFile(const char* file);
00033 
00034 
00035   //void Write(const char* str);
00036 
00037   virtual void Flush();
00038 
00039   void StartDocument();
00040   void EndDocument();
00041 
00042   // Elements
00043   void StartNode(int elementID);
00044   void EndNode();
00045 
00046   // Attributes
00047   // SFString / MFString
00048   //void SetField(int attributeID, const vtkstd::string &value);
00049   void SetField(int attributeID, const char*, bool mfstring = false);
00050   // SFInt32
00051   void SetField(int attributeID, int);
00052   // SFFloat
00053   void SetField(int attributeID, float);
00054   // SFDouble
00055   void SetField(int attributeID, double);
00056   // SFBool
00057   void SetField(int attributeID, bool);
00058 
00059   // For MFxxx attributes
00060   void SetField(int attributeID, int type, const double* a);
00061   void SetField(int attributeID, int type, vtkDataArray* a);
00062   void SetField(int attributeID, const double* values, size_t size);
00063 
00064   // MFInt32
00065   void SetField(int attributeID, int type, vtkCellArray* a);
00066   void SetField(int attributeID, const int* values, size_t size, bool image = false);
00067 
00068   int GetEncodingMethod();
00069 
00070   // Description:
00071   // Use fastest instead of best compression
00072   vtkSetClampMacro(Fastest, int, 0, 1);
00073   vtkBooleanMacro(Fastest, int);
00074   vtkGetMacro(Fastest, int);
00075 protected:
00076   vtkX3DExporterFIWriter();
00077   ~vtkX3DExporterFIWriter();
00078 
00079 
00080 private:
00081   void StartAttribute(int attributeID, bool literal, bool addToTable = false);
00082   void EndAttribute();
00083 
00084   void CheckNode(bool callerIsAttribute = true);
00085   bool IsLineFeedEncodingOn;
00086 
00087   //int Depth;
00088   vtkX3DExporterFIByteWriter* Writer;
00089   vtkX3DExporterFINodeInfoStack* InfoStack;
00090   vtkZLibDataCompressor* Compressor;
00091 
00092   int Fastest;
00093 
00094   vtkX3DExporterFIWriter(const vtkX3DExporterFIWriter&); // Not implemented.
00095   void operator=(const vtkX3DExporterFIWriter&); // Not implemented.
00096 
00097 };
00098 
00099 #endif
00100 

Generated by  doxygen 1.7.1