All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
classarray.h
Go to the documentation of this file.
35 * Class ClassArray provides safe arrays of general C++ objects (in contrast to data objects). The elements of an
36 * instance of ClassArray can be accessed just like ordinary C++ array elements by means of the index
40 * - checking of array bounds when accessing elements with the indexing operator[]() when compiled without \c -DNDEBUG
42 * Moreover, #ClassArray%s may easily be extended by #insert%ing or #append%ing elements to the ClassArray or shrunken
43 * by \ref remove() "removing" elements. Method reSize(int n) resets the ClassArray%s length to \p n thereby possibly
46 * A ClassArray may be used as arguments for standard C functions requiring pointers through the use of get_ptr() and
49 * Internally, a ClassArray object allocates a block of memory that fits up to max() elements, only size() of them are
63 /** When a ClassArray is reSize()%d to more than max() elements, the new value for max() is not just set to the new
64 * size but rather to \p memFactor * \p size. This makes #reSize%ing perform better in codes where a ClassArray is
214 /** Resizing a ClassArray to less than the previous size, involves discarding its last elements. Resizing to a larger
215 * value involves adding uninitialized elements (similar to append()). If neccessary, also memory will be
231 /** Even though the ClassArray currently holds no more than size() elements, up to max() elements could be added
240 /** The value of max() is reset to \p newMax thereby setting size() to \p newSize. However, if \p newSize has a value
241 * \c < \c 0 (as the default argument does) size() remains unchanged and max() is set to MIN(size(), newMax). Hence,
242 * calling reMax() without the default arguments, will reduce the memory consumption to a minimum. In no instance
245 * @return reMax returns the difference in bytes of the new and the old memory block, which can be used to update
|