cloudy trunk
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes
flex_arr< T, lgBC > Class Template Reference

#include <container_classes.h>

Collaboration diagram for flex_arr< T, lgBC >:
Collaboration graph
[legend]

Public Types

typedef random_access_iterator_tag iterator_category
 
typedef T value_type
 
typedef T & reference
 
typedef const T & const_reference
 
typedef T * pointer
 
typedef const T * const_pointer
 
typedef long size_type
 
typedef ptrdiff_t difference_type
 
typedef pntr< T, lgBC > iterator
 
typedef const_pntr< T, lgBC > const_iterator
 

Public Member Functions

 flex_arr ()
 
 flex_arr (size_type begin, size_type end)
 
 flex_arr (const flex_arr &f)
 
 ~flex_arr ()
 
const flex_arroperator= (const flex_arr &f)
 
void clear ()
 
void zero ()
 
void invalidate ()
 
void state_do (FILE *out, bool lgGet)
 
void dump_state (FILE *out) const
 
void restore_state (FILE *in)
 
void reserve (size_type size)
 
void alloc (size_type begin, size_type end)
 
void realloc (size_type end)
 
reference operator[] (size_type i)
 
const_reference operator[] (size_type i) const
 
reference at (size_type i)
 
const_reference at (size_type i) const
 
iterator ptr (size_type i)
 
const_iterator ptr (size_type i) const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
size_type size () const
 
size_type capacity () const
 
bool empty () const
 
pointer data ()
 
const_pointer data () const
 

Private Member Functions

void p_clear0 ()
 
void p_clear1 ()
 
pointer p_pointer (size_type i) const
 
iterator p_iterator (size_type i) const
 
bool p_lgInbounds (size_type i) const
 
reference p_index (size_type i) const
 

Private Attributes

size_t p_size
 
long p_begin
 
long p_end
 
bool p_init
 
T * p_ptr_alloc
 
T * p_ptr
 

Detailed Description

template<class T, bool lgBC = lgBOUNDSCHECKVAL>
class flex_arr< T, lgBC >

Definition at line 1850 of file container_classes.h.

Member Typedef Documentation

◆ const_iterator

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
typedef const_pntr<T,lgBC> flex_arr< T, lgBC >::const_iterator

Definition at line 1870 of file container_classes.h.

◆ const_pointer

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
typedef const T* flex_arr< T, lgBC >::const_pointer

Definition at line 1866 of file container_classes.h.

◆ const_reference

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
typedef const T& flex_arr< T, lgBC >::const_reference

Definition at line 1864 of file container_classes.h.

◆ difference_type

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
typedef ptrdiff_t flex_arr< T, lgBC >::difference_type

Definition at line 1868 of file container_classes.h.

◆ iterator

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
typedef pntr<T,lgBC> flex_arr< T, lgBC >::iterator

Definition at line 1869 of file container_classes.h.

◆ iterator_category

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
typedef random_access_iterator_tag flex_arr< T, lgBC >::iterator_category

Definition at line 1861 of file container_classes.h.

◆ pointer

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
typedef T* flex_arr< T, lgBC >::pointer

Definition at line 1865 of file container_classes.h.

◆ reference

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
typedef T& flex_arr< T, lgBC >::reference

Definition at line 1863 of file container_classes.h.

◆ size_type

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
typedef long flex_arr< T, lgBC >::size_type

Definition at line 1867 of file container_classes.h.

◆ value_type

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
typedef T flex_arr< T, lgBC >::value_type

Definition at line 1862 of file container_classes.h.

Constructor & Destructor Documentation

◆ flex_arr() [1/3]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
flex_arr< T, lgBC >::flex_arr ( )
inline

Definition at line 1889 of file container_classes.h.

References flex_arr< T, lgBC >::p_clear1().

Here is the call graph for this function:

◆ flex_arr() [2/3]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
flex_arr< T, lgBC >::flex_arr ( size_type  begin,
size_type  end 
)
inline

Definition at line 1893 of file container_classes.h.

References flex_arr< T, lgBC >::alloc(), flex_arr< T, lgBC >::begin(), flex_arr< T, lgBC >::end(), and flex_arr< T, lgBC >::p_clear1().

Here is the call graph for this function:

◆ flex_arr() [3/3]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
flex_arr< T, lgBC >::flex_arr ( const flex_arr< T, lgBC > &  f)
inline

Definition at line 1898 of file container_classes.h.

References flex_arr< T, lgBC >::p_clear1().

Here is the call graph for this function:

◆ ~flex_arr()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
flex_arr< T, lgBC >::~flex_arr ( )
inline

