VTK
vtkX3DExporterFIWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkX3DExporterFIWriter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
19 #ifndef __vtkX3DExporterFIWriter_h
20 #define __vtkX3DExporterFIWriter_h
21 
22 #include "vtkX3DExporterWriter.h"
23 
24 class vtkX3DExporterFIByteWriter;
25 class vtkX3DExporterFINodeInfoStack;
27 
29 {
30 public:
31  static vtkX3DExporterFIWriter *New();
33  void PrintSelf(ostream& os, vtkIndent indent);
34 
35  virtual void CloseFile();
36  virtual int OpenFile(const char* file);
37 
38 
39  //void Write(const char* str);
40 
41  virtual void Flush();
42 
43  void StartDocument();
44  void EndDocument();
45 
46  // Elements
47  void StartNode(int elementID);
48  void EndNode();
49 
50  // Attributes
51  // SFString / MFString
52  //void SetField(int attributeID, const vtkstd::string &value);
53  void SetField(int attributeID, const char*, bool mfstring = false);
54  // SFInt32
55  void SetField(int attributeID, int);
56  // SFFloat
57  void SetField(int attributeID, float);
58  // SFDouble
59  void SetField(int attributeID, double);
60  // SFBool
61  void SetField(int attributeID, bool);
62 
63  // For MFxxx attributes
64  void SetField(int attributeID, int type, const double* a);
65  void SetField(int attributeID, int type, vtkDataArray* a);
66  void SetField(int attributeID, const double* values, size_t size);
67 
68  // MFInt32
69  void SetField(int attributeID, int type, vtkCellArray* a);
70  void SetField(int attributeID, const int* values, size_t size, bool image = false);
71 
72  int GetEncodingMethod();
73 
75 
76  vtkSetClampMacro(Fastest, int, 0, 1);
77  vtkBooleanMacro(Fastest, int);
78  vtkGetMacro(Fastest, int);
79 protected:
83 
84 
85 private:
86  void StartAttribute(int attributeID, bool literal, bool addToTable = false);
87  void EndAttribute();
88 
89  void CheckNode(bool callerIsAttribute = true);
90  bool IsLineFeedEncodingOn;
91 
92  //int Depth;
93  vtkX3DExporterFIByteWriter* Writer;
94  vtkX3DExporterFINodeInfoStack* InfoStack;
95  vtkZLibDataCompressor* Compressor;
96 
97  int Fastest;
98 
99  vtkX3DExporterFIWriter(const vtkX3DExporterFIWriter&); // Not implemented.
100  void operator=(const vtkX3DExporterFIWriter&); // Not implemented.
101 
102 };
103 
104 #endif
105 
X3D Exporter Writer.
virtual void StartNode(int nodeID)=0
virtual void EndNode()=0
virtual void CloseFile()=0
void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
virtual void SetField(int attributeID, const char *value, bool mfstring=false)=0
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
Data compression using zlib.
virtual void StartDocument()=0
object to represent cell connectivity
Definition: vtkCellArray.h:48
virtual void EndDocument()=0
static vtkObject * New()
#define VTK_HYBRID_EXPORT
virtual int OpenFile(const char *file)=0