Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
openfpm_io
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openfpm
openfpm_io
Commits
d267a896
Commit
d267a896
authored
Jun 29, 2015
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed storing reference of temporal object
parent
12ee5ff4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
+29
-3
src/GraphMLWriter.hpp
src/GraphMLWriter.hpp
+29
-3
No files found.
src/GraphMLWriter.hpp
View file @
d267a896
...
...
@@ -168,13 +168,25 @@ struct vertex_node
* constructor is selected over the other one
*
*/
vertex_node
(
std
::
string
&
v_node
,
const
typename
G
::
V_container
&
n_obj
,
typename
G
::
V_type
::
attributes
&
a_name
)
inline
vertex_node
(
std
::
string
&
v_node
,
const
typename
G
::
V_container
&
n_obj
,
typename
G
::
V_type
::
attributes
&
a_name
)
:
vo
(
n_obj
),
v_node
(
v_node
),
attributes_names
(
a_name
.
name
)
{
// Calculate the number of attributes name
n_attr
=
sizeof
(
a_name
.
name
)
/
sizeof
(
std
::
string
);
};
#ifdef DEBUG
/*! \brief Constructor
*
* Calling this constructor produce an error. This class store the reference of the object,
* this mean that the object passed must not be a temporal object
*
*/
inline
vertex_node
(
std
::
string
&
v_node
,
const
typename
G
::
V_container
&&
n_obj
,
typename
G
::
V_type
::
attributes
&
a_name
)
:
vo
(
n_obj
),
v_node
(
v_node
),
attributes_names
(
a_name
.
name
)
{
std
::
cerr
<<
"Error: "
<<
__FILE__
<<
":"
<<
__LINE__
<<
" Passing a temporal object
\n
"
;};
#endif
/*! \brief Constructor
*
* Create a vertex properties list
...
...
@@ -183,7 +195,7 @@ struct vertex_node
* \param n_obj object container to access its properties for example encapc<...>
*
*/
vertex_node
(
std
::
string
&
v_node
,
const
typename
G
::
V_container
&
n_obj
)
inline
vertex_node
(
std
::
string
&
v_node
,
const
typename
G
::
V_container
&
n_obj
)
:
vo
(
n_obj
),
v_node
(
v_node
),
attributes_names
(
NULL
)
{
// Calculate the number of attributes
...
...
@@ -196,6 +208,18 @@ struct vertex_node
create_prop
<
typename
G
::
V_type
>
(
attributes_names
);
};
#ifdef DEBUG
/*! \brief Constructor
*
* Calling this constructor produce an error. This class store the reference of the object,
* this mean that the object passed must not be a temporal object
*
*/
inline
vertex_node
(
std
::
string
&
v_node
,
const
typename
G
::
V_container
&&
n_obj
)
:
vo
(
n_obj
),
v_node
(
v_node
),
attributes_names
(
NULL
)
{
std
::
cerr
<<
"Error: "
<<
__FILE__
<<
":"
<<
__LINE__
<<
" Passing a temporal object
\n
"
;};
#endif
/*! \brief Create a new node
*
* Create a new node
...
...
@@ -525,8 +549,10 @@ class GraphMLWriter
// if there is the next element
while
(
it
.
isNext
())
{
auto
v
=
g
.
vertex
(
it
.
get
());
// create a vertex list functor
vertex_node
<
Graph
>
vn
(
v_out
,
g
.
vertex
(
it
.
get
())
);
vertex_node
<
Graph
>
vn
(
v_out
,
v
);
// create new node
vn
.
new_node
(
nc
);
...
...
Write
Preview
Markdown
is supported
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