Dune::base_array_window< B, A > Class Template Reference

#include <basearray.hh>

Inheritance diagram for Dune::base_array_window< B, A >:

Dune::base_array_unmanaged< B, A >

List of all members.


Detailed Description

template<class B, class A = ISTLAllocator>
class Dune::base_array_window< B, A >

Extend base_array_unmanaged by functions to manipulate.

This container has *NO* memory management at all, copy constuctor, assignment and destructor are all default. A container can be constructed as empty or from a given pointer and size. This class is used to implement a view into a larger array.

You can copy such an object to a base_array to make a real copy.

Error checking: no error checking is provided normally. Setting the compile time switch DUNE_ISTL_WITH_CHECKING enables error checking.

Public Types

typedef B member_type
 export the type representing the components
typedef A allocator_type
 export the allocator type
typedef base_array_unmanaged
< B, A >::iterator 
iterator
 make iterators available as types
typedef base_array_unmanaged
< B, A >::const_iterator 
const_iterator
 make iterators available as types
typedef base_array_unmanaged
< B, A >::size_type 
size_type
 The type used for the index access.
typedef A::difference_type difference_type
 The type used for the difference between two iterator positions.

Public Member Functions

 base_array_window ()
 makes empty array
 base_array_window (B *_p, size_type _n)
 make array from given pointer and size
void set (size_type _n, B *_p)
 set pointer and length
void advance (difference_type newsize)
 advance pointer by newsize elements and then set size to new size
void move (difference_type offset, size_type newsize)
 increment pointer by offset and set size
void move (difference_type offset)
 increment pointer by offset, leave size
B * getptr ()
 return the pointer
B & operator[] (size_type i)
 random access to blocks
const B & operator[] (size_type i) const
 same for read only access
iterator begin ()
 begin iterator
const_iterator begin () const
 begin const_iterator
iterator end ()
 end iterator
const_iterator end () const
 end const_iterator
iterator rbegin ()
 begin reverse iterator
const_iterator rbegin () const
 begin reverse const_iterator
iterator rend ()
 end reverse iterator
const_iterator rend () const
 end reverse const_iterator
iterator find (size_type i)
 random access returning iterator (end if not contained)
const_iterator find (size_type i) const
 random access returning iterator (end if not contained)
size_type size () const
 number of blocks in the array (are of size 1 here)


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

Generated on Thu Apr 2 10:40:16 2009 for dune-istl by  doxygen 1.5.6