cml::external_1D< Element, Size > Class Template Reference

Fixed-size external 1D array. More...

#include <external_1D.h>

Inheritance diagram for cml::external_1D< Element, Size >:

Inheritance graph
[legend]
Collaboration diagram for cml::external_1D< Element, Size >:

Collaboration graph
[legend]

List of all members.

Public Types

enum  { array_size = Size }
 The length as an enumerated value. More...
typedef value_type array_impl [Size]
typedef const Element * const_pointer
typedef const Element & const_reference
typedef oned_tag dimension_tag
typedef external< Size,-1 > generator_type
typedef external_memory_tag memory_tag
typedef Element * pointer
typedef Element & reference
typedef not_resizable_tag resizing_tag
typedef fixed_size_tag size_tag
typedef Element value_type

Public Member Functions

 CML_STATIC_REQUIRE (Size > 0)
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)
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

Private Member Functions

 external_1D ()


Detailed Description

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

Fixed-size external 1D array.

Both the memory and the size are fixed at compile time, and cannot be changed.

Definition at line 34 of file external_1D.h.


Member Typedef Documentation

template<typename Element, int Size = -1>
typedef value_type cml::external_1D< Element, Size >::array_impl[Size]

Definition at line 52 of file external_1D.h.

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

Definition at line 49 of file external_1D.h.

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

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

Definition at line 64 of file external_1D.h.

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

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

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

Definition at line 46 of file external_1D.h.

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

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

Reimplemented in cml::vector< Element, external<> >.

Definition at line 61 of file external_1D.h.

template<typename Element, int Size = -1>
typedef fixed_size_tag cml::external_1D< Element, Size >::size_tag

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


Member Enumeration Documentation

template<typename Element, int Size = -1>
anonymous enum

The length as an enumerated value.

Enumerator:
array_size 

Definition at line 70 of file external_1D.h.


Constructor & Destructor Documentation

template<typename Element, int Size = -1>
cml::external_1D< Element, Size >::external_1D ( pointer const   ptr  )  [inline]

Definition at line 75 of file external_1D.h.

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


Member Function Documentation

template<typename Element, int Size = -1>
cml::external_1D< Element, Size >::CML_STATIC_REQUIRE ( Size  ,
 
)

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

Return access to the data as a raw pointer.

Definition at line 106 of file external_1D.h.

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

Return access to the data as a raw pointer.

Definition at line 103 of file external_1D.h.

template<typename Element, int Size = -1>
const_reference cml::external_1D< Element, Size >::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 100 of file external_1D.h.

template<typename Element, int Size = -1>
reference cml::external_1D< Element, Size >::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 91 of file external_1D.h.

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

Return the number of elements in the array.

Definition at line 82 of file external_1D.h.


Member Data Documentation

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


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