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
Ben Boeckel
Xdmf
Commits
841b457d
Commit
841b457d
authored
May 16, 2008
by
Jerry Clarke
Browse files
Set Dimensions in Attribute
parent
f1a561b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
libsrc/XdmfAttribute.cxx
View file @
841b457d
...
...
@@ -228,6 +228,19 @@ if( Attribute ){
Attribute
=
this
->
Get
(
"Dimensions"
);
if
(
Attribute
){
this
->
ShapeDesc
->
SetShapeFromString
(
Attribute
);
}
else
{
XdmfXmlNode
ValuesNode
;
ValuesNode
=
this
->
DOM
->
FindDataElement
(
0
,
Element
);
if
(
!
ValuesNode
){
XdmfErrorMessage
(
"Dimensions of Attribute not set in XML and no DataItem found"
);
}
Attribute
=
this
->
DOM
->
Get
(
ValuesNode
,
"Dimensions"
);
if
(
!
Attribute
){
XdmfErrorMessage
(
"Dimensions of Attribute not set in XML or DataItem"
);
return
(
XDMF_FAIL
);
}
else
{
this
->
ShapeDesc
->
SetShapeFromString
(
Attribute
);
}
}
if
(
!
this
->
Name
)
this
->
SetName
(
GetUnique
(
"Attribute_"
));
return
(
XDMF_SUCCESS
);
...
...
libsrc/XdmfDOM.cxx
View file @
841b457d
...
...
@@ -657,6 +657,14 @@ if(!Node) {
Node
=
this
->
Tree
;
}
if
(
!
Node
)
return
(
0
);
/*
cout << "For " << Attribute << " DOM Returning ";
if((XdmfConstString)xmlGetProp(Node, (xmlChar *)Attribute)) {
cout << (XdmfConstString)xmlGetProp(Node, (xmlChar *)Attribute) << endl;
} else{
cout << " NULL " << endl;
}
*/
return
((
XdmfConstString
)
xmlGetProp
(
Node
,
(
xmlChar
*
)
Attribute
));
}
...
...
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