BFLibCPP 0.1
CPP Library
|
#include <array.hpp>
Public Member Functions | |
Array () | |
Array (T *array, S size) | |
Array (std::initializer_list< T > list) | |
virtual | ~Array () |
void | removeAll () |
void | set (T *array, S size) |
void | set (std::initializer_list< T > list) |
void | setAllocationCallback (T *(*cb)(S size)) |
void | setDeallocationCallback (void(*cb)(T *value)) |
virtual bool | contains (T object) |
T | objectAtIndex (S index) const |
S | indexForObject (T object) const |
virtual S | count () const |
Returns _count. | |
virtual void | print () |
void | setComparator (int(*callback)(T a, T b)) |
void | setReleaseCallback (void(*callback)(T obj)) |
void | copyFromArray (const Array< T > *arr) |
int | add (T obj) |
int | insertObjectAtIndex (T obj, S index) |
int | removeObjectAtIndex (S index) |
T | operator[] (S index) const |
void | operator= (const std::initializer_list< T > &list) |
Array< T > & | operator= (const Array< T > &arr) |
![]() | |
Object () | |
Object (Object &obj) | |
virtual | ~Object () |
Static Public Member Functions | |
static int | comparisonDefault (T a, T b) |
![]() | |
static void | retain (Object *obj) |
static void | release (Object *obj) |
static int | retainCount (Object *obj) |
static int | retainCount (Object &obj) |
Protected Member Functions | |
T * | address () const |
Mutable Array
This class allows you to access the array. This class is meant to provide you the basic functionality of an array class
Objects stored in array are assumed to be owned by owner of array object
|
inline |
|
inline |
Initializes with array
|
inline |
Initializes with initializer
|
inline |
Adds object at the end of the array
|
inlineprotected |
Returns address of array
|
inlinestatic |
Compares the raw value of a and b
|
inlinevirtual |
Returns false if argument could not be found
This function uses the _callback comparison function to compare each function
|
inline |
Copies content from arr to us
|
inlinevirtual |
Returns _count.
|
inline |
Returns the value's index. If we could not find it, -1 will be returned
This will return the first match
|
inline |
|
inline |
Returns null if argument could not be found
|
inline |
Copies the string content from arr to us
|
inline |
|
inline |
|
inlinevirtual |
Prints the array from the first element to the last
|
inline |
|
inline |
removes object at index
this dynamically adjusts the memory
|
inline |
Initializes with initializer
|
inline |
Initializes with array
|
inline |
Establishes how allocation works
By default free store is utilized
|
inline |
Rename comparator to compare callback
|
inline |
Establishes how deallocation works
By default free store is utilized
|
inline |
sets release callback