Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
VTK
Commits
17d11447
Commit
17d11447
authored
May 21, 2003
by
Brad King
💬
Browse files
ENH: Added GetAttributeValue method to get an attribute's value by its index.
parent
9d09ec6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
IO/vtkXMLDataElement.cxx
View file @
17d11447
...
...
@@ -21,7 +21,7 @@
#include
<ctype.h>
vtkCxxRevisionMacro
(
vtkXMLDataElement
,
"1.1
3
"
);
vtkCxxRevisionMacro
(
vtkXMLDataElement
,
"1.1
4
"
);
vtkStandardNewMacro
(
vtkXMLDataElement
);
//----------------------------------------------------------------------------
...
...
@@ -225,6 +225,17 @@ const char* vtkXMLDataElement::GetAttributeName(int idx)
return
this
->
AttributeNames
[
idx
];
}
//----------------------------------------------------------------------------
const
char
*
vtkXMLDataElement
::
GetAttributeValue
(
int
idx
)
{
if
(
idx
<
0
||
idx
>=
this
->
NumberOfAttributes
)
{
return
0
;
}
return
this
->
AttributeValues
[
idx
];
}
//----------------------------------------------------------------------------
void
vtkXMLDataElement
::
PrintXML
(
ostream
&
os
,
vtkIndent
indent
)
{
...
...
IO/vtkXMLDataElement.h
View file @
17d11447
...
...
@@ -115,6 +115,11 @@ public:
// Returns 0 if there is no such attribute.
const
char
*
GetAttributeName
(
int
idx
);
// Description:
// Get the n-th attribute value.
// Returns 0 if there is no such attribute.
const
char
*
GetAttributeValue
(
int
idx
);
// Description:
// Remove all attributes.
virtual
void
RemoveAllAttributes
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment