Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
#include <ArrayManager.hpp>
Public Member Functions | |
ArrayManager (void **array_ptr, int &array_allocated_space, int &array_size, int count, int val_size, int *err) | |
~ArrayManager () | |
void | keep_array () |
Private Attributes | |
void ** | arrayPtr |
Definition at line 28 of file ArrayManager.hpp.
ArrayManager::ArrayManager | ( | void ** | array_ptr, |
int & | array_allocated_space, | ||
int & | array_size, | ||
int | count, | ||
int | val_size, | ||
int * | err | ||
) | [inline] |
Definition at line 33 of file ArrayManager.hpp.
References arrayPtr, iBase_BAD_ARRAY_DIMENSION, iBase_MEMORY_ALLOCATION_FAILED, and iBase_SUCCESS.
: arrayPtr( 0 ) { if( !*array_ptr || !array_allocated_space ) { *array_ptr = std::malloc( val_size * count ); array_allocated_space = array_size = count; if( !*array_ptr ) { *err = iBase_MEMORY_ALLOCATION_FAILED; return; } arrayPtr = array_ptr; } else { array_size = count; if( array_allocated_space < count ) { *err = iBase_BAD_ARRAY_DIMENSION; return; } } *err = iBase_SUCCESS; }
ArrayManager::~ArrayManager | ( | ) | [inline] |
void ArrayManager::keep_array | ( | ) | [inline] |
void** ArrayManager::arrayPtr [private] |
Definition at line 30 of file ArrayManager.hpp.
Referenced by ArrayManager(), keep_array(), and ~ArrayManager().