00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
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
00036
00037 virtual void Flush();
00038
00039 void StartDocument();
00040 void EndDocument();
00041
00042
00043 void StartNode(int elementID);
00044 void EndNode();
00045
00046
00047
00048
00049 void SetField(int attributeID, const char*, bool mfstring = false);
00050
00051 void SetField(int attributeID, int);
00052
00053 void SetField(int attributeID, float);
00054
00055 void SetField(int attributeID, double);
00056
00057 void SetField(int attributeID, bool);
00058
00059
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
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
00071
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
00088 vtkX3DExporterFIByteWriter* Writer;
00089 vtkX3DExporterFINodeInfoStack* InfoStack;
00090 vtkZLibDataCompressor* Compressor;
00091
00092 int Fastest;
00093
00094 vtkX3DExporterFIWriter(const vtkX3DExporterFIWriter&);
00095 void operator=(const vtkX3DExporterFIWriter&);
00096
00097 };
00098
00099 #endif
00100