SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::helper::integer_id< Name, Index, DefaultId > Class Template Reference

#include <integer_id.h>

Protected Attributes

index_type index
 

Public Member Functions

 integer_id ()
 
 integer_id (index_type i)
 
 integer_id (const Id &i)
 
Idoperator= (const Id &i)
 
index_type getId () const
 
void setId (index_type i)
 
bool isValid () const
 
bool isValid (index_type size) const
 
bool operator== (const Id &a) const
 
bool operator== (const index_type &i) const
 
bool operator!= (const Id &a) const
 
bool operator!= (const index_type &i) const
 
bool operator< (const Id &a) const
 
bool operator< (const index_type &i) const
 
bool operator<= (const Id &a) const
 
bool operator<= (const index_type &i) const
 
bool operator> (const Id &a) const
 
bool operator> (const index_type &i) const
 
bool operator>= (const Id &a) const
 
bool operator>= (const index_type &i) const
 
template<typename int_type >
Id operator+ (int_type i) const
 
template<typename int_type >
Idoperator+= (int_type i)
 
template<typename int_type >
Id operator- (int_type i) const
 
sindex_type operator- (const Id &i) const
 
template<typename int_type >
Idoperator-= (int_type i)
 
Idoperator++ ()
 
Id operator++ (int)
 
Idoperator-- ()
 
Id operator-- (int)
 

Static Public Member Functions

static const char * getName ()
 
static index_type getDefaultId ()
 

Friends

std::ostream & operator<< (std::ostream &os, const Id &i)
 Output stream. More...
 
std::istream & operator>> (std::istream &in, Id &i)
 Input stream. More...
 

Attribute details

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
index_type sofa::helper::integer_id< Name, Index, DefaultId >::index
protected

Constructor details

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
sofa::helper::integer_id< Name, Index, DefaultId >::integer_id ( )
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
sofa::helper::integer_id< Name, Index, DefaultId >::integer_id ( index_type  i)
inlineexplicit
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
sofa::helper::integer_id< Name, Index, DefaultId >::integer_id ( const Id i)
inline

Function details

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
static index_type sofa::helper::integer_id< Name, Index, DefaultId >::getDefaultId ( )
inlinestatic
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
index_type sofa::helper::integer_id< Name, Index, DefaultId >::getId ( ) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
static const char* sofa::helper::integer_id< Name, Index, DefaultId >::getName ( )
inlinestatic
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::isValid ( ) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::isValid ( index_type  size) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator!= ( const Id a) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator!= ( const index_type i) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
template<typename int_type >
Id sofa::helper::integer_id< Name, Index, DefaultId >::operator+ ( int_type  i) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
Id& sofa::helper::integer_id< Name, Index, DefaultId >::operator++ ( )
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
Id sofa::helper::integer_id< Name, Index, DefaultId >::operator++ ( int  )
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
template<typename int_type >
Id& sofa::helper::integer_id< Name, Index, DefaultId >::operator+= ( int_type  i)
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
template<typename int_type >
Id sofa::helper::integer_id< Name, Index, DefaultId >::operator- ( int_type  i) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
sindex_type sofa::helper::integer_id< Name, Index, DefaultId >::operator- ( const Id i) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
Id& sofa::helper::integer_id< Name, Index, DefaultId >::operator-- ( )
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
Id sofa::helper::integer_id< Name, Index, DefaultId >::operator-- ( int  )
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
template<typename int_type >
Id& sofa::helper::integer_id< Name, Index, DefaultId >::operator-= ( int_type  i)
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator< ( const Id a) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator< ( const index_type i) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator<= ( const Id a) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator<= ( const index_type i) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
Id& sofa::helper::integer_id< Name, Index, DefaultId >::operator= ( const Id i)
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator== ( const Id a) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator== ( const index_type i) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator> ( const Id a) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator> ( const index_type i) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator>= ( const Id a) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator>= ( const index_type i) const
inline
template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
void sofa::helper::integer_id< Name, Index, DefaultId >::setId ( index_type  i)
inline

Related details

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
std::ostream& operator<< ( std::ostream &  os,
const Id i 
)
friend

Output stream.

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
std::istream& operator>> ( std::istream &  in,
Id i 
)
friend

Input stream.