16 #ifndef vtkXMLDataElement_h
17 #define vtkXMLDataElement_h
19 #include "vtkCommonDataModelModule.h"
22 VTK_ABI_NAMESPACE_BEGIN
36 vtkGetStringMacro(Name);
37 virtual void SetName(
const char* _arg);
44 vtkGetStringMacro(Id);
45 vtkSetStringMacro(Id);
52 const char* GetAttribute(
const char*
name);
58 void SetAttribute(
const char*
name,
const char*
value);
64 void SetCharacterData(
const char*
data,
int length);
65 void AddCharacterData(
const char* c,
size_t length);
66 vtkGetStringMacro(CharacterData);
74 int GetScalarAttribute(
const char*
name,
int&
value);
75 int GetScalarAttribute(
const char*
name,
float&
value);
76 int GetScalarAttribute(
const char*
name,
double&
value);
77 int GetScalarAttribute(
const char*
name,
long&
value);
78 int GetScalarAttribute(
const char*
name,
unsigned long&
value);
88 void SetIntAttribute(
const char*
name,
int value);
89 void SetFloatAttribute(
const char*
name,
float value);
90 void SetDoubleAttribute(
const char*
name,
double value);
91 void SetUnsignedLongAttribute(
const char*
name,
unsigned long value);
103 int GetVectorAttribute(
const char*
name,
int length,
unsigned long*
value);
110 void SetVectorAttribute(
const char*
name,
int length,
const int*
value);
111 void SetVectorAttribute(
const char*
name,
int length,
const float*
value);
112 void SetVectorAttribute(
const char*
name,
int length,
const double*
value);
113 void SetVectorAttribute(
const char*
name,
int length,
const unsigned long*
value);
116 int GetScalarAttribute(
const char*
name,
long long&
value);
117 int GetVectorAttribute(
const char*
name,
int length,
long long*
value);
118 void SetVectorAttribute(
const char*
name,
int length,
long long const*
value);
119 int GetScalarAttribute(
const char*
name,
unsigned long long&
value);
120 int GetVectorAttribute(
const char*
name,
int length,
unsigned long long*
value);
121 void SetVectorAttribute(
const char*
name,
int length,
unsigned long long const*
value);
129 int GetWordTypeAttribute(
const char*
name,
int&
value);
135 vtkGetMacro(NumberOfAttributes,
int);
142 const char* GetAttributeName(
int idx);
148 const char* GetAttributeValue(
int idx);
154 virtual void RemoveAttribute(
const char*
name);
155 virtual void RemoveAllAttributes();
174 int GetNumberOfNestedElements();
194 virtual void RemoveAllNestedElements();
207 const char*
name,
const char* att_name,
const char* att_value);
225 vtkGetMacro(XMLByteIndex, vtkTypeInt64);
226 vtkSetMacro(XMLByteIndex, vtkTypeInt64);
256 vtkGetMacro(AttributeEncoding,
int);
263 void PrintXML(ostream& os,
vtkIndent indent);
276 vtkGetMacro(CharacterDataWidth,
int);
277 vtkSetMacro(CharacterDataWidth,
int);
302 vtkGetMacro(InlineDataPosition, vtkTypeInt64);
303 vtkSetMacro(InlineDataPosition, vtkTypeInt64);
326 static int IsSpace(
char c);
327 void PrintCharacterData(ostream& os,
vtkIndent indent);
328 static void PrintWithEscapedData(ostream& os,
const char*
data);
331 friend class vtkXMLMaterialParser;
361 memmove(pCD, data, length);
365 VTK_ABI_NAMESPACE_END
size_t EndOfCharacterData
vtkXMLDataElement ** NestedElements
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Represents an XML element and those nested inside.
size_t CharacterDataBufferSize
size_t CharacterDataBlockSize
#define VTK_ENCODING_UNKNOWN
vtkTypeBool IgnoreCharacterData
vtkTypeInt64 XMLByteIndex
void AddCharacterData(const char *c, size_t length)
Set/Get the character data between XML start/end tags.
vtkXMLDataElement * Parent
a simple class to control print indentation
#define VTK_ENCODING_NONE
Used by vtkXMLReader to parse VTK XML files.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
int NumberOfNestedElements
vtkTypeInt64 InlineDataPosition