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 "vtkPVVTKExtensionsMiscModule.h" // needed for export macro
32 
34 class vtkPVXMLElement;
35 class vtkSelection;
36 class vtkSelectionNode;
37 
39 {
40 public:
41  static vtkSelectionSerializer* New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
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:
74  ~vtkSelectionSerializer() override;
75 
76 private:
78  void operator=(const vtkSelectionSerializer&) = delete;
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
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
#define VTKPVVTKEXTENSIONSMISC_EXPORT
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
static vtkObject * New()
Serialize/deserialize vtkSelection to/from xml.
void operator=(const vtkObjectBase &)