next up previous contents index
Next: 4.10.31 nxo_string Up: 4.10 Classes Previous: 4.10.29 nxo_regsub   Contents   Index

Subsections


4.10.30 nxo_stack

The nxo_stack class is a subclass of the nxo class.

4.10.30.1 API

void nxo_stack_new(cw_nxo_t *a_nxo, cw_nx_t *a_nx, cw_bool_t a_locking):

Input(s):
a_nxo:
Pointer to a stack nxo.
a_nx:
Pointer to an nx.
a_locking:
Implicit locking mode.
Output(s):
None.
Exception(s):
CW_ONYXX_OOM.
Description:
Constructor.
void nxo_stack_copy(cw_nxo_t *a_to, cw_nxo_t *a_from):

Input(s):
a_to:
Pointer to a stack nxo.
a_from:
Pointer to a stack nxo.
Output(s):
None.
Exception(s):
CW_ONYXX_OOM.
Description:
Copy the objects in a_from onto a_to.
cw_uint32_t nxo_stack_count(cw_nxo_t *a_nxo):

Input(s):
a_nxo:
Pointer to a stack nxo.
Output(s):
retval:
Number of objects on a_nxo.
Exception(s):
None.
Description:
Return the number of objects on a_nxo.
cw_nxo_t * nxo_stack_push(cw_nxo_t *a_nxo):

Input(s):
a_nxo:
Pointer to a stack nxo.
Output(s):
retval:
Pointer to a no nxo that has been pushed onto a_nxo.
Exception(s):
CW_ONYXX_OOM.
Description:
Push a no nxo onto a_nxo and return a pointer to it.
cw_nxo_t * nxo_stack_bpush(cw_nxo_t *a_nxo):

Input(s):
a_nxo:
Pointer to a stack nxo.
Output(s):
retval:
Pointer to a no nxo that has been pushed onto the bottom of a_nxo.
Exception(s):
CW_ONYXX_OOM.
Description:
Push a no nxo onto the bottom of a_nxo and return a pointer to it.
cw_nxo_t * nxo_stack_under_push(cw_nxo_t *a_nxo, cw_nxo_t *a_object):

Input(s):
a_nxo:
Pointer to a stack nxo.
a_object:
Pointer to an nxo on a_nxo.
Output(s):
retval:
Pointer to a no nxo that has been pushed under a_object on a_nxo.
Exception(s):
CW_ONYXX_OOM.
Description:
Push a no nxo under a_object on a_nxo.
cw_bool_t nxo_stack_pop(cw_nxo_t *a_nxo):

Input(s):
a_nxo:
Pointer to a stack nxo.
Output(s):
retval:
FALSE:
Success.
TRUE:
Stack underflow.
Exception(s):
None.
Description:
Pop an object off of a_nxo.
cw_bool_t nxo_stack_bpop(cw_nxo_t *a_nxo):

Input(s):
a_nxo:
Pointer to a stack nxo.
Output(s):
retval:
FALSE:
Success.
TRUE:
Stack underflow.
Exception(s):
None.
Description:
Pop an object off the bottom of a_nxo.
cw_bool_t nxo_stack_npop(cw_nxo_t *a_nxo, cw_uint32_t a_count):

Input(s):
a_nxo:
Pointer to a stack nxo.
a_count:
Number of objects to pop off of a_nxo.
Output(s):
retval:
FALSE:
Success.
TRUE:
Stack underflow.
Exception(s):
None.
Description:
Pop a_count objects off of a_nxo.
cw_bool_t nxo_stack_nbpop(cw_nxo_t *a_nxo, cw_uint32_t a_count):

Input(s):
a_nxo:
Pointer to a stack nxo.
a_count:
Number of objects to pop off the bottom of a_nxo.
Output(s):
retval:
FALSE:
Success.
TRUE:
Stack underflow.
Exception(s):
None.
Description:
Pop a_count objects off the bottom of a_nxo.
void nxo_stack_remove(cw_nxo_t *a_nxo, cw_nxo_t *a_object):

