OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
vertex_node< G > Struct Template Reference

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

Detailed Description

template<typename G>
struct vertex_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 vertex properties

Definition at line 156 of file GraphMLWriter.hpp.

#include <GraphMLWriter.hpp>

Public Member Functions

 vertex_node (std::string &v_node, const typename G::V_container &n_obj, typename G::V_type::attributes &a_name)
 Constructor.
 
 vertex_node (std::string &v_node, const typename G::V_container &n_obj)
 Constructor.
 
void new_node (size_t v_c)
 Create a new node.
 
void end_node ()
 Close a node.
 
template<typename T >
void operator() (T &t)
 It call the functor for each member.
 

Data Fields

const G::V_container & vo
 Vertex object container.
 
int cnt = 0
 Properties counter.
 
std::string & v_node
 vertex 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
 

Constructor & Destructor Documentation

◆ vertex_node() [1/2]

template<typename G >
vertex_node< G >::vertex_node ( std::string &  v_node,
const typename G::V_container &  n_obj,
typename G::V_type::attributes &  a_name 
)
inline

Constructor.

Create a vertex node

Parameters
v_nodestd::string that is filled with the graph node definition in the GraphML format
n_objobject container to access its properties for example encapc<...>
a_namestub SFINAE, it basically check if G has properties names defined, if yes this constructor is selected over the other one

Definition at line 186 of file GraphMLWriter.hpp.

◆ vertex_node() [2/2]

template<typename G >
vertex_node< G >::vertex_node ( std::string &  v_node,
const typename G::V_container &  n_obj 
)
inline

Constructor.

Create a vertex properties list

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

Definition at line 213 of file GraphMLWriter.hpp.

◆ ~vertex_node()

template<typename G >
vertex_node< G >::~vertex_node ( )
inline

Definition at line 227 of file GraphMLWriter.hpp.

Member Function Documentation

◆ end_node()

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

Close a node.

Close a node

Definition at line 264 of file GraphMLWriter.hpp.

◆ new_node()

template<typename G >
void vertex_node< G >::new_node ( size_t  v_c)
inline

Create a new node.

Parameters
v_cid of the node

Definition at line 250 of file GraphMLWriter.hpp.

◆ operator()()

template<typename G >
template<typename T >
void vertex_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 276 of file GraphMLWriter.hpp.

Field Documentation

◆ attributes_names

template<typename G >
std::string* vertex_node< G >::attributes_names

Attribute names.

Definition at line 168 of file GraphMLWriter.hpp.

◆ cnt

template<typename G >
int vertex_node< G >::cnt = 0

Properties counter.

Definition at line 162 of file GraphMLWriter.hpp.

◆ n_attr

template<typename G >
int vertex_node< G >::n_attr = 0

Number of attributes name defined into the vertex.

Definition at line 171 of file GraphMLWriter.hpp.

◆ to_destroy

template<typename G >
bool vertex_node< G >::to_destroy = false

indicate if attributes_names is to destroy

Definition at line 174 of file GraphMLWriter.hpp.

◆ v_node

template<typename G >
std::string& vertex_node< G >::v_node

vertex node string

Definition at line 165 of file GraphMLWriter.hpp.

◆ vo

template<typename G >
const G::V_container& vertex_node< G >::vo

Vertex object container.

Definition at line 159 of file GraphMLWriter.hpp.


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