SOFA API  8225a6f5
Open source framework for multi-physics simuation
sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager > Class Template Reference

#include <integer_id.h>

Inheritance diagram for sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >:

Public Member Functions

template<class T2 >
struct SOFA_ATTRIBUTE_DEPRECATED__REBIND () rebind
 
 vector_id ()
 Basic constructor. More...
 
 vector_id (Size n, const T &value)
 Constructor. More...
 
 vector_id (int n, const T &value)
 Constructor. More...
 
 vector_id (long n, const T &value)
 Constructor. More...
 
 vector_id (Size n)
 Constructor. More...
 
 vector_id (const std::vector< T > &x)
 Constructor. More...
 
 vector_id (const_iterator first, const_iterator last)
 Constructor. More...
 
reference at (Index n)
 Read/write random access, with explicit Index. More...
 
const_reference at (Index n) const
 Read-only random access, with explicit Index. More...
 
reference operator() (Index n)
 Read/write random access, with explicit Index. More...
 
const_reference operator() (Index n) const
 Read-only random access, with explicit Index. More...
 
reference operator[] (Index n)
 Read/write random access, with explicit Index. More...
 
const_reference operator[] (Index n) const
 Read-only random access. More...
 
Index push_back (const_reference v)
 
- Public Member Functions inherited from sofa::type::vector< T, CPUMemoryManager< T > >
struct SOFA_ATTRIBUTE_DEPRECATED__REBIND () rebind
 
 vector ()
 Basic constructor. More...
 
 vector (Size n, const T &value)
 Constructor. More...
 
 vector (Size n)
 Constructor. More...
 
 vector (const std::vector< T, Alloc > &x)
 Constructor. More...
 
 vector (const std::initializer_list< T > &t)
 Brace initalizer constructor. More...
 
 vector (std::vector< T, Alloc > &&v)
 Move constructor. More...
 
 vector (typename vector< T >::const_iterator first, typename vector< T >::const_iterator last)
 Constructor. More...
 
vectoroperator= (const std::vector< T, Alloc > &x)
 Copy operator. More...
 
vectoroperator= (std::vector< T, Alloc > &&v)
 Move assignment operator. More...
 
reference operator[] (Size n)
 Read/write random access. More...
 
const_reference operator[] (Size n) const
 Read-only random access. More...
 
std::ostream & write (std::ostream &os) const
 
SOFA_TYPE_API std::ostream & write (std::ostream &os) const
 
SOFA_TYPE_API std::ostream & write (std::ostream &os) const
 Specialization for writing vectors of unsigned char. More...
 
SOFA_TYPE_API std::ostream & write (std::ostream &os) const
 
SOFA_TYPE_API std::ostream & write (std::ostream &os) const
 
std::istream & read (std::istream &in)
 
SOFA_TYPE_API std::istream & read (std::istream &in)
 
SOFA_TYPE_API std::istream & read (std::istream &in)
 
SOFA_TYPE_API std::istream & read (std::istream &in)
 
SOFA_TYPE_API std::istream & read (std::istream &in)
 Specialization for reading vectors of int and unsigned int using "A-B" notation for all integers between A and B. More...
 
SOFA_TYPE_API std::istream & read (std::istream &in)
 
SOFA_TYPE_API std::istream & read (std::istream &in)
 
void fill (const T &value)
 Sets every element to 'value'. More...
 
void fastResize (Size n)
 

Protected Member Functions

reference operator[] (Size n)
 Read/write random access with regular index type, protected to force use of explicit Index. More...
 
const_reference operator[] (Size n) const
 Read-only random access with regular index type, protected to force use of explicit Index. More...
 

Constructor details

◆ vector_id() [1/7]

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::vector_id ( )
inline

Basic constructor.

◆ vector_id() [2/7]

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::vector_id ( Size  n,
const T value 
)
inline

Constructor.

◆ vector_id() [3/7]

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::vector_id ( int  n,
const T value 
)
inline

Constructor.

◆ vector_id() [4/7]

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::vector_id ( long  n,
const T value 
)
inline

Constructor.

◆ vector_id() [5/7]

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::vector_id ( Size  n)
inlineexplicit

Constructor.

◆ vector_id() [6/7]

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::vector_id ( const std::vector< T > &  x)
inline

Constructor.

◆ vector_id() [7/7]

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::vector_id ( const_iterator  first,
const_iterator  last 
)
inline

Constructor.

Function details

◆ at() [1/2]

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
reference sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::at ( Index  n)
inline

Read/write random access, with explicit Index.

◆ at() [2/2]

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
const_reference sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::at ( Index  n) const
inline

Read-only random access, with explicit Index.

◆ operator()() [1/2]

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
reference sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::operator() ( Index  n)
inline

Read/write random access, with explicit Index.

◆ operator()() [2/2]

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
const_reference sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::operator() ( Index  n) const
inline

Read-only random access, with explicit Index.

◆ operator[]() [1/4]

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
reference sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::operator[] ( Index  n)
inline

Read/write random access, with explicit Index.

◆ operator[]() [2/4]

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
const_reference sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::operator[] ( Index  n) const
inline

Read-only random access.

◆ operator[]() [3/4]

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
reference sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::operator[] ( Size  n)
inlineprotected

Read/write random access with regular index type, protected to force use of explicit Index.

◆ operator[]() [4/4]

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
const_reference sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::operator[] ( Size  n) const
inlineprotected

Read-only random access with regular index type, protected to force use of explicit Index.

◆ push_back()

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
Index sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::push_back ( const_reference  v)
inline

◆ SOFA_ATTRIBUTE_DEPRECATED__REBIND()

template<class T , class TIndex , bool CheckIndices = false, class MemoryManager = CPUMemoryManager<T>>
template<class T2 >
struct sofa::helper::vector_id< T, TIndex, CheckIndices, MemoryManager >::SOFA_ATTRIBUTE_DEPRECATED__REBIND ( )
inline