SOFA API  ca665544
Open source framework for multi-physics simuation
sofa::helper::ptr_stable_id< T > Class Template Reference

#include <map_ptr_stable_compare.h>

Detailed Description

template<typename T>
class sofa::helper::ptr_stable_id< T >

An object transforming pointers to stable ids, i.e. whose value depend on the order the pointers are processed, and not their (potentially random) value

Protected Attributes

unsigned int counter
 
std::map< T *, unsigned int > idMap
 

Public Member Functions

 ptr_stable_id ()
 
unsigned int operator() (T *p)
 
unsigned int id (T *p)
 

Attribute details

◆ counter

template<typename T >
unsigned int sofa::helper::ptr_stable_id< T >::counter
mutableprotected

◆ idMap

template<typename T >
std::map<T*,unsigned int> sofa::helper::ptr_stable_id< T >::idMap
mutableprotected

Constructor details

◆ ptr_stable_id()

template<typename T >
sofa::helper::ptr_stable_id< T >::ptr_stable_id ( )
inline

Function details

◆ id()

template<typename T >
unsigned int sofa::helper::ptr_stable_id< T >::id ( T *  p)
inline

◆ operator()()

template<typename T >
unsigned int sofa::helper::ptr_stable_id< T >::operator() ( T *  p)
inline