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

#include <integer_id.h>

Protected Attributes

Index index
 

Public Member Functions

 integer_id ()
 
 integer_id (Index i)
 
 integer_id (const Id &i)
 
Idoperator= (const Id &i)
 
Index getId () const
 
void setId (Index i)
 
bool isValid () const
 
bool isValid (Index size) const
 
bool operator== (const Id &a) const
 
bool operator== (const Index &i) const
 
bool operator!= (const Id &a) const
 
bool operator!= (const Index &i) const
 
bool operator< (const Id &a) const
 
bool operator< (const Index &i) const
 
bool operator<= (const Id &a) const
 
bool operator<= (const Index &i) const
 
bool operator> (const Id &a) const
 
bool operator> (const Index &i) const
 
bool operator>= (const Id &a) const
 
bool operator>= (const Index &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 chargetName ()
 
static Index 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

◆ index

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

Constructor details

◆ integer_id() [1/3]

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

◆ integer_id() [2/3]

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

◆ integer_id() [3/3]

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

◆ getDefaultId()

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
static Index sofa::helper::integer_id< Name, Index, DefaultId >::getDefaultId ( )
inlinestatic

◆ getId()

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

◆ getName()

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

◆ isValid() [1/2]

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::isValid ( ) const
inline

◆ isValid() [2/2]

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::isValid ( Index  size) const
inline

◆ operator!=() [1/2]

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

◆ operator!=() [2/2]

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator!= ( const Index &  i) const
inline

◆ operator+()

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

◆ operator++() [1/2]

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
Id& sofa::helper::integer_id< Name, Index, DefaultId >::operator++ ( )
inline

◆ operator++() [2/2]

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
Id sofa::helper::integer_id< Name, Index, DefaultId >::operator++ ( int  )
inline

◆ operator+=()

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

◆ operator-() [1/2]

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

◆ operator-() [2/2]

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

◆ operator--() [1/2]

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
Id& sofa::helper::integer_id< Name, Index, DefaultId >::operator-- ( )
inline

◆ operator--() [2/2]

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

◆ operator-=()

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

◆ operator<() [1/2]

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

◆ operator<() [2/2]

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator< ( const Index &  i) const
inline

◆ operator<=() [1/2]

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

◆ operator<=() [2/2]

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator<= ( const Index &  i) const
inline

◆ operator=()

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

◆ operator==() [1/2]

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

◆ operator==() [2/2]

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator== ( const Index &  i) const
inline

◆ operator>() [1/2]

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

◆ operator>() [2/2]

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator> ( const Index &  i) const
inline

◆ operator>=() [1/2]

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

◆ operator>=() [2/2]

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
bool sofa::helper::integer_id< Name, Index, DefaultId >::operator>= ( const Index &  i) const
inline

◆ setId()

template<integer_id_name Name, typename Index = unsigned int, Index DefaultId = (Index)-1>
void sofa::helper::integer_id< Name, Index, DefaultId >::setId ( Index  i)
inline

Related details

◆ operator<<

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.

◆ operator>>

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

Input stream.