NhlRLGetArray

NhlRLGetArray, NhlRLGetIntegerArray, NhlRLGetFloatArray, NhlRLGetDoubleArray, NhlRLGetStringArray

The Fortran names of these functions are NhlFRLGetIntegerArray, NhlFRLGetFloatArray, NhlFRLGetDoubleArray, NhlFRLGetStringArray. There is no Fortran binding for NhlRLGetArray.

Used to add the given name and val_addr to the ResList.


C synopsis

#include <ncarg/hlu/hlu.h>

NhlErrorTypes NhlRLGetArray(
		int		list_id,
		NhlString	resname,
		NhlPointer	*data_addr,
		NhlString	*type_element,
		unsigned int	*size_element,
		int		*num_elements
		)

NhlErrorTypes NhlRLGetIntegerArray(
		int		list_id,
		NhlString	resname,
		int		**data_addr,
		int		*num_elements
		)

NhlErrorTypes NhlRLGetFloatArray(
		int		list_id,
		NhlString	resname,
		float		**data_addr,
		int		*num_elements
		)

NhlErrorTypes NhlRLGetDoubleArray(
		int		list_id,
		NhlString	resname,
		double		**data_addr,
		int		*num_elements
		)

NhlErrorTypes NhlRLGetStringArray(
		int		list_id,
		NhlString	resname,
		NhlString	**data_addr,
		int		*num_elements
		)

Fortran synopsis

      subroutine NhlFRLGetIntegerArray(list_id, resname, iarray, 
     +                                 num_elements, ierr)
      integer list_id, iarray(num_elements), num_elements, ierr
      character*(*) resname

      subroutine NhlFRLGetFloatArray(list_id, resname, rarray,
     +                               num_elements, ierr)
      integer list_id, num_elements, ierr
      real rarray(num_elements)
      character*(*) resname

      subroutine NhlFRLGetDoubleArray(list_id, resname, darray,
     +                               num_elements, ierr)
      integer list_id, num_elements, ierr
      double precision darray(num_elements)
      character*(*) resname

      subroutine NhlFRLGetStringArray(list_id, resname, sarray,
     +                                num_elements, ierr)
      integer list_id, num_elements, ierr
      character*(*) resname, sarray(num_elements)

Arguments

list_id (input)
Id of the ResList to retrieve the name/val_addr pair from.
resname (input)
Specifies the resource name to retrieve the value of.
data_addr (output, C only)
Specifies the address of the pointer to the array retrieved from the resname resource when the ResList is applied to an HLU object using the NhlGetValues function. The programmers are responsible for freeing this array when they finish with it.
type_element (output, C only)
Returns the name of the type of each element in the data array. This parameter must be a valid pointer to an NhlString. The NhlString will be assigned during the call to NhlGetValues, and the programmer is responsible for freeing the NhlString.
size_element (output, C only)
Returns the size, in bytes, of each element in the data array. This parameter must be a valid pointer to an unsigned integer.
num_elements (input)
Returns the number of elements in the data array. For a C program, this parameter must be a valid pointer to an integer. For a Fortran program, this parameter must contain the number of elements in the data array as it is declared in the program.
iarray (output, Fortran only)
The integer array retrieved from the resname resource when the list is applied to an HLU object using the NhlFGetValues function.
rarray (output, Fortran only)
The real array retrieved from the resname resource when the list is applied to an HLU object using the NhlFGetValues function.
darray (output, Fortran only)
The double precision array retrieved from the resname resource when the list is applied to an HLU object using the NhlFGetValues function.
sarray (output, Fortran only)
The string array retrieved from the resname resource when the list is applied to an HLU object using the NhlFGetValues function.
ierr (output, Fortran only)
Error code.

Types

Type name:		NhlTErrorTypes
Definition:
typedef enum _NhlErrType{
	NhlFATAL	= -4,	/* "FATAL"	*/
	NhlWARNING	= -3,	/* "WARNING"	*/
	NhlINFO		= -2,	/* "INFO"	*/
	NhlNOERROR	= -1	/* "NOERROR"	*/
} NhlErrorTypes;

Description

These functions can only be used on a NhlGETRL ResList. They are used to retrieve name/data_addr pairs from the ResList that will be passed to the NhlGetValues function. These functions need to be used to retrieve an array resource from an HLU object. The programmer is responsible for freeing the memory returned to the data_addr and type_element parameters after the call to NhlGetValues.

Return values

The C functions return a value of type NhlErrorTypes, and the Fortran subroutines return the error value in ierr. If they are unable to retrieve the name/value pair to the list, they will return NhlFATAL; otherwise they will return NhlNOERROR.

See also


Copyright

Copyright 1987-1999 University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.

NCAR Graphics is a registered trademark of the University Corporation for Atmospheric Research.

Reference Manual Control Panel

NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?


$Revision: 1.15 $ $Date: 1998/06/15 21:26:26 $