Table of Contents

Search

  1. Preface
  2. Part 1: On-Prem Operations
  3. Part 2: Parameter and Element Reference
  4. Appendix A: Geocode Countries
  5. Appendix B: Reverse Geocoding Coverage
  6. Appendix C: Certified Mode Values

On-Premises Developer Guide

On-Premises Developer Guide

Retrieving Array Sizes

Retrieving Array Sizes

The IDVE_GetArraySize() function identifies the current size of an array in a JSON document. The function returns the size in integer format and can be used with URI strings that point to JSON arrays. For example, you can call IDVE_GetArraySize() on the URI "State/FileSets/FileSetA" to find out how many data files the engine has loaded from the FileSetA directory.

Example: The IDVE_GetArraySize() function

The following sample code shows the structure of the IDVE_GetArraySize() function:
IDVE_EXPORTCALL1 IDVE_StatusCode IDVE_EXPORTCALL2
IDVE_GetArraySize
( const char* const kpksCustomerID, const char* const kpksURI, IDVE_U64* const kpu64NumItems, IDVE_Bool* const kpbIsValuePresent, char* const kpsExtStatusMsg );
The following table shows the parameter definitions for the IDVE_GetArraySize() function:
Parameter
Operation
Comment
const char* const kpksCustomerID
[in]
Pointer to the zero-terminated 7-bit ASCII-encoded customer ID. The value might not be NULL.
const char* const kpksURI
[in]
Pointer to the zero-terminated 7-bit ASCII URI, for example "
AV/v1/Jobs/###/IO/Outputs/0/Results
". The value might not be NULL.
IDVE_U64* const kpu64NumItems
[out]
Pointer to an unsigned 64-bit integer value that receives the value of the output. The value might not be NULL.
IDVE_Bool* const kpbIsValuePresent
[out]
If you provide a valid pointer for kpbIsValuePresent, the function will indicate if the value at the given URI is present by setting kpbIsValuePresent to true or false.
If you provide NULL for kpbIsValuePresent and the array size that you want to retrieve does not exist, the function call will report an error. If you provide NULL for kpbIsValuePresent and the array size exists, it is retrieved normally.
char* const kpsExtStatusMsg
[out]
Pointer to a buffer of size IDVE_EXT_STATUS_MSG_BUFFER_SIZE for an optional extended status message. The value can be NULL.

0 COMMENTS

We’d like to hear from you!