27 #ifndef __vtkXMLDataElement_h
28 #define __vtkXMLDataElement_h
32 class vtkXMLDataParser;
43 vtkGetStringMacro(Name);
44 virtual void SetName (
const char* _arg);
49 vtkGetStringMacro(Id);
50 vtkSetStringMacro(Id);
55 const char* GetAttribute(
const char* name);
59 void SetAttribute(
const char* name,
const char* value);
63 void SetCharacterData(
const char* c,
int length);
64 void AddCharacterData(
const char* c,
size_t length);
65 vtkGetStringMacro(CharacterData);
71 int GetScalarAttribute(
const char* name,
int& value);
72 int GetScalarAttribute(
const char* name,
float& value);
73 int GetScalarAttribute(
const char* name,
double& value);
74 int GetScalarAttribute(
const char* name,
unsigned long& value);
82 void SetIntAttribute(
const char* name,
int value);
83 void SetFloatAttribute(
const char* name,
float value);
84 void SetDoubleAttribute(
const char* name,
double value);
85 void SetUnsignedLongAttribute(
const char* name,
unsigned long value);
91 int GetVectorAttribute(
const char* name,
int length,
int* value);
92 int GetVectorAttribute(
const char* name,
int length,
float* value);
93 int GetVectorAttribute(
const char* name,
int length,
double* value);
94 int GetVectorAttribute(
const char* name,
int length,
unsigned long* value);
99 void SetVectorAttribute(
const char* name,
int length,
const int* value);
100 void SetVectorAttribute(
const char* name,
int length,
const float* value);
101 void SetVectorAttribute(
const char* name,
int length,
const double* value);
102 void SetVectorAttribute(
const char* name,
int length,
const unsigned long* value);
105 #ifdef VTK_USE_64BIT_IDS
107 int GetScalarAttribute(
const char* name,
vtkIdType& value);
108 void SetIdTypeAttribute(
const char* name,
vtkIdType value);
109 int GetVectorAttribute(
const char* name,
int length,
vtkIdType* value);
110 void SetVectorAttribute(
const char* name,
int length,
const vtkIdType* value);
116 int GetWordTypeAttribute(
const char* name,
int& value);
120 vtkGetMacro(NumberOfAttributes,
int);
124 const char* GetAttributeName(
int idx);
128 const char* GetAttributeValue(
int idx);
132 virtual void RemoveAttribute(
const char *name);
133 virtual void RemoveAllAttributes();
146 int GetNumberOfNestedElements();
158 virtual void RemoveAllNestedElements();
167 const char* name,
const char*
id);
169 const char* name,
const char* att_name,
const char* att_value);
182 vtkGetMacro(XMLByteIndex,
unsigned long);
183 vtkSetMacro(XMLByteIndex,
unsigned long);
204 vtkGetMacro(AttributeEncoding,
int);
209 void PrintXML(ostream& os,
vtkIndent indent);
210 void PrintXML(
const char* fname);
219 vtkGetMacro(CharacterDataWidth,
int);
220 vtkSetMacro(CharacterDataWidth,
int);
245 vtkGetMacro(InlineDataPosition,
unsigned long);
246 vtkSetMacro(InlineDataPosition,
unsigned long);
269 static int IsSpace(
char c);
270 void PrintCharacterData(ostream &os,
vtkIndent indent);
271 static void PrintWithEscapedData(ostream& os,
const char* data);
274 friend class vtkXMLDataParser;
275 friend class vtkXMLMaterialParser;
304 memmove(pCD,data,length);
size_t EndOfCharacterData
vtkXMLDataElement ** NestedElements
abstract base class for most VTK objects
Represents an XML element and those nested inside.
size_t CharacterDataBufferSize
size_t CharacterDataBlockSize
#define VTK_ENCODING_UNKNOWN
void AddCharacterData(const char *c, size_t length)
unsigned long InlineDataPosition
unsigned long XMLByteIndex
vtkXMLDataElement * Parent
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
#define VTK_ENCODING_NONE
int NumberOfNestedElements