%-*-mode:latex-*-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Copyright (C) 1996-2004 Jason Evans <jasone@canonware.com>.
% All rights reserved.
% 
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions
% are met:
% 1. Redistributions of source code must retain the above copyright
%    notice(s), this list of conditions and the following disclaimer
%    unmodified other than the allowable addition of one or more
%    copyright notices.
% 2. Redistributions in binary form must reproduce the above copyright
%    notice(s), this list of conditions and the following disclaimer in
%    the documentation and/or other materials provided with the
%    distribution.
% 
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
% EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
% PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
% CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
% SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
% BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
% WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
% OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
% EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Version: Onyx 5.1.1
%
% nxo_array portion of Onyx Manual.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{nxo\_array}
\label{nxo_array}
\index{nxo_array@\classname{nxo\_array}{}}

The \classname{nxo\_array} class is a subclass of the \classname{nxo} class.

\subsubsection{API}
\begin{capi}
\label{nxo_array_new}
\index{nxo_array_new@\cfunc{nxo\_array\_new}{}}
\citem{\cfunc[void]{nxo\_array\_new}{cw\_nxo\_t *a\_nxo, bool a\_locking,
uint32\_t a\_len}}
	\begin{capilist}
	\item[Input(s): ]
		\begin{description}\item[]
		\item[a\_nxo: ]
			Pointer to an array \classname{nxo}.
		\item[a\_locking: ]
			Implicit locking mode.
		\item[a\_len: ]
			Number of array elements.
		\end{description}
	\item[Output(s): ] None.
	\item[Exception(s): ]
		\begin{description}\item[]
		\item[\htmlref{CW\_ONYXX\_OOM}{CW_ONYXX_OOM}.]
		\end{description}
	\item[Description: ]
		Constructor.
	\end{capilist}
\label{nxo_array_subarray_new}
\index{nxo_array_subarray_new@\cfunc{nxo\_array\_subarray\_new}{}}
\citem{\cfunc[void]{nxo\_array\_subarray\_new}{cw\_nxo\_t *a\_nxo, cw\_nxo\_t
*a\_array, uint32\_t a\_offset, uint32\_t a\_len}}
	\begin{capilist}
	\item[Input(s): ]
		\begin{description}\item[]
		\item[a\_nxo: ]
			Pointer to an array \classname{nxo}.
		\item[a\_array: ]
			Pointer to an array \classname{nxo} to create a subarray
			of.
		\item[a\_offset: ]
			Offset into \cvar{a\_array}.
		\item[a\_len: ]
			Number of array elements.
		\end{description}
	\item[Output(s): ] None.
	\item[Exception(s): ]
		\begin{description}\item[]
		\item[\htmlref{CW\_ONYXX\_OOM}{CW_ONYXX_OOM}.]
		\end{description}
	\item[Description: ]
		Subarray constructor.
	\end{capilist}
\label{nxo_array_copy}
\index{nxo_array_copy@\cfunc{nxo\_array\_copy}{}}
\citem{\cfunc[void]{nxo\_array\_copy}{cw\_nxo\_t *a\_to, cw\_nxo\_t *a\_from}}
	\begin{capilist}
	\item[Input(s): ]
		\begin{description}\item[]
		\item[a\_to: ]
			Pointer to an array \classname{nxo}.
		\item[a\_from: ]
			Pointer to an array \classname{nxo}.
		\end{description}
	\item[Output(s): ] None.
	\item[Exception(s): ] None.
	\item[Description: ]
		Copy the contents of \cvar{a\_from} to \cvar{a\_to}.  The length
		of \cvar{a\_to} must be at least that of \cvar{a\_from}.
	\end{capilist}
\label{nxo_array_len_get}
\index{nxo_array_len_get@\cfunc{nxo\_array\_len\_get}{}}
\citem{\cfunc[uint32\_t]{nxo\_array\_len\_get}{const cw\_nxo\_t *a\_nxo}}
	\begin{capilist}
	\item[Input(s): ]
		\begin{description}\item[]
		\item[a\_nxo: ]
			Pointer to an array \classname{nxo}.
		\end{description}
	\item[Output(s): ]
		\begin{description}\item[]
		\item[retval: ]
			Number of elements in \cvar{a\_nxo}.
		\end{description}
	\item[Exception(s): ] None.
	\item[Description: ]
		Return the number of elements in \cvar{a\_nxo}.
	\end{capilist}
