Enumeration Errors
C Reference

## Typedefs

typedef struct XnModuleError * | XnEnumerationErrorsIterator
typedef struct XnEnumerationErrors | XnEnumerationErrors

## Functions

XN_C_API XnStatus XN_C_DECL | xnEnumerationErrorsAllocate (XnEnumerationErrors **ppErrors)
XN_C_API void XN_C_DECL | xnEnumerationErrorsFree (const XnEnumerationErrors *pErrors)
XN_C_API XnStatus XN_C_DECL | xnEnumerationErrorsAdd (XnEnumerationErrors *pErrors, const XnProductionNodeDescription *pDesc, XnStatus nError)
XN_C_API XnStatus XN_C_DECL | xnEnumerationErrorsToString (const XnEnumerationErrors *pErrors, XnChar *csBuffer, XnUInt32 nSize)
XN_C_API XnStatus XN_C_DECL | xnEnumerationErrorsClear (XnEnumerationErrors *pErrors)
XN_C_API XnEnumerationErrorsIterator XN_C_DECL | xnEnumerationErrorsGetFirst (const XnEnumerationErrors *pErrors)
XN_C_API XnEnumerationErrorsIterator XN_C_DECL | xnEnumerationErrorsGetNext (XnEnumerationErrorsIterator it)
XN_C_API XnBool XN_C_DECL | xnEnumerationErrorsIteratorIsValid (XnEnumerationErrorsIterator it)
XN_C_API const XnProductionNodeDescription *XN_C_DECL | xnEnumerationErrorsGetCurrentDescription (XnEnumerationErrorsIterator it)
XN_C_API XnStatus XN_C_DECL | xnEnumerationErrorsGetCurrentError (XnEnumerationErrorsIterator it)

## Detailed Description

This page details functions for managing an Enumeration Errors object.

# Enumeration

The following code iterates over an enumeration errors object:

for (XnEnumerationErrorsIterator it = xnEnumerationErrorsGetFirst(pList);
xnEnumerationErrorsIteratorIsValid(it);
it = xnEnumerationErrorsGetNext(it))
{
const XnProductionNodeDescription* pCurrDesc = xnEnumerationErrorsGetCurrentDescription(it);
XnStatus nCurrError = xnEnumerationErrorsGetCurrentError(it);
...
}
XnStatus
XnUInt32 XnStatus
Definition XnStatus.h:34
xnEnumerationErrorsGetNext
XN_C_API XnEnumerationErrorsIterator XN_C_DECL xnEnumerationErrorsGetNext(XnEnumerationErrorsIterator it)
XnEnumerationErrorsIterator
struct XnModuleError * XnEnumerationErrorsIterator
Definition XnEnumerationErrors.h:57
xnEnumerationErrorsIteratorIsValid
XN_C_API XnBool XN_C_DECL xnEnumerationErrorsIteratorIsValid(XnEnumerationErrorsIterator it)
xnEnumerationErrorsGetCurrentError
XN_C_API XnStatus XN_C_DECL xnEnumerationErrorsGetCurrentError(XnEnumerationErrorsIterator it)
xnEnumerationErrorsGetFirst
XN_C_API XnEnumerationErrorsIterator XN_C_DECL xnEnumerationErrorsGetFirst(const XnEnumerationErrors *pErrors)
xnEnumerationErrorsGetCurrentDescription
XN_C_API const XnProductionNodeDescription *XN_C_DECL xnEnumerationErrorsGetCurrentDescription(XnEnumerationErrorsIterator it)
XnProductionNodeDescription
Definition XnTypes.h:163

## Typedef Documentation

## XnEnumerationErrors

typedef struct XnEnumerationErrors XnEnumerationErrors

An object that holds errors during an enumeration process.

## XnEnumerationErrorsIterator

typedef struct XnModuleError* XnEnumerationErrorsIterator

Represents an iterator for an XnEnumerationErrors object.

## Function Documentation

## xnEnumerationErrorsAdd()

XN_C_API XnStatus XN_C_DECL xnEnumerationErrorsAdd | ( | XnEnumerationErrors * | pErrors,
|  | const XnProductionNodeDescription * | pDesc,
|  | XnStatus | nError )

Adds an error to the object.

Parameters

  pErrors | [in] Enumeration Errors object.
  pDesc | [in] Description of the failing module.
  nError | [in] The enumeration error that occurred.

## xnEnumerationErrorsAllocate()

XN_C_API XnStatus XN_C_DECL xnEnumerationErrorsAllocate | ( | XnEnumerationErrors ** | ppErrors | ) |

Allocates an enumeration errors object.

Parameters

  ppErrors | [out] The allocated object

## xnEnumerationErrorsClear()

XN_C_API XnStatus XN_C_DECL xnEnumerationErrorsClear | ( | XnEnumerationErrors * | pErrors | ) |

Clears an Enumeration Errors object from all errors in it.

Parameters

  pErrors | [in] Enumeration Errors object.

## xnEnumerationErrorsFree()

XN_C_API void XN_C_DECL xnEnumerationErrorsFree | ( | const XnEnumerationErrors * | pErrors | ) |

Frees an enumeration errors object

Parameters

  pErrors | [in] Parameter description

## xnEnumerationErrorsGetCurrentDescription()

XN_C_API const XnProductionNodeDescription *XN_C_DECL xnEnumerationErrorsGetCurrentDescription | ( | XnEnumerationErrorsIterator | it | ) |

Gets the description of the node from current error.

Parameters

  it | [in] The iterator to the error.

## xnEnumerationErrorsGetCurrentError()

XN_C_API XnStatus XN_C_DECL xnEnumerationErrorsGetCurrentError | ( | XnEnumerationErrorsIterator | it | ) |

Gets the enumeration error caused when enumerating the node.

Parameters

  it | [in] The iterator to the error.

## xnEnumerationErrorsGetFirst()

XN_C_API XnEnumerationErrorsIterator XN_C_DECL xnEnumerationErrorsGetFirst | ( | const XnEnumerationErrors * | pErrors | ) |

Gets an iterator to the first error in the object.

Parameters

  pErrors | [in] Enumeration Errors object.

## xnEnumerationErrorsGetNext()

XN_C_API XnEnumerationErrorsIterator XN_C_DECL xnEnumerationErrorsGetNext | ( | XnEnumerationErrorsIterator | it | ) |

Gets an iterator to the next error in the object.

Parameters

  it | [in] An iterator to an error in the object.

## xnEnumerationErrorsIteratorIsValid()

XN_C_API XnBool XN_C_DECL xnEnumerationErrorsIteratorIsValid | ( | XnEnumerationErrorsIterator | it | ) |

Checks if an iterator is valid (i.e. points to a real error)

Parameters

  it | [in] The iterator to check.

## xnEnumerationErrorsToString()

XN_C_API XnStatus XN_C_DECL xnEnumerationErrorsToString | ( | const XnEnumerationErrors * | pErrors,
|  | XnChar * | csBuffer,
|  | XnUInt32 | nSize )

Returns a string representation of the Enumeration Errors object.

Parameters

  pErrors | [in] Enumeration Errors object.
  csBuffer | [in] A char buffer to be filled.
  nSize | [in] Size of the char buffer.