22 #ifndef vtkPVXMLElement_h 23 #define vtkPVXMLElement_h 26 #include "vtkPVVTKExtensionsCoreModule.h" 32 struct vtkPVXMLElementInternals;
46 vtkSetStringMacro(Name);
47 vtkGetStringMacro(Name);
55 vtkGetStringMacro(Id);
62 const char*
GetAttribute(
const char* name) {
return this->GetAttributeOrDefault(
name, NULL); }
70 return this->GetAttributeOrDefault(
name,
"");
77 const char* GetAttributeOrDefault(
const char* name,
const char* notFound);
82 const char* GetCharacterData();
89 int GetScalarAttribute(
const char* name,
int* value);
90 int GetScalarAttribute(
const char* name,
float* value);
91 int GetScalarAttribute(
const char* name,
double* value);
92 #if defined(VTK_USE_64BIT_IDS) 93 int GetScalarAttribute(
const char* name,
vtkIdType* value);
102 int GetVectorAttribute(
const char* name,
int length,
int* value);
103 int GetVectorAttribute(
const char* name,
int length,
float* value);
104 int GetVectorAttribute(
const char* name,
int length,
double* value);
105 #if defined(VTK_USE_64BIT_IDS) 106 int GetVectorAttribute(
const char* name,
int length,
vtkIdType* value);
115 int GetCharacterDataAsVector(
int length,
int* value);
116 int GetCharacterDataAsVector(
int length,
float* value);
117 int GetCharacterDataAsVector(
int length,
double* value);
118 #if defined(VTK_USE_64BIT_IDS) 119 int GetCharacterDataAsVector(
int length,
vtkIdType* value);
131 unsigned int GetNumberOfNestedElements();
153 void FindNestedElementByName(
const char* name,
vtkCollection* elements);
158 void RemoveAllNestedElements();
179 void AddAttribute(
const char* attrName,
const char* attrValue);
180 void AddAttribute(
const char* attrName,
unsigned int attrValue);
181 void AddAttribute(
const char* attrName,
double attrValue);
182 void AddAttribute(
const char* attrName,
double attrValue,
int precision);
183 void AddAttribute(
const char* attrName,
int attrValue);
184 #if defined(VTK_USE_64BIT_IDS) 185 void AddAttribute(
const char* attrName,
vtkIdType attrValue);
192 void RemoveAttribute(
const char* attrName);
201 void SetAttribute(
const char* attrName,
const char* attrValue);
217 void PrintXML(ostream& os,
vtkIndent indent);
239 void GetElementsByName(
const char* name,
vtkCollection* elements);
240 void GetElementsByName(
const char* name,
vtkCollection* elements,
bool recursively);
278 vtkSetStringMacro(Id);
279 void ReadXMLAttributes(
const char** atts);
280 void AddCharacterData(
const char* data,
int length);
const char * GetAttributeOrEmpty(const char *name)
Get the attribute with the given name.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
const char * GetAttribute(const char *name)
Get the attribute with the given name.
vtkPVXMLElementInternals * Internal
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
This is a subclass of vtkXMLParser that constructs a representation of parsed XML using vtkPVXMLEleme...
void operator=(const vtkObjectBase &)