next up previous contents index
Next: 4.10.14 nxo_boolean Up: 4.10 Classes Previous: 4.10.12 nxo   Contents   Index

Subsections


4.10.13 nxo_array

The nxo_array class is a subclass of the nxo class.

4.10.13.1 API

void nxo_array_new(cw_nxo_t *a_nxo, bool a_locking, uint32_t a_len):

Input(s):
a_nxo:
Pointer to an array nxo.
a_locking:
Implicit locking mode.
a_len:
Number of array elements.
Output(s):
None.
Exception(s):
CW_ONYXX_OOM.
Description:
Constructor.
void nxo_array_subarray_new(cw_nxo_t *a_nxo, cw_nxo_t *a_array, uint32_t a_offset, uint32_t a_len):

Input(s):
a_nxo:
Pointer to an array nxo.
a_array:
Pointer to an array nxo to create a subarray of.
a_offset:
Offset into a_array.
a_len:
Number of array elements.
Output(s):
None.
Exception(s):
CW_ONYXX_OOM.
Description:
Subarray constructor.
void nxo_array_copy(cw_nxo_t *a_to, cw_nxo_t *a_from):

Input(s):
a_to:
Pointer to an array nxo.
a_from:
Pointer to an array nxo.
Output(s):
None.
Exception(s):
None.
Description:
Copy the contents of a_from to a_to. The length of a_to must be at least that of a_from.
uint32_t nxo_array_len_get(const cw_nxo_t *a_nxo):

Input(s):
a_nxo:
Pointer to an array nxo.
Output(s):
retval:
Number of elements in a_nxo.
Exception(s):
None.
Description:
Return the number of elements in a_nxo.
void nxo_array_el_get(const cw_nxo_t *a_nxo, cw_nxoi_t a_offset, cw_nxo_t *r_el):

Input(s):
a_nxo:
Pointer to an array nxo.
a_offset:
Offset of element to get.
r_el:
Pointer to space to dup an object to.
Output(s):
*r_el:
A dup of the element of a_nxo at offset a_offset.
Exception(s):
None.
Description:
Get a dup of the element of a_nxo at offset a_offset.
void nxo_array_el_set(cw_nxo_t *a_nxo, cw_nxo_t *a_el, cw_nxoi_t a_offset):

Input(s):
a_nxo:
Pointer to an array nxo.
a_el:
Pointer to an nxo.
a_offset:
Offset of element in a_nxo to replace with a_el.
Output(s):
None.
Exception(s):
None.
Description:
Dup a_el into the element of a_nxo at offset a_offset.
bool nxo_array_origin_get(cw_nxo_t *a_nxo, const char **r_origin, uint32_t *r_olen, uint32_t *r_line_num):

Input(s):
a_nxo:
Pointer to an array nxo.
r_origin:
Pointer to a string pointer.
r_olen:
Pointer to an unsigned integer.
r_line_num:
Pointer to an unsigned integer.
Output(s):
retval:
If false, success, otherwise no origin found.
*r_origin:
If retval is false, a pointer to a string that represents the origin of a_nxo.
*r_olen:
If retval is false, the length of the string pointed to by *r_origin.
*r_line_num:
If retval is false, the line within *r_origin that a_nxo started at.
Exception(s):
None.
Description:
Get the origin of a_nxo, if known.
void nxo_array_origin_set(cw_nxo_t *a_nxo, const char *a_origin, uint32_t a_olen, uint32_t a_line_num):

Input(s):
a_nxo:
Pointer to an array nxo.
a_origin:
Pointer to a string that represents the origin of a_nxo.
a_olen:
The length of the string pointed to bya_origin.
a_line_num:
The line within a_origin that a_nxo started at.
Output(s):
None.
Exception(s):
CW_ONYXX_OOM.
Description:
Set the origin of a_nxo. A copy of a_origin is made and managed internally.


next up previous contents index
Next: 4.10.14 nxo_boolean Up: 4.10 Classes Previous: 4.10.12 nxo   Contents   Index
Jason Evans 2005-03-16