GPA - Generic Pointer Array, template class manages 1d array of pointers to objects of type T. More...
#include <gpa.h>
GENERAL | |
long | size |
long | asize |
long | dsize |
T ** | values |
GPA (void) | |
CONSTRUCTOR. More... | |
GPA (long s, long ds=1) | |
CONSTRUCTOR. More... | |
GPA (const GPA< T > *src) | |
CONSTRUCTOR COPY. More... | |
~GPA () | |
DESTRUCTOR. More... | |
RE/DE/ALLOCATION | |
void | realloc_core (long new_asize) |
reallocate up receiver without checking of sizes More... | |
void | free_ptrs_core (long newsize) |
reallocate down (free pointers) receiver without checking of sizes More... | |
void | realloc (long new_asize) |
reallocate up receiver with checking the new size More... | |
void | reallocup (long new_asize) |
reallocate up receiver with checking the new size More... | |
void | reallocdown (long new_asize) |
reallocate up receiver with checking the new size More... | |
void | reallocplus (long d) |
reallocate receiver to the new size More... | |
void | resize (long newsize) |
reallocate receiver to the new size More... | |
void | resizeup (long newsize) |
void | resizedown (long newsize) |
void | resize_zero (void) |
SET | |
void | free_ptrs (void) |
void | free_ptr (T *val) |
void | free_ptr (long i) |
void | delete_object (long i) |
Delete object pointed by the i-th pointer. The pointer is set to NULL. More... | |
void | delete_objects (void) |
Delete all objects pointed by pointers. The pointers are set to NULL. More... | |
void | initialize (long s, long ds=0) |
void | be_copy_of (const GPA< T > *src) |
void | reverse () |
void | assign (long i, T *val) |
T * | add (T *val) |
add (assign) new pointer to the end; enlarge the receiver if too small More... | |
T * | wedge (long i, T *val) |
void | add_unique (T *src) |
add new pointer "src" if unique More... | |
void | add_unique (const GPA< T > &src) |
add new pointers "src" if unique More... | |
bool | replace_member_by (T *oldv, T *newv) |
GET | |
const T ** | v (void) const |
T * | operator[] (long i) const |
T * | first (void) const |
T * | last (void) const |
T * | at_or_null (long i) const |
long | operator() (void) const |
long | give_size (void) const |
long | give_asize (void) const |
long | give_num_nonNULL_ptrs () const |
get sum of nonNULL pointers in two levels More... | |
long | give_num_nonNULL_ptrs2 () const |
get sum of nonNULL pointers in two levels More... | |
OTHER | |
bool | is_member (T *val) const |
bool | is_unique (void) const |
bool | is_identical_with (const GPA< T > &one) const |
bool | has_same_members_as (const GPA< T > &one) const |
bool | has_these_members (const GPA< T > &one) const |
bool | has_these_members (long s, const T **one) const |
void | shake_down (void) |
GPA - Generic Pointer Array, template class manages 1d array of pointers to objects of type T.
This class maitains only pointers to particular objects, objects itselfs are not contained within this array. They have to be created outside and then their pointers can be added to array. When destructor is called, the pointed object is not deleted. Inspirated by OOFEM/oofemlib/alist.h
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
add (assign) new pointer to the end; enlarge the receiver if too small
Definition at line 157 of file gpa.h.
Referenced by midaspace::Mesh::adaptivity(), midaspace::GPA< midaspace::Point >::add_unique(), midaspace::PolyLine::init_point_on(), midaspace::Model::read_model_MELNIK(), and midaspace::TF_GPA_add_another().
|
inline |
void midaspace::GPA< T >::add_unique | ( | const GPA< T > & | src | ) |
|
inline |
|
inline |
|
inline |
Definition at line 129 of file gpa.h.
Referenced by midaspace::GPA< midaspace::Point >::GPA().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 110 of file gpa.h.
Referenced by midaspace::GPA< midaspace::Point >::delete_objects().
|
inline |
reallocate down (free pointers) receiver without checking of sizes
Definition at line 62 of file gpa.h.
Referenced by midaspace::GPA< midaspace::Point >::realloc(), and midaspace::GPA< midaspace::Point >::reallocdown().
|
inline |
|
inline |
get sum of nonNULL pointers in two levels
Definition at line 245 of file gpa.h.
Referenced by midaspace::GPA< midaspace::Point >::give_num_nonNULL_ptrs2().
|
inline |
|
inline |
Definition at line 241 of file gpa.h.
Referenced by midaspace::ElemAttribs::print_Ebc_SIFEL(), and midaspace::ElemAttribs::print_Fbc_SIFEL().
|
inline |
|
inline |
Definition at line 282 of file gpa.h.
Referenced by midaspace::GPA< midaspace::Point >::has_these_members().
|
inline |
|
inline |
Definition at line 120 of file gpa.h.
Referenced by midaspace::GPA< midaspace::Point >::GPA().
|
inline |
|
inline |
Definition at line 276 of file gpa.h.
Referenced by midaspace::GPA< midaspace::Point >::add_unique().
|
inline |
|
inline |
Definition at line 228 of file gpa.h.
Referenced by midaspace::PolyLine::divide().
|
inline |
|
inline |
|
inline |
reallocate up receiver with checking the new size
Definition at line 67 of file gpa.h.
Referenced by midaspace::GPA< midaspace::Point >::resize().
|
inline |
reallocate up receiver without checking of sizes
Definition at line 52 of file gpa.h.
Referenced by midaspace::GPA< midaspace::Point >::realloc(), midaspace::GPA< midaspace::Point >::reallocplus(), and midaspace::GPA< midaspace::Point >::reallocup().
|
inline |
reallocate up receiver with checking the new size
Definition at line 83 of file gpa.h.
Referenced by midaspace::GPA< midaspace::Point >::resizedown().
|
inline |
|
inline |
reallocate up receiver with checking the new size
Definition at line 74 of file gpa.h.
Referenced by midaspace::GPA< midaspace::Point >::add(), and midaspace::GPA< midaspace::Point >::resizeup().
|
inline |
|
inline |
reallocate receiver to the new size
Definition at line 98 of file gpa.h.
Referenced by midaspace::Model::generate_mesh_RFbyHN().
|
inline |
|
inline |
|
inline |
|
inline |
void midaspace::GPA< T >::shake_down | ( | void | ) |
Definition at line 312 of file gpa.h.
Referenced by midaspace::TF_GPA_shake_down_reid(), and midaspace::TF_GPA_shake_down_reidoid().
|
inline |
|
inline |
!!!! toto predelat at se to zveda o asize + (dsize ? dsize : 0.1*asize+1);
Definition at line 164 of file gpa.h.
Referenced by midaspace::TF_GPA_wdg_another().
|
protected |
Definition at line 31 of file gpa.h.
Referenced by midaspace::GPA< midaspace::Point >::add(), midaspace::GPA< midaspace::Point >::be_copy_of(), midaspace::GPA< midaspace::Point >::free_ptrs(), midaspace::GPA< midaspace::Point >::free_ptrs_core(), midaspace::GPA< midaspace::Point >::give_asize(), midaspace::GPA< midaspace::Point >::GPA(), midaspace::GPA< midaspace::Point >::initialize(), midaspace::GPA< midaspace::Point >::realloc(), midaspace::GPA< midaspace::Point >::realloc_core(), midaspace::GPA< midaspace::Point >::reallocdown(), midaspace::GPA< midaspace::Point >::reallocup(), and midaspace::GPA< midaspace::Point >::wedge().
|
protected |
Definition at line 32 of file gpa.h.
Referenced by midaspace::GPA< midaspace::Point >::be_copy_of(), midaspace::GPA< midaspace::Point >::GPA(), midaspace::GPA< midaspace::Point >::initialize(), and midaspace::GPA< midaspace::Point >::reallocup().
|
protected |
Definition at line 30 of file gpa.h.
Referenced by midaspace::GPA< midaspace::Point >::add(), midaspace::GPA< midaspace::Point >::assign(), midaspace::GPA< midaspace::Point >::at_or_null(), midaspace::GPA< midaspace::Point >::be_copy_of(), midaspace::GPA< midaspace::Point >::delete_objects(), midaspace::GPA< midaspace::Point >::first(), midaspace::GPA< midaspace::Point >::free_ptr(), midaspace::GPA< midaspace::Point >::give_num_nonNULL_ptrs(), midaspace::GPA< midaspace::Point >::give_num_nonNULL_ptrs2(), midaspace::GPA< midaspace::Point >::give_size(), midaspace::GPA< midaspace::Point >::GPA(), midaspace::GPA< midaspace::Point >::has_same_members_as(), midaspace::GPA< midaspace::Point >::has_these_members(), midaspace::GPA< midaspace::Point >::initialize(), midaspace::GPA< midaspace::Point >::is_identical_with(), midaspace::GPA< midaspace::Point >::is_member(), midaspace::GPA< midaspace::Point >::is_unique(), midaspace::GPA< midaspace::Point >::last(), midaspace::GPA< midaspace::Point >::operator()(), midaspace::GPA< midaspace::Point >::operator[](), midaspace::GPA< midaspace::Point >::realloc_core(), midaspace::GPA< midaspace::Point >::reallocplus(), midaspace::GPA< midaspace::Point >::replace_member_by(), midaspace::GPA< midaspace::Point >::resize(), midaspace::GPA< midaspace::Point >::resize_zero(), midaspace::GPA< midaspace::Point >::resizedown(), midaspace::GPA< midaspace::Point >::resizeup(), midaspace::GPA< midaspace::Point >::reverse(), and midaspace::GPA< midaspace::Point >::wedge().
|
protected |
Definition at line 33 of file gpa.h.
Referenced by midaspace::GPA< midaspace::Point >::add(), midaspace::GPA< midaspace::Point >::assign(), midaspace::GPA< midaspace::Point >::at_or_null(), midaspace::GPA< midaspace::Point >::be_copy_of(), midaspace::GPA< midaspace::Point >::delete_object(), midaspace::GPA< midaspace::Point >::delete_objects(), midaspace::GPA< midaspace::Point >::first(), midaspace::GPA< midaspace::Point >::free_ptr(), midaspace::GPA< midaspace::Point >::free_ptrs(), midaspace::GPA< midaspace::Point >::free_ptrs_core(), midaspace::GPA< midaspace::Point >::give_num_nonNULL_ptrs(), midaspace::GPA< midaspace::Point >::give_num_nonNULL_ptrs2(), midaspace::GPA< midaspace::Point >::GPA(), midaspace::GPA< midaspace::Point >::has_same_members_as(), midaspace::GPA< midaspace::Point >::has_these_members(), midaspace::GPA< midaspace::Point >::initialize(), midaspace::GPA< midaspace::Point >::is_identical_with(), midaspace::GPA< midaspace::Point >::is_member(), midaspace::GPA< midaspace::Point >::is_unique(), midaspace::GPA< midaspace::Point >::last(), midaspace::GPA< midaspace::Point >::operator[](), midaspace::GPA< midaspace::Point >::realloc_core(), midaspace::GPA< midaspace::Point >::replace_member_by(), midaspace::GPA< midaspace::Point >::reverse(), midaspace::GPA< midaspace::Point >::v(), midaspace::GPA< midaspace::Point >::wedge(), and midaspace::GPA< midaspace::Point >::~GPA().