Input(s):
a_nxo:
Pointer to a stack nxo.
a_object:
Pointer to an object on a_nxo.
Output(s):
None.
Exception(s):
None. Remove a_object from a_nxo.
Description:
cw_nxo_t * nxo_stack_get(const cw_nxo_t *a_nxo):

Input(s):
a_nxo:
Pointer to a stack nxo.
Output(s):
retval:
non-NULL:
Pointer to the top nxo on a_nxo.
NULL:
Stack underflow.
Exception(s):
None.
Description:
Return a pointer to the top nxo on a_nxo.
cw_nxo_t * nxo_stack_bget(const cw_nxo_t *a_nxo):

Input(s):
a_nxo:
Pointer to a stack nxo.
Output(s):
retval:
non-NULL:
Pointer to the bottom nxo on a_nxo.
NULL:
Stack underflow.
Exception(s):
None.
Description:
Return a pointer to the bottom nxo on a_nxo.
cw_nxo_t * nxo_stack_nget(const cw_nxo_t *a_nxo, cw_uint32_t a_index):

Input(s):
a_nxo:
Pointer to a stack nxo.
a_index:
Index of object in a_nxo to return a pointer to.
Output(s):
retval:
non-NULL:
Pointer to the nxo on a_nxo at index a_index.
NULL:
Stack underflow.
Exception(s):
None.
Description:
Return a pointer to the nxo on a_nxo at index a_index.
cw_nxo_t * nxo_stack_nbget(const cw_nxo_t *a_nxo, cw_uint32_t a_index):

Input(s):
a_nxo:
Pointer to a stack nxo.
a_index:
Index, counting from the bottom, of object in a_nxo to return a pointer to.
Output(s):
retval:
non-NULL:
Pointer to the nxo on a_nxo at index a_index, counting from the bottom.
NULL:
Stack underflow.
Exception(s):
None.
Description:
Return a pointer to the nxo on a_nxo at index a_index, counting from the bottom.
cw_nxo_t * nxo_stack_down_get(const cw_nxo_t *a_nxo, cw_nxo_t *a_object):

Input(s):
a_nxo:
Pointer to a stack nxo.
a_object:
Pointer to an object on a_nxo, or NULL for the top object on a_nxo.
Output(s):
retval:
non-NULL:
Pointer to the nxo on a_nxo under a_object.
NULL:
Stack underflow.
Exception(s):
None. Return a pointer to the nxo on a_nxo under a_object.
Description:
cw_nxo_t * nxo_stack_up_get(const cw_nxo_t *a_nxo, cw_nxo_t *a_object):

Input(s):
a_nxo:
Pointer to a stack nxo.
a_object:
Pointer to an object on a_nxo, or NULL for the bottom object on a_nxo.
Output(s):
retval:
non-NULL:
Pointer to the nxo on a_nxo over a_object.
NULL:
Stack underflow.
Exception(s):
None. Return a pointer to the nxo on a_nxo over a_object.
Description:
cw_bool_t nxo_stack_exch(cw_nxo_t *a_nxo):

Input(s):
a_nxo:
Pointer to a stack nxo.
Output(s):
retval:
FALSE:
Success.
TRUE:
Stack underflow.
Exception(s):
None.
Description:
Exchange the top two objects on a_nxo.
void nxo_stack_rot(cw_nxo_t *a_nxo, cw_sint32_t a_amount):

Input(s):
a_nxo:
Pointer to a stack nxo.
a_amount:
Amount to rotate upward. A negative value rotates downward.
Output(s):
None.
Exception(s):
None.
Description:
Rotate a_nxo up by a_amount.
cw_bool_t nxo_stack_roll(cw_nxo_t *a_nxo, cw_uint32_t a_count, cw_sint32_t a_amount):

Input(s):
a_nxo:
Pointer to a stack nxo.
a_count:
Number of objects in roll region.
a_amount:
Amount to roll upward. A negative value rolls downward.
Output(s):
retval:
FALSE:
Success.
TRUE:
Stack underflow.
Exception(s):
None.
Description:
Roll the top a_count objects on a_nxo up by a_amount.


next up previous contents index
Next: 4.10.31 nxo_string Up: 4.10 Classes Previous: 4.10.29 nxo_regsub   Contents   Index
Jason Evans 2003-01-31