28 #ifndef vtkXMLDataElement_h
29 #define vtkXMLDataElement_h
31 #include "vtkCommonDataModelModule.h"
47 vtkGetStringMacro(Name);
48 virtual void SetName (
const char* _arg);
55 vtkGetStringMacro(Id);
56 vtkSetStringMacro(Id);
63 const char* GetAttribute(
const char*
name);
69 void SetAttribute(
const char*
name,
const char*
value);
75 void SetCharacterData(
const char* c,
int length);
76 void AddCharacterData(
const char* c,
size_t length);
77 vtkGetStringMacro(CharacterData);
85 int GetScalarAttribute(
const char*
name,
int&
value);
86 int GetScalarAttribute(
const char*
name,
float&
value);
87 int GetScalarAttribute(
const char*
name,
double&
value);
88 int GetScalarAttribute(
const char*
name,
long&
value);
89 int GetScalarAttribute(
const char*
name,
unsigned long&
value);
99 void SetIntAttribute(
const char*
name,
int value);
100 void SetFloatAttribute(
const char*
name,
float value);
101 void SetDoubleAttribute(
const char*
name,
double value);
102 void SetUnsignedLongAttribute(
const char*
name,
unsigned long value);
114 int GetVectorAttribute(
const char*
name,
int length,
unsigned long*
value);
121 void SetVectorAttribute(
const char*
name,
int length,
const int*
value);
122 void SetVectorAttribute(
const char*
name,
int length,
const float*
value);
123 void SetVectorAttribute(
const char*
name,
int length,
const double*
value);
124 void SetVectorAttribute(
const char*
name,
int length,
const unsigned long*
value);
127 int GetScalarAttribute(
const char*
name,
long long&
value);
128 int GetVectorAttribute(
const char*
name,
int length,
long long*
value);
129 void SetVectorAttribute(
const char*
name,
int length,
long long const*
value);
130 int GetScalarAttribute(
const char*
name,
unsigned long long&
value);
131 int GetVectorAttribute(
const char*
name,
int length,
unsigned long long*
value);
132 void SetVectorAttribute(
const char*
name,
int length,
unsigned long long const*
value);
138 int GetWordTypeAttribute(
const char*
name,
int&
value);
144 vtkGetMacro(NumberOfAttributes,
int);
151 const char* GetAttributeName(
int idx);
157 const char* GetAttributeValue(
int idx);
163 virtual void RemoveAttribute(
const char *
name);
164 virtual void RemoveAllAttributes();
183 int GetNumberOfNestedElements();
203 virtual void RemoveAllNestedElements();
215 const char*
name,
const char*
id);
217 const char*
name,
const char* att_name,
const char* att_value);
235 vtkGetMacro(XMLByteIndex, vtkTypeInt64);
236 vtkSetMacro(XMLByteIndex, vtkTypeInt64);
266 vtkGetMacro(AttributeEncoding,
int);
273 void PrintXML(ostream& os,
vtkIndent indent);
274 void PrintXML(
const char* fname);
286 vtkGetMacro(CharacterDataWidth,
int);
287 vtkSetMacro(CharacterDataWidth,
int);
312 vtkGetMacro(InlineDataPosition,vtkTypeInt64);
313 vtkSetMacro(InlineDataPosition,vtkTypeInt64);
336 static int IsSpace(
char c);
337 void PrintCharacterData(ostream &os,
vtkIndent indent);
338 static void PrintWithEscapedData(ostream& os,
const char*
data);
341 friend class vtkXMLMaterialParser;