22 #ifndef vtkPVXMLElement_h 23 #define vtkPVXMLElement_h 33 struct vtkPVXMLElementInternals;
47 vtkSetStringMacro(Name);
48 vtkGetStringMacro(Name);
56 vtkGetStringMacro(Id);
63 const char*
GetAttribute(
const char* name) {
return this->GetAttributeOrDefault(name, NULL); }
71 return this->GetAttributeOrDefault(name,
"");
78 const char* GetAttributeOrDefault(
const char*
name,
const char* notFound);
83 const char* GetCharacterData();
90 int GetScalarAttribute(
const char* name,
int*
value);
91 int GetScalarAttribute(
const char* name,
float* value);
92 int GetScalarAttribute(
const char* name,
double* value);
93 #if defined(VTK_USE_64BIT_IDS) 94 int GetScalarAttribute(
const char* name,
vtkIdType* value);
103 int GetVectorAttribute(
const char* name,
int length,
int* value);
104 int GetVectorAttribute(
const char* name,
int length,
float* value);
105 int GetVectorAttribute(
const char* name,
int length,
double* value);
106 #if defined(VTK_USE_64BIT_IDS) 107 int GetVectorAttribute(
const char* name,
int length,
vtkIdType* value);
116 int GetCharacterDataAsVector(
int length,
int* value);
117 int GetCharacterDataAsVector(
int length,
float* value);
118 int GetCharacterDataAsVector(
int length,
double* value);
119 #if defined(VTK_USE_64BIT_IDS) 120 int GetCharacterDataAsVector(
int length,
vtkIdType* value);
132 unsigned int GetNumberOfNestedElements();
154 void FindNestedElementByName(
const char* name,
vtkCollection* elements);
159 void RemoveAllNestedElements();
180 void AddAttribute(
const char* attrName,
const char* attrValue);
181 void AddAttribute(
const char* attrName,
unsigned int attrValue);
182 void AddAttribute(
const char* attrName,
double attrValue);
183 void AddAttribute(
const char* attrName,
double attrValue,
int precision);
184 void AddAttribute(
const char* attrName,
int attrValue);
185 #if defined(VTK_USE_64BIT_IDS) 186 void AddAttribute(
const char* attrName,
vtkIdType attrValue);
193 void RemoveAttribute(
const char* attrName);
202 void SetAttribute(
const char* attrName,
const char* attrValue);
218 void PrintXML(ostream& os,
vtkIndent indent);
240 void GetElementsByName(
const char* name,
vtkCollection* elements);
241 void GetElementsByName(
const char* name,
vtkCollection* elements,
bool recursively);
247 static std::string Encode(
const char* plaintext);
279 vtkSetStringMacro(Id);
280 void ReadXMLAttributes(
const char** atts);
281 void AddCharacterData(
const char* data,
int length);
#define VTKPVVTKEXTENSIONSCORE_EXPORT
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 &)