27 #ifndef __vtkXMLDataElement_h
28 #define __vtkXMLDataElement_h
45 virtual void SetName (
const char* _arg);
56 const char* GetAttribute(
const char*
name);
60 void SetAttribute(
const char*
name,
const char*
value);
64 void SetCharacterData(
const char*
c,
int length);
65 void AddCharacterData(
const char*
c,
size_t length);
72 int GetScalarAttribute(
const char*
name,
int&
value);
73 int GetScalarAttribute(
const char*
name,
float&
value);
74 int GetScalarAttribute(
const char*
name,
double&
value);
75 int GetScalarAttribute(
const char*
name,
unsigned long&
value);
83 void SetIntAttribute(
const char*
name,
int value);
84 void SetFloatAttribute(
const char*
name,
float value);
85 void SetDoubleAttribute(
const char*
name,
double value);
86 void SetUnsignedLongAttribute(
const char*
name,
unsigned long value);
95 int GetVectorAttribute(
const char*
name,
int length,
unsigned long*
value);
100 void SetVectorAttribute(
const char*
name,
int length,
const int*
value);
101 void SetVectorAttribute(
const char*
name,
int length,
const float*
value);
102 void SetVectorAttribute(
const char*
name,
int length,
const double*
value);
103 void SetVectorAttribute(
const char*
name,
int length,
const unsigned long*
value);
107 #ifdef VTK_TYPE_USE_LONG_LONG
108 int GetScalarAttribute(
const char*
name,
long long&
value);
109 int GetVectorAttribute(
const char*
name,
int length,
long long*
value);
110 void SetVectorAttribute(
const char*
name,
int length,
long long const*
value);
111 int GetScalarAttribute(
const char*
name,
unsigned long long&
value);
112 int GetVectorAttribute(
const char*
name,
int length,
unsigned long long*
value);
113 void SetVectorAttribute(
const char*
name,
int length,
unsigned long long const*
value);
115 #ifdef VTK_TYPE_USE___INT64
116 int GetScalarAttribute(
const char*
name, __int64&
value);
118 void SetVectorAttribute(
const char*
name,
int length, __int64
const*
value);
119 int GetScalarAttribute(
const char*
name,
unsigned __int64&
value);
120 int GetVectorAttribute(
const char*
name,
int length,
unsigned __int64*
value);
121 void SetVectorAttribute(
const char*
name,
int length,
unsigned __int64
const*
value);
127 int GetWordTypeAttribute(
const char*
name,
int&
value);
135 const char* GetAttributeName(
int idx);
139 const char* GetAttributeValue(
int idx);
143 virtual void RemoveAttribute(
const char *
name);
144 virtual void RemoveAllAttributes();
157 int GetNumberOfNestedElements();
169 virtual void RemoveAllNestedElements();
178 const char*
name,
const char*
id);
180 const char*
name,
const char* att_name,
const char* att_value);
220 void PrintXML(ostream& os,
vtkIndent indent);
221 void PrintXML(
const char* fname);
280 static int IsSpace(
char c);
281 void PrintCharacterData(ostream &os,
vtkIndent indent);
282 static void PrintWithEscapedData(ostream& os,
const char*
data);
286 friend class vtkXMLMaterialParser;
315 memmove(pCD,data,length);
GLsizei GLsizei GLenum GLenum const GLvoid * data
size_t EndOfCharacterData
vtkXMLDataElement ** NestedElements
abstract base class for most VTK objects
Represents an XML element and those nested inside.
size_t CharacterDataBufferSize
#define vtkGetMacro(name, type)
size_t CharacterDataBlockSize
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
GLuint GLsizei GLsizei * length
#define vtkSetClampMacro(name, type, min, max)
GLsizei const GLfloat * value
#define VTK_ENCODING_UNKNOWN
#define vtkSetStringMacro(name)
#define vtkTypeMacro(thisClass, superclass)
vtkTypeInt64 XMLByteIndex
void AddCharacterData(const char *c, size_t length)
GLuint const GLchar * name
vtkXMLDataElement * Parent
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
#define VTK_ENCODING_NONE
#define vtkGetStringMacro(name)
Used by vtkXMLReader to parse VTK XML files.
int NumberOfNestedElements
vtkTypeInt64 InlineDataPosition
#define VTKCOMMONDATAMODEL_EXPORT
#define vtkSetMacro(name, type)