File kernel/src/utils/SiconosTools/SiconosProperties.hpp#
Go to the source code of this file
Exterior properties to vertices or edges of a SiconosGraph can be attach with siconos::Properties. These properties are referenced with vertices or edges indices. update_vertices_indices() or update_edges_indices() must have been done after any vertices or edges insertion or deletion.
Defines
-
I_DECLARE_MEMBERS(r, gt, p)#
-
I_CONS_MEMBERS(r, gt, p)#
-
INSTALL_GRAPH_PROPERTIES(GraphType, PROPERTIES)#
Public Types
-
namespace siconos
Functions
-
template<typename T, typename G>
VertexProperties<T, G> vertexProperties(G &g)# function to build a VertexProperties from one template parameter
- Parameters:
g – the graph
-
template<typename T, typename G>
EdgeProperties<T, G> edgeProperties(G &g)# function to build a EdgeProperties from one template parameter
- Parameters:
g – the graph
- #include <SiconosProperties.hpp>
some local type traits
- template<typename T> shared_ptr< T > > : public boost::mpl::true_
-
template<typename T>
struct IsPointer : public boost::mpl::or_<boost::is_pointer<T>, IsSharedPtr<T>>#
-
template<typename T>
struct RemovePointer#
- template<typename T> shared_ptr< T > >
Public Types
-
typedef T type#
-
typedef T type#
-
template<typename G>
struct VertexAccess# - #include <SiconosProperties.hpp>
get vertex needed data
Public Types
-
typedef VertexAccess type#
-
typedef VertexAccess type#
-
template<typename G>
struct EdgeAccess# - #include <SiconosProperties.hpp>
get edge needed data
Public Types
-
typedef EdgeAccess type#
Public Functions
-
typedef EdgeAccess type#
-
template<typename G, typename IndexMap>
struct VertexOrEdge# - #include <SiconosProperties.hpp>
choose vertex or edge access according to IndexMap
Public Types
-
typedef boost::mpl::if_<boost::is_same<typename G::VIndexAccess, IndexMap>, VertexAccess<G>, EdgeAccess<G>>::type Access#
-
typedef boost::mpl::if_<boost::is_same<typename G::VIndexAccess, IndexMap>, VertexAccess<G>, EdgeAccess<G>>::type Access#
-
template<typename T>
struct SwapPointedValues# - #include <SiconosProperties.hpp>
swap data
Public Types
-
typedef SwapPointedValues type#
-
typedef SwapPointedValues type#
-
template<typename T>
struct SwapValues# Public Types
-
typedef SwapValues type#
-
typedef SwapValues type#
-
template<typename T>
struct SwapProperties# Public Types
-
typedef boost::mpl::if_<IsPointer<T>, SwapPointedValues<T>, SwapValues<T>>::type type#
-
typedef boost::mpl::if_<IsPointer<T>, SwapPointedValues<T>, SwapValues<T>>::type type#
-
template<typename T>
struct GetPointedValue# Public Types
-
typedef GetPointedValue type#
Public Functions
-
inline RemovePointer<T>::type &operator()(T a)#
-
typedef GetPointedValue type#
-
template<typename T>
struct GetValue#
-
template<typename T>
struct GetProperty#
-
template<typename T, typename G, typename IndexMap>
class Properties# - #include <SiconosProperties.hpp>
the general properties structure, from boost::vector_property_map :
- Param T:
the property data type
- Param G:
the graph type
- Param IndexMap:
the index map, should be either G::VIndexAccess or G:EIndexAccess
Subclassed by siconos::VertexProperties< std::shared_ptr< T >, G >
Public Functions
-
inline Properties(G &g)#
constructor from a SiconosGraph
- Parameters:
g – a SiconosGraph
-
inline void insert(const key_type &v, T t)#
insert an element in the Property descriptor
- Parameters:
v – a SiconosGraph::VDescriptor or SiconosGraph::EDescriptor according to IndexMap type
t – the element to be inserted
-
inline reference operator[](const key_type &v)#
data access from a SiconosGraph vertex descriptor or edge descriptor
Warning
this operator creates an empty element if the key is not in the map. Dot not use it to test if a key is present or not in the map …
- Parameters:
v – a SiconosGraph::VDescriptor or SiconosGraph::EDescriptor according to IndexMap type
- Returns:
the element in the vector
-
inline value_type at(const key_type &v)#
data access from a SiconosGraph vertex descriptor or edge descriptor
- Parameters:
v – a SiconosGraph::VDescriptor or SiconosGraph::EDescriptor according to IndexMap type
-
template<typename T, typename G>
class VertexProperties : public siconos::Properties<T, G, G::VIndexAccess># - #include <SiconosProperties.hpp>
vertex property structure:
- Param T:
the property data type
- Param G:
the graph type
Public Types
-
typedef void serializable#
-
template<typename T, typename G>
class VertexSPProperties : public siconos::VertexProperties<std::shared_ptr<T>, G># - #include <SiconosProperties.hpp>
vertex property structure with shared_pre
- Param T:
the property data type
- Param G:
the graph type
Public Types
-
typedef void serializable#
Public Functions
-
inline T &getRef(const key_type &v)#
data access from a SiconosGraph vertex descriptor or edge descriptor
Warning
this operator creates an empty element if the key is not in the map. Dot not use it to test if a key os present or not in the map …
- Parameters:
v – a SiconosGraph::VDescriptor or SiconosGraph::EDescriptor according to IndexMap type
- Returns:
the element in the vector
-
template<typename T, typename G>
class EdgeProperties : public siconos::Properties<T, G, G::EIndexAccess># - #include <SiconosProperties.hpp>
edge property structure:
- Param T:
the property data type
- Param G:
the graph type
Public Types
-
typedef void serializable#
-
template<typename T, typename G, typename IndexMap>
class SubProperties# - #include <SiconosProperties.hpp>
global properties : they may be attached to main graph and may be referenced from subgraphs.
They are not used for the moment
Public Functions
-
inline SubProperties(RefProperties &p, G &g)#
Private Types
-
typedef Properties<T, G, IndexMap> RefProperties#
-
inline SubProperties(RefProperties &p, G &g)#
-
template<typename T, typename G>
class VertexSubProperties : public siconos::SubProperties<T, G, G::VIndexAccess># Public Types
-
typedef Properties<T, G, typename G::VIndexAccess> RefProperties#
Public Functions
-
inline VertexSubProperties(RefProperties &p, G &g)#
-
typedef Properties<T, G, typename G::VIndexAccess> RefProperties#
-
template<typename T, typename G>
class EdgeSubProperties : public siconos::SubProperties<T, G, G::EIndexAccess># Public Types
-
typedef Properties<T, G, typename G::EIndexAccess> RefProperties#
Public Functions
-
inline EdgeSubProperties(RefProperties &p, G &g)#
-
typedef Properties<T, G, typename G::EIndexAccess> RefProperties#
-
template<typename T, typename G>