MFEM v2.0
Protected Member Functions | Protected Attributes
BaseArray Class Reference

Base class for array container. More...

#include <array.hpp>

Inheritance diagram for BaseArray:
Inheritance graph
[legend]

List of all members.

Protected Member Functions

 BaseArray ()
 BaseArray (int asize, int ainc, int elmentsize)
 Creates array of asize elements of size elementsize.
 ~BaseArray ()
 Free the allocated memory.
void GrowSize (int minsize, int elementsize)

Protected Attributes

void * data
 Pointer to data.
int size
 Size of the array.
int allocsize
 Size of the allocated memory.
int inc

Detailed Description

Base class for array container.

Definition at line 24 of file array.hpp.


Constructor & Destructor Documentation

BaseArray::BaseArray ( ) [inline, protected]

Definition at line 37 of file array.hpp.

BaseArray::BaseArray ( int  asize,
int  ainc,
int  elmentsize 
) [protected]

Creates array of asize elements of size elementsize.

Definition at line 19 of file array.cpp.

References allocsize, data, inc, and size.

BaseArray::~BaseArray ( ) [protected]

Free the allocated memory.

Definition at line 34 of file array.cpp.

References allocsize, and data.


Member Function Documentation

void BaseArray::GrowSize ( int  minsize,
int  elementsize 
) [protected]

Increases the allocsize of the array to be at least minsize. The current content of the array is copied to the newly allocated space. minsize must be > abs(allocsize).

Definition at line 40 of file array.cpp.

References allocsize, data, inc, and size.


Member Data Documentation

int BaseArray::allocsize [protected]

Size of the allocated memory.

Definition at line 32 of file array.hpp.

Referenced by BaseArray(), GrowSize(), Array< T >::MakeRef(), Swap(), and ~BaseArray().

void* BaseArray::data [protected]

Pointer to data.

Definition at line 28 of file array.hpp.

Referenced by BaseArray(), GrowSize(), Array< T >::MakeRef(), Swap(), and ~BaseArray().

int BaseArray::inc [protected]

Increment of allocated memory on overflow, inc = 0 doubles the array

Definition at line 35 of file array.hpp.

Referenced by BaseArray(), GrowSize(), Array< T >::MakeRef(), and Swap().

int BaseArray::size [protected]

Size of the array.

Definition at line 30 of file array.hpp.

Referenced by BaseArray(), GrowSize(), Array< T >::MakeRef(), and Swap().


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines