IBM Visualization Data Explorer Programmer's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]

DXCreateArrayHandle

Function

Creates a "handle" to allow convenient access to the items in any Array class.

Syntax

#include <dx/dx.h>


ArrayHandle DXCreateArrayHandle(Array array)

Functional Details

There are three different approaches for writing functions that support all of the defined Array classes:

  1. Use DXGetArrayClass to determine the specific Array class, and then use the class-specific functions (e.g., DXGetConstantArrayData). The advantage of this approach is it uses the most efficient method to access the data stored in the Array. The disadvantage is that you need to write different code for each Array class.

  2. Use DXGetArrayData on all Arrays. The advantage here is the simplicity; the disadvantage is that DXGetArrayData expands compact data, greatly increasing memory use.

  3. Use the Array handling routines. The advantage is that they work on Arrays of any class without expanding the compact data; the disadvantage, that they are slightly less efficient for some Array classes.

    The ArrayHandle created should be deleted with DXFreeArrayHandle when the user no longer needs it. See 4.2 , "Memory Management".

Return Value

Returns an Array Handle or returns NULL and sets an error code.

See Also

DXFreeArrayHandle, DXGetArrayEntry, DXGetArrayEntries, DXIterateArray

"Array Handling".


[ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
[Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

[Data Explorer Home Page]


[IBM Home Page | Order | Search | Contact IBM | Legal ]