The header file of AddArray class. More...
#include <AddArray.h>
Related Functions | |
(Note that these are not member functions.) | |
AddArray_ptr | AddArray_create (int number) |
constructor. Create an array of "number" ADDs | |
AddArray_ptr | AddArray_duplicate (AddArray_ptr self) |
create a new AddArray, a copy of a given one | |
add_ptr | AddArray_get_add (AddArray_ptr self) |
This function returns the first element of the array. | |
size_t | AddArray_get_add_size (const AddArray_ptr self, DDMgr_ptr dd) |
Returns the sum of the sizes of the ADDs within self. | |
array_t * | AddArray_get_array (AddArray_ptr self) |
Returns the AddArray represented as an array of ADDs. | |
add_ptr | AddArray_get_n (AddArray_ptr self, int number) |
Returns the element number "n" from the array. | |
int | AddArray_get_size (AddArray_ptr self) |
returns the size (number of elements) of the array | |
void | AddArray_set_n (AddArray_ptr self, int number, add_ptr add) |
Sets the element number "number" to "add". |
The header file of AddArray class.
NB: some construction and destruction of AddArray can reference or de-reference its ADDs. Take care about it.
AddArray type
AddArray_ptr AddArray_create | ( | int | number | ) | [related] |
constructor. Create an array of "number" ADDs
number must be positive. The index of the array goes from 0 to (number - 1).
AddArray_ptr AddArray_duplicate | ( | AddArray_ptr | self | ) | [related] |
create a new AddArray, a copy of a given one
During duplication all ADD will be referenced.
add_ptr AddArray_get_add | ( | AddArray_ptr | self | ) | [related] |
This function returns the first element of the array.
The array should contain exactly one element
size_t AddArray_get_add_size | ( | const AddArray_ptr | self, | |
DDMgr_ptr | dd | |||
) | [related] |
Returns the sum of the sizes of the ADDs within self.
array_t * AddArray_get_array | ( | AddArray_ptr | self | ) | [related] |
Returns the AddArray represented as an array of ADDs.
Do not change the returned array, which belongs to self
add_ptr AddArray_get_n | ( | AddArray_ptr | self, | |
int | number | |||
) | [related] |
Returns the element number "n" from the array.
"n" can be from 0 to (size-1). The returned ADD is NOT referenced.
int AddArray_get_size | ( | AddArray_ptr | self | ) | [related] |
returns the size (number of elements) of the array
void AddArray_set_n | ( | AddArray_ptr | self, | |
int | number, | |||
add_ptr | add | |||
) | [related] |
Sets the element number "number" to "add".
The given ADD "add" must already be referenced. The previous value should already be de-referenced if it is necessary.