dune-fem
2.4.1-rc
|
standard array with fixed size More...
#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/storage/array.hh>
Public Types | |
typedef Element | ElementType |
type of the array elements More... | |
typedef FixedSizeArray< Element, Size > | ArrayType |
type of the implementation (Barton-Nackman) More... | |
typedef ArrayDefaultTraits< ElementType, ArrayType > | Traits |
type of the traits More... | |
typedef Traits::ConstIteratorType | ConstIteratorType |
type of constant iterator More... | |
typedef Traits::IteratorType | IteratorType |
type of (non-constant) iterator More... | |
typedef ThisType | ArrayInterfaceType |
type of this interface More... | |
typedef ElementType | value_type |
make consistent with std::vector More... | |
typedef ConstIteratorType | const_iterator |
type of constant iterator More... | |
typedef IteratorType | iterator |
type of (non-constant) iterator More... | |
typedef unsigned int | size_type |
type of unsigned integral type of indexing More... | |
Public Member Functions | |
FixedSizeArray () | |
default constructor More... | |
FixedSizeArray (const ElementType &element) | |
initializing constructor More... | |
FixedSizeArray (const ThisType &other) | |
copy constructor More... | |
const ElementType & | operator[] (unsigned int index) const |
access an array element More... | |
ElementType & | operator[] (unsigned int index) |
access an array element More... | |
unsigned int | size () const |
void | assign (const ElementType &element) |
fill the array with copies of an element More... | |
void | assign (const ArrayInterface< T > &other) |
copy another array to this one More... | |
ConstIteratorType | begin () const |
obtain begin iterator More... | |
IteratorType | begin () |
obtain begin iterator More... | |
ConstIteratorType | end () const |
obtain end iterator More... | |
IteratorType | end () |
obtain end iterator More... | |
Static Public Attributes | |
static const unsigned int | fixedSize = Size |
compile time constant size of the array More... | |
Protected Member Functions | |
const ArrayDefaultTraits< Element, FixedSizeArray< Element, Size > >::ArrayType & | asImp () const |
ArrayDefaultTraits< Element, FixedSizeArray< Element, Size > >::ArrayType & | asImp () |
Static Protected Member Functions | |
static const ArrayDefaultTraits< Element, FixedSizeArray< Element, Size > >::ArrayType & | asImp (const ThisType &other) |
static ArrayDefaultTraits< Element, FixedSizeArray< Element, Size > >::ArrayType & | asImp (ThisType &other) |
Protected Attributes | |
ElementType | elements_ [fixedSize] |
standard array with fixed size
This array's size is a compile time constant. Hence, the memory needed to store the array elements can be provided within the object. There is no need to allocate it dynamically.
Basically, FixedSizeArray is just a standard C++ array. It's strength lies in the following two properties:
Element | type of the array elements (must be default constructable) |
Size | number of elements in the array |
|
inherited |
type of this interface
|
inherited |
type of the implementation (Barton-Nackman)
|
inherited |
type of constant iterator
|
inherited |
type of constant iterator
typedef Element Dune::Fem::FixedSizeArray< Element, Size >::ElementType |
type of the array elements
|
inherited |
type of (non-constant) iterator
|
inherited |
type of (non-constant) iterator
|
inherited |
type of unsigned integral type of indexing
|
inherited |
type of the traits
|
inherited |
make consistent with std::vector
|
inline |
default constructor
The array elements are not initialized with this constructor
|
inlineexplicit |
initializing constructor
Initializes the entire array with a default value
[in] | element | default value |
References Dune::Fem::ArrayInterface< AT >::assign().
|
inline |
copy constructor
[in] | other | array to copy |
References Dune::Fem::ArrayInterface< AT >::assign().
|
inlinestaticprotectedinherited |
|
inlinestaticprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineinherited |
fill the array with copies of an element
[in] | element | element wich shall be copied into every array entry |
|
inlineinherited |
copy another array to this one
Copies the data from another array to this one. Both arrays must be of the same size.
[in] | other | array to copy |
|
inlineinherited |
obtain begin iterator
|
inlineinherited |
obtain begin iterator
|
inlineinherited |
obtain end iterator
|
inlineinherited |
obtain end iterator
|
inline |
access an array element
[in] | index | index of the array element to access |
|
inline |
access an array element
[in] | index | index of the array element to access |
|
inline |
obtain the size of the array
|
protected |
|
static |
compile time constant size of the array