VTK
vtkXMLUtilities.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLUtilities.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 =========================================================================*/
23 #ifndef vtkXMLUtilities_h
24 #define vtkXMLUtilities_h
25 
26 #include "vtkIOXMLParserModule.h" // For export macro
27 #include "vtkObject.h"
28 
29 class vtkXMLDataElement;
30 
32 {
33 public:
34  static vtkXMLUtilities* New();
36 
38 
41  static void EncodeString(const char *input, int input_encoding,
42  ostream &output, int output_encoding,
43  int special_entities = 0);
45 
47 
53  ostream&,
54  const char *sep = 0);
56 
57  //BTX
59 
67  ostream&,
68  vtkIndent *indent = 0,
69  int indent_attributes = 1);
71 
73 
77  const char *filename,
78  vtkIndent *indent = 0);
79  //ETX
81 
82  //BTX
84 
94  istream&, int encoding = VTK_ENCODING_NONE);
96  const char *str, int encoding = VTK_ENCODING_NONE);
98  const char *filename, int encoding = VTK_ENCODING_NONE);
99  //ETX
101 
103 
111  vtkXMLDataElement *element,
112  const char** atts,
113  int encoding);
115 
116  //BTX
118 
125  vtkXMLDataElement *tree,
126  vtkXMLDataElement ***results);
127  //ETX
129 
131 
134  static void FactorElements(vtkXMLDataElement *tree);
137 
138 protected:
141 
143  vtkXMLDataElement *root,
144  vtkXMLDataElement *pool);
146  vtkXMLDataElement *pool);
147 
148 private:
149  vtkXMLUtilities(const vtkXMLUtilities&); // Not implemented
150  void operator=(const vtkXMLUtilities&); // Not implemented
151 };
152 
153 #endif
154 
155 
156 // VTK-HeaderTest-Exclude: vtkXMLUtilities.h
vtkXMLUtilities
XML utilities.
Definition: vtkXMLUtilities.h:32
vtkXMLUtilities::FlattenElement
static void FlattenElement(vtkXMLDataElement *, ostream &, vtkIndent *indent=0, int indent_attributes=1)
vtkXMLUtilities::~vtkXMLUtilities
~vtkXMLUtilities()
Definition: vtkXMLUtilities.h:140
VTK_ENCODING_NONE
#define VTK_ENCODING_NONE
Definition: vtkSystemIncludes.h:137
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkgl::input
GLenum GLenum GLenum input
Definition: vtkgl.h:15941
vtkXMLUtilities::New
static vtkXMLUtilities * New()
vtkXMLUtilities::WriteElementToFile
static int WriteElementToFile(vtkXMLDataElement *, const char *filename, vtkIndent *indent=0)
vtkXMLUtilities::EncodeString
static void EncodeString(const char *input, int input_encoding, ostream &output, int output_encoding, int special_entities=0)
VTKIOXMLPARSER_EXPORT
#define VTKIOXMLPARSER_EXPORT
Definition: vtkIOXMLParserModule.h:15
vtkXMLUtilities::ReadElementFromStream
static vtkXMLDataElement * ReadElementFromStream(istream &, int encoding=VTK_ENCODING_NONE)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkXMLUtilities::FactorElements
static void FactorElements(vtkXMLDataElement *tree)
vtkXMLUtilities::FindSimilarElements
static int FindSimilarElements(vtkXMLDataElement *elem, vtkXMLDataElement *tree, vtkXMLDataElement ***results)
vtkIOXMLParserModule.h
vtkXMLDataElement
Represents an XML element and those nested inside.
Definition: vtkXMLDataElement.h:36
vtkXMLUtilities::CollateAttributes
static void CollateAttributes(vtkXMLDataElement *, ostream &, const char *sep=0)
vtkObject.h
vtkXMLUtilities::ReadElementFromAttributeArray
static void ReadElementFromAttributeArray(vtkXMLDataElement *element, const char **atts, int encoding)
vtkXMLUtilities::vtkXMLUtilities
vtkXMLUtilities()
Definition: vtkXMLUtilities.h:139
vtkXMLUtilities::UnFactorElementsInternal
static int UnFactorElementsInternal(vtkXMLDataElement *tree, vtkXMLDataElement *pool)
vtkXMLUtilities::ReadElementFromString
static vtkXMLDataElement * ReadElementFromString(const char *str, int encoding=VTK_ENCODING_NONE)
vtkXMLUtilities::UnFactorElements
static void UnFactorElements(vtkXMLDataElement *tree)
vtkXMLUtilities::ReadElementFromFile
static vtkXMLDataElement * ReadElementFromFile(const char *filename, int encoding=VTK_ENCODING_NONE)
vtkXMLUtilities::FactorElementsInternal
static int FactorElementsInternal(vtkXMLDataElement *tree, vtkXMLDataElement *root, vtkXMLDataElement *pool)