Scopira  20080306
scopira::tool::const_array_view< T > Class Template Reference

#include <array.h>

Public Types

typedef T data_type
 
typedef const T * const_iterator
 

Public Member Functions

 const_array_view (array_view< T > rhs)
 
 const_array_view (const basic_array< T > &rhs)
 
 const_array_view (const T *b, const T *e)
 
template<size_t N>
 const_array_view (const fixed_array< T, N > &rhs)
 
template<size_t N>
 const_array_view (const hybrid_array< T, N > &rhs)
 
const T * array (void) const
 
const T * c_array (void) const
 
const_iterator begin (void) const
 
const_iterator end (void) const
 
size_t size (void) const
 
bool empty (void) const
 
const T & get (size_t idx) const
 
const T & operator[] (size_t idx) const
 

Protected Attributes

const T * dm_ary
 
const T * dm_end
 

Detailed Description

template<class T>
class scopira::tool::const_array_view< T >

A (non-resizable) "view" of another array

Author
Aleksander Demko

Constructor & Destructor Documentation

◆ const_array_view() [1/5]

template<class T>
scopira::tool::const_array_view< T >::const_array_view ( array_view< T >  rhs)
inline

One can make const version out of non-const versions (but not visa versa)

Author
Aleksander Demko

◆ const_array_view() [2/5]

template<class T>
scopira::tool::const_array_view< T >::const_array_view ( const basic_array< T > &  rhs)
inline

Converting ctor

Author
Aleksander Demko

◆ const_array_view() [3/5]

template<class T>
scopira::tool::const_array_view< T >::const_array_view ( const T *  b,
const T *  e 
)
inline

Converting ctor

Author
Aleksander Demko

◆ const_array_view() [4/5]

template<class T>
template<size_t N>
scopira::tool::const_array_view< T >::const_array_view ( const fixed_array< T, N > &  rhs)
inline

Converting ctor

Author
Aleksander Demko

◆ const_array_view() [5/5]

template<class T>
template<size_t N>
scopira::tool::const_array_view< T >::const_array_view ( const hybrid_array< T, N > &  rhs)
inline

Converting ctor

Author
Aleksander Demko

Member Function Documentation

◆ array()

template<class T>
const T* scopira::tool::const_array_view< T >::array ( void  ) const
inline

Raw access to the array

Author
Aleksander Demko

◆ begin()

template<class T>
const_iterator scopira::tool::const_array_view< T >::begin ( void  ) const
inline

◆ c_array()

template<class T>
const T* scopira::tool::const_array_view< T >::c_array ( void  ) const
inline

Raw access to the array

Author
Aleksander Demko

◆ empty()

template<class T>
bool scopira::tool::const_array_view< T >::empty ( void  ) const
inline

Is the array empty (0 length)?

Author
Aleksander Demko

◆ end()

template<class T>
const_iterator scopira::tool::const_array_view< T >::end ( void  ) const
inline

STL-like iteration

Author
Aleksander Demko

◆ get()

template<class T>
const T& scopira::tool::const_array_view< T >::get ( size_t  idx) const
inline

Individual element setter

Author
Aleksander Demko

◆ operator[]()

template<class T>
const T& scopira::tool::const_array_view< T >::operator[] ( size_t  idx) const
inline

Nice reference access

Author
Aleksander Demko

◆ size()

template<class T>
size_t scopira::tool::const_array_view< T >::size ( void  ) const
inline

Gets the size of the array

Author
Aleksander Demko

Referenced by scopira::tool::hybrid_array< T, RES >::hybrid_array(), and scopira::tool::hybrid_array< T, RES >::operator=().


The documentation for this class was generated from the following file: