Next: 4.10.19 nxo_integer Up: 4.10 Classes Previous: 4.10.17 nxo_fino Contents Index
Subsections

- 4.10.18.1 API

##
4.10.18 nxo_hook

The nxo_hook class is a subclass of the nxo class.

### 4.10.18.1 API

void cw_nxo_hook_eval_t(void *a_data, cw_nxo_t *a_thread):

  Input(s):
    a_data:
      Opaque data pointer.
    a_thread:
      Pointer to a thread nxo.
  Output(s):
    None.
  Exception(s):
    Hook-dependent.
  Description:
    Evaluation function typedef.

cw_nxoe_t * cw_nxo_hook_ref_iter_t(void *a_data, cw_bool_t a_reset):

  Input(s):
    a_data:
      Opaque data pointer.
    a_reset:
      FALSE:
        At least one iteration has already occurred.
      TRUE:
        First iteration.
  Output(s):
    retval:
      non-NULL:
        Pointer to an nxoe.
      NULL:
        No more references.
  Exception(s):
    None.
  Description:
    Reference iterator function typedef.

cw_bool_t cw_nxo_hook_delete_t(void *a_data, cw_nx_t *a_nx, cw_uint32_t a_iter):

  Input(s):
    a_data:
      Opaque data pointer.
    a_nx:
      Pointer to an nx.
    a_iter:
      Garbage collector sweep iteration count (starts at 0). This value can be used to impose ordering of dependent object deletions.
  Output(s):
    retval:
      FALSE:
        Success.
      TRUE:
        Defer deletion until a later garbage collector sweep iteration.
  Exception(s):
    None.
  Description:
    Destructor function typedef.

void nxo_hook_new(cw_nxo_t *a_nxo, cw_nx_t *a_nx, void *a_data, cw_nxo_hook_eval_t *a_eval_f, cw_nxo_hook_ref_iter_t *a_ref_iter_f, cw_nxo_hook_delete_t *a_delete_f):

  Input(s):
    a_nxo:
      Pointer to a hook nxo.
    a_nx:
      Pointer to an nx.
    a_data:
      Opaque data pointer to be passed to a_eval_f, a_ref_iter_f, and a_delete_f.
    a_eval_f:
      Pointer to an evaluation function.
    a_ref_iter_f:
      Pointer to a reference iterator function.
    a_delete_f:
      Pointer to a destructor function.
  Output(s):
    None.
  Exception(s):
    CW_ONYXX_OOM.
  Description:
    Constructor.

cw_nxo_t * nxo_hook_tag_get(const cw_nxo_t *a_nxo):

  Input(s):
    a_nxo:
      Pointer to a hook nxo.
  Output(s):
    retval:
      Pointer to the tag object associated with a_nxo.
  Exception(s):
    None.
  Description:
    Return a pointer to the tag object associated with a_nxo. This object pointer can safely be used for modifying the tag object.

void * nxo_hook_data_get(const cw_nxo_t *a_nxo):

  Input(s):
    a_nxo:
      Pointer to a hook nxo.
  Output(s):
    retval:
      Opaque data pointer.
  Exception(s):
    None.
  Description:
    Return the opaque data pointer associated with a_nxo.

void nxo_hook_data_set(cw_nxo_t *a_nxo, void *a_data):

  Input(s):
    a_nxo:
      Pointer to a hook nxo.
    a_data:
      Opaque data pointer.
  Output(s):
    None.
  Exception(s):
    None.
  Description:
    Set the opaque data pointer associated with a_nxo.

void nxo_hook_eval(cw_nxo_t *a_nxo, cw_nxo_t *a_thread):

  Input(s):
    a_nxo:
      Pointer to a hook nxo.
    a_thread:
      Pointer to a thread nxo.
  Output(s):
    None.
  Exception(s):
    Hook-specific.
  Description:
    Evaluate the a_nxo. If there is no evaluation function associated with a_nxo, it is pushed onto ostack.

Next: 4.10.19 nxo_integer Up: 4.10 Classes Previous: 4.10.17 nxo_fino Contents Index