SOFA API  6a688117
Open source framework for multi-physics simuation
sofa::core::objectmodel::SinglePtr< T, TPtr > Class Template Reference

#include <Link.h>

Class to hold 0-or-1 pointer. The interface is similar to std::vector (size/[]/begin/end), plus an automatic convertion to one pointer. More...

Detailed Description

template<class T, class TPtr = T*>
class sofa::core::objectmodel::SinglePtr< T, TPtr >

Class to hold 0-or-1 pointer. The interface is similar to std::vector (size/[]/begin/end), plus an automatic convertion to one pointer.

Protected Attributes

TPtr elems [1]
 

Public Member Functions

 SinglePtr ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
std::size_t size () const
 
bool empty () const
 
void clear ()
 
const TPtr & get () const
 
TPtr & get ()
 
const TPtr & operator[] (std::size_t i) const
 
TPtr & operator[] (std::size_t i)
 
const TPtr & operator() (std::size_t i) const
 
TPtr & operator() (std::size_t i)
 
 operator T * () const
 
T * operator-> () const
 

Attribute details

template<class T , class TPtr = T*>
TPtr sofa::core::objectmodel::SinglePtr< T, TPtr >::elems[1]
protected

Constructor details

template<class T , class TPtr = T*>
sofa::core::objectmodel::SinglePtr< T, TPtr >::SinglePtr ( )
inline

Function details

template<class T , class TPtr = T*>
const_iterator sofa::core::objectmodel::SinglePtr< T, TPtr >::begin ( ) const
inline
template<class T , class TPtr = T*>
const_iterator sofa::core::objectmodel::SinglePtr< T, TPtr >::cbegin ( ) const
inline
template<class T , class TPtr = T*>
const_iterator sofa::core::objectmodel::SinglePtr< T, TPtr >::cend ( ) const
inline
template<class T , class TPtr = T*>
void sofa::core::objectmodel::SinglePtr< T, TPtr >::clear ( )
inline
template<class T , class TPtr = T*>
const_reverse_iterator sofa::core::objectmodel::SinglePtr< T, TPtr >::crbegin ( ) const
inline
template<class T , class TPtr = T*>
const_reverse_iterator sofa::core::objectmodel::SinglePtr< T, TPtr >::crend ( ) const
inline
template<class T , class TPtr = T*>
bool sofa::core::objectmodel::SinglePtr< T, TPtr >::empty ( ) const
inline
template<class T , class TPtr = T*>
const_iterator sofa::core::objectmodel::SinglePtr< T, TPtr >::end ( ) const
inline
template<class T , class TPtr = T*>
const TPtr& sofa::core::objectmodel::SinglePtr< T, TPtr >::get ( ) const
inline
template<class T , class TPtr = T*>
TPtr& sofa::core::objectmodel::SinglePtr< T, TPtr >::get ( )
inline
template<class T , class TPtr = T*>
sofa::core::objectmodel::SinglePtr< T, TPtr >::operator T * ( ) const
inline
template<class T , class TPtr = T*>
const TPtr& sofa::core::objectmodel::SinglePtr< T, TPtr >::operator() ( std::size_t  i) const
inline
template<class T , class TPtr = T*>
TPtr& sofa::core::objectmodel::SinglePtr< T, TPtr >::operator() ( std::size_t  i)
inline
template<class T , class TPtr = T*>
T* sofa::core::objectmodel::SinglePtr< T, TPtr >::operator-> ( ) const
inline
template<class T , class TPtr = T*>
const TPtr& sofa::core::objectmodel::SinglePtr< T, TPtr >::operator[] ( std::size_t  i) const
inline
template<class T , class TPtr = T*>
TPtr& sofa::core::objectmodel::SinglePtr< T, TPtr >::operator[] ( std::size_t  i)
inline
template<class T , class TPtr = T*>
const_reverse_iterator sofa::core::objectmodel::SinglePtr< T, TPtr >::rbegin ( ) const
inline
template<class T , class TPtr = T*>
const_reverse_iterator sofa::core::objectmodel::SinglePtr< T, TPtr >::rend ( ) const
inline
template<class T , class TPtr = T*>
std::size_t sofa::core::objectmodel::SinglePtr< T, TPtr >::size ( ) const
inline