ParaView
vtkSelectionSerializer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSelectionSerializer.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
27 #ifndef vtkSelectionSerializer_h
28 #define vtkSelectionSerializer_h
29 
30 #include "vtkObject.h"
31 #include "vtkPVVTKExtensionsRenderingModule.h" // needed for export macro
32 
33 class vtkInformationIntegerKey;
34 class vtkPVXMLElement;
35 class vtkSelection;
36 class vtkSelectionNode;
37 
38 class VTKPVVTKEXTENSIONSRENDERING_EXPORT vtkSelectionSerializer : public vtkObject
39 {
40 public:
41  static vtkSelectionSerializer* New();
42  vtkTypeMacro(vtkSelectionSerializer, vtkObject);
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
50  static void PrintXML(int printData, vtkSelection* selection);
51  static void PrintXML(ostream& os, vtkIndent indent, int printData, vtkSelection* selection);
53 
55 
62  static void Parse(const char* xml, vtkSelection* root);
63  static void Parse(const char* xml, unsigned int length, vtkSelection* root);
65 
70  static vtkInformationIntegerKey* ORIGINAL_SOURCE_ID();
71 
72 protected:
75 
76 private:
77  vtkSelectionSerializer(const vtkSelectionSerializer&) VTK_DELETE_FUNCTION;
78  void operator=(const vtkSelectionSerializer&) VTK_DELETE_FUNCTION;
79 
80  static void WriteSelectionData(ostream& os, vtkIndent indent, vtkSelectionNode* selection);
81  static void Parse(vtkPVXMLElement* rootElem, vtkSelection* root);
82  static void ParseNode(vtkPVXMLElement* nodeXML, vtkSelectionNode* node);
83 };
84 
85 #endif
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
Serialize/deserialize vtkSelection to/from xml.