Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xdmf
Xdmf
Commits
43de25a5
Commit
43de25a5
authored
Dec 02, 2010
by
Brian Panneton
Browse files
FIX: Corrected a segfault when two objects are next to each other.
Also added extra install commands.
parent
02e1a0ee
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
43de25a5
...
...
@@ -120,7 +120,10 @@ if(XDMF_WRAP_JAVA)
${
CMAKE_BINARY_DIR
}
/
${
java_name
}
.jar
${
XDMF_JAVA_DIR
}
)
install
(
FILES
${
CMAKE_BINARY_DIR
}
/
${
java_name
}
.jar DESTINATION lib/java
)
install
(
FILES
${
CMAKE_BINARY_DIR
}
/
${
java_name
}
.jar
DESTINATION lib/java
)
install
(
TARGETS
${
SWIG_MODULE_
${
java_name
}
Java_REAL_NAME
}
DESTINATION lib/java
)
ENDMACRO
(
XDMF_SWIG_JAVA
)
endif
(
XDMF_WRAP_JAVA
)
...
...
@@ -173,7 +176,7 @@ if(NOT XDMF_BUILD_CORE_ONLY)
add_subdirectory
(
utils
)
endif
(
XDMF_BUILD_UTILS
)
file
(
GLOB XdmfHeaders *.hpp
)
file
(
GLOB XdmfHeaders
"
*.hpp
"
"*.tpp"
"*.i"
)
install
(
FILES
${
XdmfHeaders
}
DESTINATION include
)
install
(
TARGETS Xdmf LIBRARY DESTINATION lib
)
endif
(
NOT XDMF_BUILD_CORE_ONLY
)
core/CMakeLists.txt
View file @
43de25a5
...
...
@@ -82,7 +82,7 @@ if(XDMF_WRAP_PYTHON)
XDMF_SWIG_PYTHON
(
XdmfCore
)
endif
(
XDMF_WRAP_PYTHON
)
file
(
GLOB XdmfCoreHeaders *.hpp
)
file
(
GLOB
_RECURSE
XdmfCoreHeaders
"
*.hpp
"
"*.tpp"
"*.i"
)
file
(
GLOB LokiHeaders loki/*.h
)
install
(
FILES
${
XdmfCoreHeaders
}
DESTINATION include
)
install
(
FILES
${
LokiHeaders
}
DESTINATION include/loki
)
...
...
core/XdmfCoreReader.cpp
View file @
43de25a5
...
...
@@ -103,6 +103,8 @@ public:
return
myItems
;
}
int
globalCount
;
/**
* Reads a single xmlNode into an XdmfItem object in memory. The constructed XdmfItem is added to myItems and an entry is added mapping the xmlNodePtr to the new XdmfItem in the mXPathMap.
*/
...
...
@@ -117,23 +119,26 @@ public:
{
std
::
map
<
std
::
string
,
std
::
string
>
itemProperties
;
if
(
currNode
->
children
!=
NULL
)
{
itemProperties
[
"Content"
]
=
(
const
char
*
)
currNode
->
children
->
content
;
{
if
(
currNode
->
children
->
content
!=
NULL
)
itemProperties
[
"Content"
]
=
(
const
char
*
)
currNode
->
children
->
content
;
else
itemProperties
[
"Content"
]
=
""
;
itemProperties
[
"XMLDir"
]
=
mXMLDir
;
}
xmlAttrPtr
currAttribute
=
currNode
->
properties
;
while
(
currAttribute
!=
NULL
)
{
itemProperties
[(
const
char
*
)
currAttribute
->
name
]
=
(
const
char
*
)
currAttribute
->
children
->
content
;
currAttribute
=
currAttribute
->
next
;
}
std
::
vector
<
boost
::
shared_ptr
<
XdmfItem
>
>
childItems
=
this
->
read
(
currNode
->
children
);
boost
::
shared_ptr
<
XdmfItem
>
newItem
=
mItemFactory
->
createItem
((
const
char
*
)
currNode
->
name
,
itemProperties
,
childItems
);
if
(
newItem
==
NULL
)
{
assert
(
false
);
}
newItem
->
populateItem
(
itemProperties
,
childItems
,
mCoreReader
);
myItems
.
push_back
(
newItem
);
mXPathMap
[
currNode
]
=
newItem
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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