Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00063 #ifndef __vtkKWEXMLArchiveWriter_h
00064 #define __vtkKWEXMLArchiveWriter_h
00065
00066 #include "vtkKWESerializer.h"
00067 #include "VTKEdgeConfigure.h"
00068
00069 #include <vtkstd/vector>
00070 #include "vtkSmartPointer.h"
00071
00072
00073 struct vtkKWEXMLArchiveWriterInternals;
00074 class vtkKWEXMLElement;
00075
00076
00077 class VTKEdge_IO_EXPORT vtkKWEXMLArchiveWriter : public vtkKWESerializer
00078 {
00079 public:
00080 static vtkKWEXMLArchiveWriter *New();
00081 vtkTypeRevisionMacro(vtkKWEXMLArchiveWriter,vtkKWESerializer);
00082 void PrintSelf(ostream& os, vtkIndent indent);
00083
00086 virtual bool IsWriting() {return true;}
00087
00089
00104 virtual void Serialize(ostream& ostr, const char* rootName,
00105 vtkstd::vector<vtkSmartPointer<vtkObject> >& objs);
00107
00109
00112 virtual void Serialize(vtkKWEXMLElement* elem, const char* rootName,
00113 vtkstd::vector<vtkSmartPointer<vtkObject> >& objs);
00115
00117
00120 virtual void Serialize(vtkKWEXMLElement* elem, const char* rootName,
00121 vtkObject *objs);
00123
00125 virtual void Serialize(const char* name, int& val);
00126
00128 virtual void Serialize(const char* name, int*& val, unsigned int& length);
00129
00131 virtual void Serialize(const char* name, unsigned long& val) ;
00132
00134 virtual void Serialize(const char* name, unsigned long*& val, unsigned int& length);
00135
00137
00138 #if defined(VTK_USE_64BIT_IDS)
00139 virtual void Serialize(const char* name, vtkIdType& val);
00140 #endif
00141
00142
00144
00145 #if defined(VTK_USE_64BIT_IDS)
00146 virtual void Serialize(const char* name, vtkIdType*& val, unsigned int& length);
00147 #endif
00148
00149
00151 virtual void Serialize(const char* name, double& val);
00152
00154 virtual void Serialize(const char* name, double*& val, unsigned int& length);
00155
00157 virtual void Serialize(const char* name, char*& str);
00158
00160 virtual void Serialize(const char* name, vtkstd::string& str);
00161
00169 virtual void Serialize(const char* name, vtkObject*& object, bool weakPtr = false);
00170
00172 virtual void Serialize(const char* name, vtkInformation* info);
00173
00175
00179 virtual void Serialize(const char* name,
00180 vtkstd::vector<vtkSmartPointer<vtkObject> >& objs,
00181 bool weakPtr = false);
00183
00185
00186 virtual void Serialize(const char* name,
00187 vtkstd::map<int, vtkstd::vector<vtkSmartPointer<vtkObject> > >& objs);
00189
00190 protected:
00191 vtkKWEXMLArchiveWriter();
00192 ~vtkKWEXMLArchiveWriter();
00193
00199 virtual unsigned int Serialize(vtkObject*& obj);
00200
00201 private:
00202 vtkKWEXMLArchiveWriter(const vtkKWEXMLArchiveWriter&);
00203 void operator=(const vtkKWEXMLArchiveWriter&);
00204
00205 virtual void CreateDOM(const char* rootName,
00206 vtkstd::vector<vtkSmartPointer<vtkObject> >& objs);
00207
00208 void SetRootElement(vtkKWEXMLElement*);
00209
00211 virtual void Serialize(vtkKWEXMLElement* elem, vtkInformation* info);
00212
00213 vtkKWEXMLArchiveWriterInternals* Internal;
00214 vtkKWEXMLElement* RootElement;
00215 };
00216
00217 #endif