OpenFPM_io  0.2.0
Project that contain the implementation and interfaces for basic structure like vectors, grids, graph ... .
 All Data Structures Functions Variables Typedefs
vertex_node< G > Struct Template Reference

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

#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. More...
 
 vertex_node (std::string &v_node, const typename G::V_container &n_obj)
 Constructor. More...
 
void new_node (size_t v_c)
 Create a new node. More...
 
void end_node ()
 Close a node. More...
 
template<typename T >
void operator() (T &t)
 It call the functor for each member. More...
 

Data Fields

const G::V_container & vo
 
int cnt = 0
 
std::string & v_node
 
std::string * attributes_names
 
int n_attr = 0
 

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 144 of file GraphMLWriter.hpp.

Constructor & Destructor Documentation

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<...>
stubSFINAE, it basically check if G has properties names defined, if yes this constructor is selected over the other one

Definition at line 171 of file GraphMLWriter.hpp.

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 198 of file GraphMLWriter.hpp.

Member Function Documentation

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

Close a node.

Close a node

Definition at line 247 of file GraphMLWriter.hpp.

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

Create a new node.

Create a new node

Definition at line 233 of file GraphMLWriter.hpp.

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

It call the functor for each member.

Create an entry for the attribute

Definition at line 255 of file GraphMLWriter.hpp.


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