Definition at line 1903 of file container_classes.h.

References flex_arr< T, lgBC >::p_clear0().

Here is the call graph for this function:

Member Function Documentation

◆ alloc()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
void flex_arr< T, lgBC >::alloc ( size_type  begin,
size_type  end 
)
inline

◆ at() [1/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
reference flex_arr< T, lgBC >::at ( size_type  i)
inline

Definition at line 2072 of file container_classes.h.

References OUT_OF_RANGE(), and flex_arr< T, lgBC >::p_lgInbounds().

Here is the call graph for this function:

◆ at() [2/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
const_reference flex_arr< T, lgBC >::at ( size_type  i) const
inline

Definition at line 2078 of file container_classes.h.

References OUT_OF_RANGE(), and flex_arr< T, lgBC >::p_lgInbounds().

Here is the call graph for this function:

◆ back() [1/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
reference flex_arr< T, lgBC >::back ( )
inline

Definition at line 2123 of file container_classes.h.

References flex_arr< T, lgBC >::end().

Here is the call graph for this function:

◆ back() [2/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
const_reference flex_arr< T, lgBC >::back ( ) const
inline

Definition at line 2127 of file container_classes.h.

References flex_arr< T, lgBC >::end().

Here is the call graph for this function:

◆ begin() [1/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
iterator flex_arr< T, lgBC >::begin ( )
inline

Definition at line 2096 of file container_classes.h.

References flex_arr< T, lgBC >::p_begin, and flex_arr< T, lgBC >::ptr().

Referenced by flex_arr< T, lgBC >::alloc(), flex_arr< T, lgBC >::flex_arr(), and flex_arr< T, lgBC >::front().

Here is the call graph for this function:

◆ begin() [2/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
const_iterator flex_arr< T, lgBC >::begin ( ) const
inline

Definition at line 2100 of file container_classes.h.

References flex_arr< T, lgBC >::p_begin, and flex_arr< T, lgBC >::ptr().

Here is the call graph for this function:

◆ capacity()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
size_type flex_arr< T, lgBC >::capacity ( ) const
inline

Definition at line 2136 of file container_classes.h.

References flex_arr< T, lgBC >::p_size.

◆ clear()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
void flex_arr< T, lgBC >::clear ( )
inline

◆ data() [1/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
pointer flex_arr< T, lgBC >::data ( )
inline

Definition at line 2145 of file container_classes.h.

References flex_arr< T, lgBC >::p_ptr_alloc.

◆ data() [2/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
const_pointer flex_arr< T, lgBC >::data ( ) const
inline

Definition at line 2149 of file container_classes.h.

References flex_arr< T, lgBC >::p_ptr_alloc.

◆ dump_state()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
void flex_arr< T, lgBC >::dump_state ( FILE *  out) const
inline

Definition at line 1950 of file container_classes.h.

References do_dump_state(), FLX_TYPE, MA_VERS, flex_arr< T, lgBC >::p_ptr_alloc, and flex_arr< T, lgBC >::p_size.

Referenced by flex_arr< T, lgBC >::state_do().

Here is the call graph for this function:

◆ empty()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
bool flex_arr< T, lgBC >::empty ( ) const
inline

Definition at line 2140 of file container_classes.h.

References flex_arr< T, lgBC >::size().

Here is the call graph for this function:

◆ end() [1/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
iterator flex_arr< T, lgBC >::end ( )
inline

◆ end() [2/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
const_iterator flex_arr< T, lgBC >::end ( ) const
inline

Definition at line 2109 of file container_classes.h.

References flex_arr< T, lgBC >::p_end, and flex_arr< T, lgBC >::ptr().

Here is the call graph for this function:

◆ front() [1/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
reference flex_arr< T, lgBC >::front ( )
inline

Definition at line 2114 of file container_classes.h.

References flex_arr< T, lgBC >::begin().

Here is the call graph for this function:

◆ front() [2/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
const_reference flex_arr< T, lgBC >::front ( ) const
inline

Definition at line 2118 of file container_classes.h.

References flex_arr< T, lgBC >::begin().

Here is the call graph for this function:

◆ invalidate()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
void flex_arr< T, lgBC >::invalidate ( )
inline

Definition at line 1938 of file container_classes.h.

References invalidate_array(), flex_arr< T, lgBC >::p_ptr_alloc, and flex_arr< T, lgBC >::p_size.

Here is the call graph for this function:

◆ operator=()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
const flex_arr & flex_arr< T, lgBC >::operator= ( const flex_arr< T, lgBC > &  f)
inline

◆ operator[]() [1/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
reference flex_arr< T, lgBC >::operator[] ( size_type  i)
inline

Definition at line 2063 of file container_classes.h.

References flex_arr< T, lgBC >::p_index().

Here is the call graph for this function:

◆ operator[]() [2/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
const_reference flex_arr< T, lgBC >::operator[] ( size_type  i) const
inline

Definition at line 2067 of file container_classes.h.

References flex_arr< T, lgBC >::p_index().

Here is the call graph for this function:

◆ p_clear0()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
void flex_arr< T, lgBC >::p_clear0 ( )
inlineprivate

◆ p_clear1()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
void flex_arr< T, lgBC >::p_clear1 ( )
inlineprivate

◆ p_index()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
reference flex_arr< T, lgBC >::p_index ( size_type  i) const
inlineprivate

Definition at line 2048 of file container_classes.h.

References OUT_OF_RANGE(), flex_arr< T, lgBC >::p_lgInbounds(), and flex_arr< T, lgBC >::p_pointer().

Referenced by flex_arr< T, lgBC >::operator[]().

Here is the call graph for this function:

◆ p_iterator()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
iterator flex_arr< T, lgBC >::p_iterator ( size_type  i) const
inlineprivate

Definition at line 2031 of file container_classes.h.

References flex_arr< T, lgBC >::p_begin, flex_arr< T, lgBC >::p_end, and flex_arr< T, lgBC >::p_pointer().

Referenced by flex_arr< T, lgBC >::ptr().

Here is the call graph for this function:

◆ p_lgInbounds()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
bool flex_arr< T, lgBC >::p_lgInbounds ( size_type  i) const
inlineprivate

◆ p_pointer()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
pointer flex_arr< T, lgBC >::p_pointer ( size_type  i) const
inlineprivate

◆ ptr() [1/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
iterator flex_arr< T, lgBC >::ptr ( size_type  i)
inline

Definition at line 2085 of file container_classes.h.

References flex_arr< T, lgBC >::p_iterator().

Referenced by flex_arr< T, lgBC >::begin(), and flex_arr< T, lgBC >::end().

Here is the call graph for this function:

◆ ptr() [2/2]

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
const_iterator flex_arr< T, lgBC >::ptr ( size_type  i) const
inline

Definition at line 2089 of file container_classes.h.

References flex_arr< T, lgBC >::p_iterator().

Here is the call graph for this function:

◆ realloc()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
void flex_arr< T, lgBC >::realloc ( size_type  end)
inline

◆ reserve()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
void flex_arr< T, lgBC >::reserve ( size_type  size)
inline

Definition at line 1961 of file container_classes.h.

References ASSERT, flex_arr< T, lgBC >::clear(), flex_arr< T, lgBC >::p_ptr_alloc, flex_arr< T, lgBC >::p_size, and flex_arr< T, lgBC >::size().

Here is the call graph for this function:

◆ restore_state()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
void flex_arr< T, lgBC >::restore_state ( FILE *  in)
inline

Definition at line 1955 of file container_classes.h.

References do_restore_state(), FLX_TYPE, MA_VERS, flex_arr< T, lgBC >::p_ptr_alloc, and flex_arr< T, lgBC >::p_size.

Referenced by flex_arr< T, lgBC >::state_do().

Here is the call graph for this function:

◆ size()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
size_type flex_arr< T, lgBC >::size ( ) const
inline

Definition at line 2132 of file container_classes.h.

References max(), flex_arr< T, lgBC >::p_begin, and flex_arr< T, lgBC >::p_end.

Referenced by flex_arr< T, lgBC >::empty(), and flex_arr< T, lgBC >::reserve().

Here is the call graph for this function:

◆ state_do()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
void flex_arr< T, lgBC >::state_do ( FILE *  out,
bool  lgGet 
)
inline

Definition at line 1942 of file container_classes.h.

References flex_arr< T, lgBC >::dump_state(), lgGet, and flex_arr< T, lgBC >::restore_state().

Here is the call graph for this function:

◆ zero()

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
void flex_arr< T, lgBC >::zero ( )
inline

Field Documentation

◆ p_begin

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
long flex_arr< T, lgBC >::p_begin
private

◆ p_end

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
long flex_arr< T, lgBC >::p_end
private

◆ p_init

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
bool flex_arr< T, lgBC >::p_init
private

◆ p_ptr

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
T* flex_arr< T, lgBC >::p_ptr
private

◆ p_ptr_alloc

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
T* flex_arr< T, lgBC >::p_ptr_alloc
private

◆ p_size

template<class T , bool lgBC = lgBOUNDSCHECKVAL>
size_t flex_arr< T, lgBC >::p_size
private

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