Public Types | Public Member Functions | Private Attributes | List of all members
vbl_array_1d< T > Class Template Reference

A simple container. More...

#include <vbl_array_1d.h>

Inheritance diagram for vbl_array_1d< T >:
Inheritance graph
[legend]

Public Types

typedef std::size_t size_type
 
typedef T element_type
 
typedef T * iterator
 
typedef T const * const_iterator
 
typedef T & reference
 
typedef T const & const_reference
 

Public Member Functions

 vbl_array_1d ()
 
 vbl_array_1d (const_iterator b, const_iterator e)
 
 vbl_array_1d (vbl_array_1d< T > const &that)
 
 vbl_array_1d (size_type n, const T &v)
 Construct an array with n elements, all equal to v. More...
 
vbl_array_1d< T > & operator= (vbl_array_1d< T > const &that)
 
bool operator== (vbl_array_1d< T > const &that) const
 
 ~vbl_array_1d ()
 
void reserve (std::ptrdiff_t new_n)
 
void push_back (T const &x)
 
void pop_back ()
 
reference back ()
 
const_reference back () const
 
reference front ()
 
const_reference front () const
 
void clear ()
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
bool empty () const
 
size_type size () const
 
size_type capacity () const
 
reference operator[] (std::ptrdiff_t i)
 Get the ith element. More...
 
const_reference operator[] (std::ptrdiff_t i) const
 Get the ith element. More...
 

Private Attributes

element_typebegin_
 
element_typeend_
 
element_typealloc_
 

Detailed Description

template<class T>
class vbl_array_1d< T >

A simple container.

This container stores its elements in contiguous storage and whose iterator types are raw pointers. There is no requirement that the element type have a default constructor.

Definition at line 28 of file vbl_array_1d.h.

Member Typedef Documentation

◆ const_iterator

template<class T>
typedef T const* vbl_array_1d< T >::const_iterator

Definition at line 39 of file vbl_array_1d.h.

◆ const_reference

template<class T>
typedef T const& vbl_array_1d< T >::const_reference

Definition at line 42 of file vbl_array_1d.h.

◆ element_type

template<class T>
typedef T vbl_array_1d< T >::element_type

Definition at line 32 of file vbl_array_1d.h.

◆ iterator

template<class T>
typedef T* vbl_array_1d< T >::iterator

Definition at line 38 of file vbl_array_1d.h.

◆ reference

template<class T>
typedef T& vbl_array_1d< T >::reference

Definition at line 41 of file vbl_array_1d.h.

◆ size_type

template<class T>
typedef std::size_t vbl_array_1d< T >::size_type

Definition at line 31 of file vbl_array_1d.h.

Constructor & Destructor Documentation

◆ vbl_array_1d() [1/4]

template<class T>
vbl_array_1d< T >::vbl_array_1d ( )
inline

Definition at line 45 of file vbl_array_1d.h.

◆ vbl_array_1d() [2/4]

template<class T>
vbl_array_1d< T >::vbl_array_1d ( const_iterator  b,
const_iterator  e 
)
inline

Definition at line 47 of file vbl_array_1d.h.

◆ vbl_array_1d() [3/4]

template<class T>
vbl_array_1d< T >::vbl_array_1d ( vbl_array_1d< T > const &  that)
inline

Definition at line 58 of file vbl_array_1d.h.

◆ vbl_array_1d() [4/4]

template<class T>
vbl_array_1d< T >::vbl_array_1d ( size_type  n,
const T &  v 
)
inline

Construct an array with n elements, all equal to v.

Definition at line 63 of file vbl_array_1d.h.

◆ ~vbl_array_1d()

template<class T>
vbl_array_1d< T >::~vbl_array_1d ( )
inline

Definition at line 87 of file vbl_array_1d.h.

Member Function Documentation

◆ back() [1/2]

template<class T>
reference vbl_array_1d< T >::back ( )
inline

Definition at line 129 of file vbl_array_1d.h.

◆ back() [2/2]

template<class T>
const_reference vbl_array_1d< T >::back ( ) const
inline

Definition at line 130 of file vbl_array_1d.h.

◆ begin() [1/2]

template<class T>
iterator vbl_array_1d< T >::begin ( )
inline

Definition at line 141 of file vbl_array_1d.h.

◆ begin() [2/2]

template<class T>
const_iterator vbl_array_1d< T >::begin ( ) const
inline

Definition at line 144 of file vbl_array_1d.h.

◆ capacity()

template<class T>
size_type vbl_array_1d< T >::capacity ( ) const
inline

Definition at line 149 of file vbl_array_1d.h.

◆ clear()

template<class T>
void vbl_array_1d< T >::clear ( )
inline

Definition at line 135 of file vbl_array_1d.h.

◆ empty()

template<class T>
bool vbl_array_1d< T >::empty ( ) const
inline

Definition at line 147 of file vbl_array_1d.h.

◆ end() [1/2]

template<class T>
iterator vbl_array_1d< T >::end ( )
inline

Definition at line 142 of file vbl_array_1d.h.

◆ end() [2/2]

template<class T>
const_iterator vbl_array_1d< T >::end ( ) const
inline

Definition at line 145 of file vbl_array_1d.h.

◆ front() [1/2]

template<class T>
reference vbl_array_1d< T >::front ( )
inline

Definition at line 132 of file vbl_array_1d.h.

◆ front() [2/2]

template<class T>
const_reference vbl_array_1d< T >::front ( ) const
inline

Definition at line 133 of file vbl_array_1d.h.

◆ operator=()

template<class T>
vbl_array_1d<T>& vbl_array_1d< T >::operator= ( vbl_array_1d< T > const &  that)
inline

Definition at line 73 of file vbl_array_1d.h.

◆ operator==()

template<class T>
bool vbl_array_1d< T >::operator== ( vbl_array_1d< T > const &  that) const
inline

Definition at line 79 of file vbl_array_1d.h.

◆ operator[]() [1/2]

template<class T>
reference vbl_array_1d< T >::operator[] ( std::ptrdiff_t  i)
inline

Get the ith element.

#define NDEBUG to turn bounds checking off.

Definition at line 153 of file vbl_array_1d.h.

◆ operator[]() [2/2]

template<class T>
const_reference vbl_array_1d< T >::operator[] ( std::ptrdiff_t  i) const
inline

Get the ith element.

#define NDEBUG to turn bounds checking off.

Definition at line 161 of file vbl_array_1d.h.

◆ pop_back()

template<class T>
void vbl_array_1d< T >::pop_back ( )
inline

Definition at line 124 of file vbl_array_1d.h.

◆ push_back()

template<class T>
void vbl_array_1d< T >::push_back ( T const &  x)
inline

Definition at line 117 of file vbl_array_1d.h.

◆ reserve()

template<class T>
void vbl_array_1d< T >::reserve ( std::ptrdiff_t  new_n)
inline

Definition at line 94 of file vbl_array_1d.h.

◆ size()

template<class T>
size_type vbl_array_1d< T >::size ( ) const
inline

Definition at line 148 of file vbl_array_1d.h.

Member Data Documentation

◆ alloc_

template<class T>
element_type * vbl_array_1d< T >::alloc_
private

Definition at line 35 of file vbl_array_1d.h.

◆ begin_

template<class T>
element_type* vbl_array_1d< T >::begin_
private

Definition at line 35 of file vbl_array_1d.h.

◆ end_

template<class T>
element_type * vbl_array_1d< T >::end_
private

Definition at line 35 of file vbl_array_1d.h.


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