00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00019 #ifndef __vtkX3DExporterFIWriter_h
00020 #define __vtkX3DExporterFIWriter_h
00021
00022 #include "vtkX3DExporterWriter.h"
00023
00024 class vtkX3DExporterFIByteWriter;
00025 class vtkX3DExporterFINodeInfoStack;
00026 class vtkZLibDataCompressor;
00027
00028 class VTK_HYBRID_EXPORT vtkX3DExporterFIWriter : public vtkX3DExporterWriter
00029 {
00030 public:
00031 static vtkX3DExporterFIWriter *New();
00032 vtkTypeMacro(vtkX3DExporterFIWriter, vtkX3DExporterWriter);
00033 void PrintSelf(ostream& os, vtkIndent indent);
00034
00035 virtual void CloseFile();
00036 virtual int OpenFile(const char* file);
00037
00038
00039
00040
00041 virtual void Flush();
00042
00043 void StartDocument();
00044 void EndDocument();
00045
00046
00047 void StartNode(int elementID);
00048 void EndNode();
00049
00050
00051
00052
00053 void SetField(int attributeID, const char*, bool mfstring = false);
00054
00055 void SetField(int attributeID, int);
00056
00057 void SetField(int attributeID, float);
00058
00059 void SetField(int attributeID, double);
00060
00061 void SetField(int attributeID, bool);
00062
00063
00064 void SetField(int attributeID, int type, const double* a);
00065 void SetField(int attributeID, int type, vtkDataArray* a);
00066 void SetField(int attributeID, const double* values, size_t size);
00067
00068
00069 void SetField(int attributeID, int type, vtkCellArray* a);
00070 void SetField(int attributeID, const int* values, size_t size, bool image = false);
00071
00072 int GetEncodingMethod();
00073
00075
00076 vtkSetClampMacro(Fastest, int, 0, 1);
00077 vtkBooleanMacro(Fastest, int);
00078 vtkGetMacro(Fastest, int);
00080 protected:
00081 vtkX3DExporterFIWriter();
00082 ~vtkX3DExporterFIWriter();
00083
00084
00085 private:
00086 void StartAttribute(int attributeID, bool literal, bool addToTable = false);
00087 void EndAttribute();
00088
00089 void CheckNode(bool callerIsAttribute = true);
00090 bool IsLineFeedEncodingOn;
00091
00092
00093 vtkX3DExporterFIByteWriter* Writer;
00094 vtkX3DExporterFINodeInfoStack* InfoStack;
00095 vtkZLibDataCompressor* Compressor;
00096
00097 int Fastest;
00098
00099 vtkX3DExporterFIWriter(const vtkX3DExporterFIWriter&);
00100 void operator=(const vtkX3DExporterFIWriter&);
00101
00102 };
00103
00104 #endif
00105