My Project
Public Member Functions
Bounds_checked_array< Element_type > Class Template Reference

#include <sql_array.h>

List of all members.

Public Member Functions

 Bounds_checked_array (Element_type *el, size_t size)
void reset ()
void reset (Element_type *array, size_t size)
void resize (size_t new_size)
Element_type & operator[] (size_t n)
const Element_type & operator[] (size_t n) const
size_t element_size () const
size_t size () const
bool is_null () const
void pop_front ()
Element_type * array () const
bool operator== (const Bounds_checked_array< Element_type > &rhs) const
bool operator!= (const Bounds_checked_array< Element_type > &rhs) const

Detailed Description

template<typename Element_type>
class Bounds_checked_array< Element_type >

A wrapper class which provides array bounds checking. We do *not* own the array, we simply have a pointer to the first element, and a length.

We want the compiler-generated versions of:
  • the copy CTOR (memberwise initialization)
  • the assignment operator (memberwise assignment)
Element_typeThe type of the elements of the container.

Member Function Documentation

template<typename Element_type>
void Bounds_checked_array< Element_type >::resize ( size_t  new_size) [inline]

Set a new bound on the array. Does not resize the underlying array, so the new size must be smaller than or equal to the current size.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines