Next: 4.10.34 nxo_string
Up: 4.10 Classes
Previous: 4.10.32 nxo_regsub
Contents
Index
Subsections
4.10.33 nxo_stack
The nxo_stack class is a subclass of the nxo class.
void nxo_stack_new(cw_nxo_t *a_nxo, bool
a_locking, uint32_t a_mincount):
- Input(s):
-
- a_nxo:
- Pointer to a stack nxo.
- a_locking:
- Implicit locking mode.
- a_mincount:
- Minimum size to allow the internal array to shrink to.
- 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.
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.
bool 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.
bool 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.
bool nxo_stack_npop(cw_nxo_t *a_nxo, 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.
bool nxo_stack_nbpop(cw_nxo_t *a_nxo, 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.
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,
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,
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.
bool 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, int32_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.
bool nxo_stack_roll(cw_nxo_t *a_nxo, uint32_t
a_count, int32_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: 4.10.34 nxo_string
Up: 4.10 Classes
Previous: 4.10.32 nxo_regsub
Contents
Index
Jason Evans
2005-03-16