cml::external_1D< Element,-1 > Class Template Reference

Run-time sized external 1D array. More...

#include <external_1D.h>

Collaboration diagram for cml::external_1D< Element,-1 >:

Collaboration graph
[legend]

List of all members.

Public Types

enum  { array_size = -1 }
 The length as an enumerated value. More...
typedef const Element * const_pointer
typedef const Element & const_reference
typedef oned_tag dimension_tag
typedef external generator_type
typedef external_memory_tag memory_tag
typedef Element * pointer
typedef Element & reference
typedef not_resizable_tag resizing_tag
typedef dynamic_size_tag size_tag
typedef Element value_type

Public Member Functions

const_pointer data () const
 Return access to the data as a raw pointer.
pointer data ()
 Return access to the data as a raw pointer.
 external_1D (pointer const ptr, size_t size)
const_reference operator[] (size_t i) const
 Const access to the data as a C array.
reference operator[] (size_t i)
 Access to the data as a C array.
size_t size () const
 Return the number of elements in the array.

Protected Attributes

pointer const m_data
const size_t m_size

Private Member Functions

 external_1D ()


Detailed Description

template<typename Element>
class cml::external_1D< Element,-1 >

Run-time sized external 1D array.

Both the memory and the size are fixed at run-time, and cannot be changed. This is a specialization for the case that Rows and Cols are not specified (i.e. given as the default of -1,-1).

Definition at line 127 of file external_1D.h.


Member Typedef Documentation

template<typename Element >
typedef const Element* cml::external_1D< Element,-1 >::const_pointer

Definition at line 142 of file external_1D.h.

template<typename Element >
typedef const Element& cml::external_1D< Element,-1 >::const_reference

Definition at line 141 of file external_1D.h.

template<typename Element >
typedef oned_tag cml::external_1D< Element,-1 >::dimension_tag

Definition at line 154 of file external_1D.h.

template<typename Element >
typedef external cml::external_1D< Element,-1 >::generator_type

Definition at line 135 of file external_1D.h.

template<typename Element >
typedef external_memory_tag cml::external_1D< Element,-1 >::memory_tag

Definition at line 145 of file external_1D.h.

template<typename Element >
typedef Element* cml::external_1D< Element,-1 >::pointer

Definition at line 139 of file external_1D.h.

template<typename Element >
typedef Element& cml::external_1D< Element,-1 >::reference

Definition at line 140 of file external_1D.h.

template<typename Element >
typedef not_resizable_tag cml::external_1D< Element,-1 >::resizing_tag

Definition at line 151 of file external_1D.h.

template<typename Element >
typedef dynamic_size_tag cml::external_1D< Element,-1 >::size_tag

Definition at line 148 of file external_1D.h.

template<typename Element >
typedef Element cml::external_1D< Element,-1 >::value_type

Definition at line 138 of file external_1D.h.


Member Enumeration Documentation

template<typename Element >
anonymous enum

The length as an enumerated value.

Enumerator:
array_size 

Definition at line 160 of file external_1D.h.


Constructor & Destructor Documentation

template<typename Element >
cml::external_1D< Element,-1 >::external_1D ( pointer const   ptr,
size_t  size 
) [inline]

Definition at line 165 of file external_1D.h.

template<typename Element >
cml::external_1D< Element,-1 >::external_1D (  )  [private]


Member Function Documentation

template<typename Element >
const_pointer cml::external_1D< Element,-1 >::data (  )  const [inline]

Return access to the data as a raw pointer.

Definition at line 196 of file external_1D.h.

References cml::external_1D< Element, Size >::m_data.

template<typename Element >
pointer cml::external_1D< Element,-1 >::data (  )  [inline]

Return access to the data as a raw pointer.

Definition at line 193 of file external_1D.h.

References cml::external_1D< Element, Size >::m_data.

template<typename Element >
const_reference cml::external_1D< Element,-1 >::operator[] ( size_t  i  )  const [inline]

Const access to the data as a C array.

Parameters:
i a size_t index into the array.
Returns:
a const reference to the array value at i.
Note:
This function does not range-check the argument.

Definition at line 190 of file external_1D.h.

References cml::external_1D< Element, Size >::m_data.

template<typename Element >
reference cml::external_1D< Element,-1 >::operator[] ( size_t  i  )  [inline]

Access to the data as a C array.

Parameters:
i a size_t index into the array.
Returns:
a mutable reference to the array value at i.
Note:
This function does not range-check the argument.

Definition at line 181 of file external_1D.h.

References cml::external_1D< Element, Size >::m_data.

template<typename Element >
size_t cml::external_1D< Element,-1 >::size (  )  const [inline]

Return the number of elements in the array.

Definition at line 172 of file external_1D.h.


Member Data Documentation

template<typename Element >
pointer const cml::external_1D< Element,-1 >::m_data [protected]

Definition at line 201 of file external_1D.h.

template<typename Element >
const size_t cml::external_1D< Element,-1 >::m_size [protected]

Definition at line 202 of file external_1D.h.


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

Generated on Sat Jul 18 19:35:38 2009 for CML 1.0 by  doxygen 1.5.9