\label{nxo_array_el_get}
\index{nxo_array_el_get@\cfunc{nxo\_array\_el\_get}{}}
\citem{\cfunc[void]{nxo\_array\_el\_get}{const cw\_nxo\_t *a\_nxo, cw\_nxoi\_t
a\_offset, cw\_nxo\_t *r\_el}}
	\begin{capilist}
	\item[Input(s): ]
		\begin{description}\item[]
		\item[a\_nxo: ]
			Pointer to an array \classname{nxo}.
		\item[a\_offset: ]
			Offset of element to get.
		\item[r\_el: ]
			Pointer to space to dup an object to.
		\end{description}
	\item[Output(s): ]
		\begin{description}\item[]
		\item[*r\_el: ]
			A dup of the element of \cvar{a\_nxo} at offset
			\cvar{a\_offset}.
		\end{description}
	\item[Exception(s): ] None.
	\item[Description: ]
		Get a dup of the element of \cvar{a\_nxo} at offset
		\cvar{a\_offset}.
	\end{capilist}
\label{nxo_array_el_set}
\index{nxo_array_el_set@\cfunc{nxo\_array\_el\_set}{}}
\citem{\cfunc[void]{nxo\_array\_el\_set}{cw\_nxo\_t *a\_nxo, cw\_nxo\_t *a\_el,
cw\_nxoi\_t a\_offset}}
	\begin{capilist}
	\item[Input(s): ]
		\begin{description}\item[]
		\item[a\_nxo: ]
			Pointer to an array \classname{nxo}.
		\item[a\_el: ]
			Pointer to an \classname{nxo}.
		\item[a\_offset: ]
			Offset of element in \cvar{a\_nxo} to replace with
			\cvar{a\_el}.
		\end{description}
	\item[Output(s): ] None.
	\item[Exception(s): ] None.
	\item[Description: ]
		Dup \cvar{a\_el} into the element of \cvar{a\_nxo} at offset
		\cvar{a\_offset}.
	\end{capilist}
\label{nxo_array_origin_get}
\index{nxo_array_origin_get@\cfunc{nxo\_array\_origin\_get}{}}
\citem{\cfunc[bool]{nxo\_array\_origin\_get}{cw\_nxo\_t *a\_nxo,
const char **r\_origin, uint32\_t *r\_olen, uint32\_t
*r\_line\_num}}
	\begin{capilist}
	\item[Input(s): ]
		\begin{description}\item[]
		\item[a\_nxo: ]
			Pointer to an array \classname{nxo}.
		\item[r\_origin: ] Pointer to a string pointer.
		\item[r\_olen: ] Pointer to an unsigned integer.
		\item[r\_line\_num: ] Pointer to an unsigned integer.
		\end{description}
	\item[Output(s): ]
		\begin{description}\item[]
		\item[retval: ] If false, success, otherwise no origin found.
		\item[*r\_origin: ]
			If \cvar{retval} is false, a pointer to a string that
			represents the origin of \cvar{a\_nxo}.
		\item[*r\_olen: ]
			If \cvar{retval} is false, the length of the string
			pointed to by \cvar{*r\_origin}.
		\item[*r\_line\_num: ]
			If \cvar{retval} is false, the line within
			\cvar{*r\_origin} that \cvar{a\_nxo} started at.
		\end{description}
	\item[Exception(s): ] None.
	\item[Description: ]
		Get the origin of \cvar{a\_nxo}, if known.
	\end{capilist}
\label{nxo_array_origin_set}
\index{nxo_array_origin_set@\cfunc{nxo\_array\_origin\_set}{}}
\citem{\cfunc[void]{nxo\_array\_origin\_set}{cw\_nxo\_t *a\_nxo, const
char *a\_origin, uint32\_t a\_olen, uint32\_t a\_line\_num}}
	\begin{capilist}
	\item[Input(s): ]
		\begin{description}\item[]
		\item[a\_nxo: ]
			Pointer to an array \classname{nxo}.
		\item[a\_origin: ]
			Pointer to a string that represents the origin of
			\cvar{a\_nxo}.
		\item[a\_olen: ]
			The length of the string pointed to by\cvar{a\_origin}.
		\item[a\_line\_num: ]
			The line within \cvar{a\_origin} that \cvar{a\_nxo}
			started at.
		\end{description}
	\item[Output(s): ] None.
	\item[Exception(s): ]
		\begin{description}\item[]
		\item[\htmlref{CW\_ONYXX\_OOM}{CW_ONYXX_OOM}.]
		\end{description}
	\item[Description: ]
		Set the origin of \cvar{a\_nxo}.  A copy of \cvar{a\_origin} is
		made and managed internally.
	\end{capilist}
\end{capi}
