OpenFPM  5.2.0
Project that contain the implementation of distributed structures
edge_node< G > Struct Template Reference

this class is a functor for "for_each" algorithm More...

#include <GraphMLWriter.hpp>

Public Member Functions

 edge_node (std::string &e_node, typename G::E_container &n_obj, typename G::E_type::attributes &a_name)
 Constructor. More...
 
 edge_node (std::string &e_node, typename G::E_container &n_obj)
 Constructor. More...
 
void new_node (size_t v_c, size_t s, size_t d)
 Create a new node. More...
 
void end_node ()
 Close a node. More...
 
template<typename T >
void operator() (T &t)
 

Data Fields

G::E_container & vo
 Vertex object container.
 
int cnt = 0
 Properties counter.
 
std::string & e_node
 edge node string
 
std::string * attributes_names
 Attribute names.
 
int n_attr = 0
 Number of attributes name defined into the vertex.
 
bool to_destroy = false
 indicate if attributes_names is to destroy
 

Detailed Description

template<typename G>
struct edge_node< G >

this class is a functor for "for_each" algorithm

This class is a functor for "for_each" algorithm. For each element of the boost::vector the operator() is called. Is mainly used to create a string containing all the edge properties

Definition at line 412 of file GraphMLWriter.hpp.

Constructor & Destructor Documentation

◆ edge_node() [1/2]

template<typename G >
edge_node< G >::edge_node ( std::string &  e_node,
typename G::E_container &  n_obj,
typename G::E_type::attributes &  a_name 
)
inline

Constructor.

Create an edge node

Parameters
e_nodestd::string that is filled with the graph node definition in the GraphML format
n_objobject container to access the object properties for example encapc<...>
a_nameattributes names

Definition at line 441 of file GraphMLWriter.hpp.

◆ edge_node() [2/2]

template<typename G >
edge_node< G >::edge_node ( std::string &  e_node,
typename G::E_container &  n_obj 
)
inline

Constructor.

Create an edge node

Parameters
e_nodestd::string that is filled with the graph properties in the GraphML format
n_objobject container to access the object properties for example encapc<...>

Definition at line 456 of file GraphMLWriter.hpp.

Member Function Documentation

◆ end_node()

template<typename G >
void edge_node< G >::end_node ( )
inline

Close a node.

Close a node

Definition at line 498 of file GraphMLWriter.hpp.

◆ new_node()

template<typename G >
void edge_node< G >::new_node ( size_t  v_c,
size_t  s,
size_t  d 
)
inline

Create a new node.

Parameters
v_cnode number
ssource node id
ddestination node id

Definition at line 484 of file GraphMLWriter.hpp.

◆ operator()()

template<typename G >
template<typename T >
void edge_node< G >::operator() ( T &  t)
inline

It call the functor for each member

Parameters
teach member

Create an entry for the attribute

Definition at line 510 of file GraphMLWriter.hpp.


The documentation for this struct was generated from the following file: