STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - Template Software for the Active Template Library COMSTL - The Standard Template Library meets the Component Object Model .netSTL - Standard Template Library meets the Microsoft.NET Common Language Runtime InetSTL - The Standard Template Library meets WinInet MFCSTL - Template Software for the Microsoft Foundation Classes UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

array_proxy Class Template Reference

Acts as a proxy for built-in arrays, ensuring functions passed array proxies have safe access to both array pointer and length. More...

#include <stlsoft_array_proxy.h>

List of all members.

Attributes

pointer base ()
 Returns the base of the array.

pointer base () const
 Returns the base of the array.

size_type size () const
 Returns the number of elements in the sequence.

ss_bool_t empty () const
 Indicates whether the search sequence is empty.

size_type max_size ()
 Returns the maximum number of elements in the sequence.


Public Methods

Construction
template<typename D>  array_proxy (array_proxy< D > const &d)
 Conversion constructor, facilitating conversion between polymorphic types of the same size.

template<typename D, ss_size_t N>  array_proxy (D(&d)[N])
 Constructs an instance of the array proxy from the given array.

template<typename D>  array_proxy (D *begin, D *end)
 Constructs an instance of the array proxy from the given range.

template<typename D>  array_proxy (D *p, ss_size_t n)
 Constructs an instance of the array proxy from the given range.

Subscripting
reference operator[] (ss_size_t index)
 Returns the element at the given index.

const_reference operator[] (ss_size_t index) const
 Returns the element at the given index.

Iteration
iterator begin ()
 Begins the iteration.

iterator end ()
 Ends the iteration.

const_iterator begin () const
 Begins the iteration.

const_iterator end () const
 Ends the iteration.


Detailed Description

template<typename T>
class stlsoft::array_proxy< T >

Acts as a proxy for built-in arrays, ensuring functions passed array proxies have safe access to both array pointer and length.


Constructor & Destructor Documentation

array_proxy array_proxy< D > const &    d [inline]
 

Conversion constructor, facilitating conversion between polymorphic types of the same size.

Parameters:
d  The array proxy of a derived type

array_proxy D &    d[N] [inline, explicit]
 

Constructs an instance of the array proxy from the given array.

Parameters:
d  The array

array_proxy D *    begin,
D *    end
[inline]
 

Constructs an instance of the array proxy from the given range.

Parameters:
begin  The start point of the range [begin, end)
end  The end point of the range [begin, end)

array_proxy D *    p,
ss_size_t    n
[inline]
 

Constructs an instance of the array proxy from the given range.

Parameters:
p  The start of the range
n  The number of elements in the range


Member Function Documentation

pointer base   const [inline]
 

Returns the base of the array.

pointer base   [inline]
 

Returns the base of the array.

const_iterator begin   const [inline]
 

Begins the iteration.

Returns:
An iterator representing the start of the sequence

iterator begin   [inline]
 

Begins the iteration.

Returns:
An iterator representing the start of the sequence

ss_bool_t empty   const [inline]
 

Indicates whether the search sequence is empty.

const_iterator end   const [inline]
 

Ends the iteration.

Returns:
An iterator representing the end of the sequence

iterator end   [inline]
 

Ends the iteration.

Returns:
An iterator representing the end of the sequence

size_type max_size   [inline, static]
 

Returns the maximum number of elements in the sequence.

const_reference operator[] ss_size_t    index const [inline]
 

Returns the element at the given index.

Parameters:
index  The offset of the requested element
Note:
No runtime checking of the validity of the index is provided in release builds, only a debug-time assert

reference operator[] ss_size_t    index [inline]
 

Returns the element at the given index.

Parameters:
index  The offset of the requested element
Note:
No runtime checking of the validity of the index is provided in release builds, only a debug-time assert

size_type size   const [inline]
 

Returns the number of elements in the sequence.


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

STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004