NAME

cxConnectionAlloc, cxConnectionConnectionsArrayGet, cxConnectionConnectionsArrayLen, cxConnectionConnectionsArrayRem, cxConnectionConnectionsArraySet, cxConnectionConnectionsLengthGet, cxConnectionConnectionsLengthSet, cxConnectionCopy, cxConnectionDup, cxConnectionElementsArrayGet, cxConnectionElementsArrayLen, cxConnectionElementsArrayRem, cxConnectionElementsArraySet, cxConnectionElementsLengthGet, cxConnectionElementsLengthSet, cxConnectionNumElementsGet, cxConnectionNumElementsSet, cxConnectionRead, cxConnectionWrite, cxPyramidAlloc, cxPyramidBaseLatticeGet, cxPyramidBaseLatticeSet, cxPyramidCompressionIndexAlloc, cxPyramidCompressionIndexGet, cxPyramidCompressionIndexLen, cxPyramidCompressionIndexRem, cxPyramidCompressionIndexSet, cxPyramidCompressionIndexType, cxPyramidCompressionTypeGet, cxPyramidCompressionTypeSet, cxPyramidCopy, cxPyramidDictionaryAlloc, cxPyramidDictionaryCopy, cxPyramidDictionaryDup, cxPyramidDictionaryGet, cxPyramidDictionaryNumDimsGet, cxPyramidDictionaryNumDimsSet, cxPyramidDictionaryNumEntriesGet, cxPyramidDictionaryNumEntriesSet, cxPyramidDictionaryRead, cxPyramidDictionarySet, cxPyramidDictionaryTableGet, cxPyramidDictionaryTableLen, cxPyramidDictionaryTableRem, cxPyramidDictionaryTableSet, cxPyramidDictionaryWrite, cxPyramidDup, cxPyramidLayerConnectionGet, cxPyramidLayerConnectionSet, cxPyramidLayerLatticeGet, cxPyramidLayerLatticeSet, cxPyramidNumLevelsGet, cxPyramidNumLevelsSet, cxPyramidNumberIndicesGet, cxPyramidNumberIndicesSet, cxPyramidRead, cxPyramidWrite, cxPyramidlayerLen, cxPyramidlayerRem

interface routines for IRIS Explorer cxPyramid data structure

#include <cx/cxPyramid.api.h>
#ifndef __cxPyramid_API_H_
#define __cxPyramid_API_H_

#ifdef __cplusplus
 extern "C" {
#endif

#include <stdio.h>
#if defined(__sun) || defined(WIN32)
 cxConnection* cxConnectionAlloc( signed long ElementsLength, signed long ConnectionsLength );
 signed long* cxConnectionConnectionsArrayGet( cxConnection *src, cxErrorCode *ec );
 long cxConnectionConnectionsArrayLen( cxConnection *src, cxErrorCode *ec );
 void cxConnectionConnectionsArrayRem( cxConnection *src, signed long* *val, cxErrorCode *ec );
 void cxConnectionConnectionsArraySet( cxConnection *src, signed long* val, cxErrorCode *ec );
 signed long cxConnectionConnectionsLengthGet( cxConnection *src, cxErrorCode *ec );
 void cxConnectionConnectionsLengthSet( cxConnection *src, signed long val, cxErrorCode *ec );
 cxConnection* cxConnectionCopy( cxConnection *src );
 cxConnection* cxConnectionDup( cxConnection *src );
 signed long* cxConnectionElementsArrayGet( cxConnection *src, cxErrorCode *ec );
 long cxConnectionElementsArrayLen( cxConnection *src, cxErrorCode *ec );
 void cxConnectionElementsArrayRem( cxConnection *src, signed long* *val, cxErrorCode *ec );
 void cxConnectionElementsArraySet( cxConnection *src, signed long* val, cxErrorCode *ec );
 signed long cxConnectionElementsLengthGet( cxConnection *src, cxErrorCode *ec );
 void cxConnectionElementsLengthSet( cxConnection *src, signed long val, cxErrorCode *ec );
 signed long cxConnectionNumElementsGet( cxConnection *src, cxErrorCode *ec );
 void cxConnectionNumElementsSet( cxConnection *src, signed long val, cxErrorCode *ec );
 cxConnection* cxConnectionRead( FILE *fd );
 void cxConnectionWrite( FILE *fd, int mode, cxConnection *src );
 cxPyramid* cxPyramidAlloc( signed long NumLevels, cxCompressType CompressionType,
 signed long NumberIndices );
 cxLattice* cxPyramidBaseLatticeGet( cxPyramid *src, cxErrorCode *ec );
 void cxPyramidBaseLatticeSet( cxPyramid *src, cxLattice* val, cxErrorCode *ec );
 void* cxPyramidCompressionIndexAlloc( cxPyramid *src );
 void* cxPyramidCompressionIndexGet( cxPyramid *src, cxErrorCode *ec );
 long cxPyramidCompressionIndexLen( cxPyramid *src, cxErrorCode *ec );
 void cxPyramidCompressionIndexRem( cxPyramid *src, void *val, cxErrorCode *ec );
 void cxPyramidCompressionIndexSet( cxPyramid *src, void *member, cxErrorCode *ec );
 cxPrimType cxPyramidCompressionIndexType( cxPyramid *src, cxErrorCode *ec );
 cxCompressType cxPyramidCompressionTypeGet( cxPyramid *src, cxErrorCode *ec );
 void cxPyramidCompressionTypeSet( cxPyramid *src, cxCompressType val, cxErrorCode *ec );
 cxPyramid* cxPyramidCopy( cxPyramid *src );
 cxPyramidDictionary* cxPyramidDictionaryAlloc( signed long NumEntries );
 cxPyramidDictionary* cxPyramidDictionaryCopy( cxPyramidDictionary *src );
 cxPyramidDictionary* cxPyramidDictionaryDup( cxPyramidDictionary *src );
 cxPyramidDictionary* cxPyramidDictionaryGet( cxPyramid *src, cxErrorCode *ec );
 signed long cxPyramidDictionaryNumDimsGet( cxPyramidDictionary *src, cxErrorCode *ec );
 void cxPyramidDictionaryNumDimsSet( cxPyramidDictionary *src, signed long val, cxErrorCode *ec );
 signed long cxPyramidDictionaryNumEntriesGet( cxPyramidDictionary *src, cxErrorCode *ec );
 void cxPyramidDictionaryNumEntriesSet( cxPyramidDictionary *src, signed long val, cxErrorCode *ec );
 cxPyramidDictionary* cxPyramidDictionaryRead( FILE *fd );
 void cxPyramidDictionarySet( cxPyramid *src, cxPyramidDictionary* val, cxErrorCode *ec );
 cxPyramid** cxPyramidDictionaryTableGet( cxPyramidDictionary *src, cxErrorCode *ec );
 long cxPyramidDictionaryTableLen( cxPyramidDictionary *src, cxErrorCode *ec );
 void cxPyramidDictionaryTableRem( cxPyramidDictionary *src, cxPyramid** *val, cxErrorCode *ec );
 void cxPyramidDictionaryTableSet( cxPyramidDictionary *src, cxPyramid** val, cxErrorCode *ec );
 void cxPyramidDictionaryWrite( FILE *fd, int mode, cxPyramidDictionary *src );
 cxPyramid* cxPyramidDup( cxPyramid *src );
 cxConnection* cxPyramidLayerConnectionGet( cxPyramid *src, long layerInd, cxErrorCode *ec );
 void cxPyramidLayerConnectionSet( cxPyramid *src, cxConnection* val, long layerInd, cxErrorCode *ec );
 cxLattice* cxPyramidLayerLatticeGet( cxPyramid *src, long layerInd, cxErrorCode *ec );
 void cxPyramidLayerLatticeSet( cxPyramid *src, cxLattice* val, long layerInd, cxErrorCode *ec );
 signed long cxPyramidNumLevelsGet( cxPyramid *src, cxErrorCode *ec );
 void cxPyramidNumLevelsSet( cxPyramid *src, signed long val, cxErrorCode *ec );
 signed long cxPyramidNumberIndicesGet( cxPyramid *src, cxErrorCode *ec );
 void cxPyramidNumberIndicesSet( cxPyramid *src, signed long val, cxErrorCode *ec );
 cxPyramid* cxPyramidRead( FILE *fd );
 void cxPyramidWrite( FILE *fd, int mode, cxPyramid *src );
 long cxPyramidlayerLen( cxPyramid *src, cxErrorCode *ec );
 void cxPyramidlayerRem( cxPyramid *src, cxPyramidLayer* *val, cxErrorCode *ec );
#ifndef __cxPyramid_API_H_
#define __cxPyramid_API_H_

#ifdef __cplusplus
 extern "C" {
#endif

#include <stdio.h>
#if defined(__sun) || defined(WIN32)
 integer function cxConnectionAlloc( ElementsLength, ConnectionsLength )
 integer function cxConnectionConnectionsArrayGet( src, ec )
 integer function cxConnectionConnectionsArrayLen( src, ec )
 subroutine cxConnectionConnectionsArrayRem( src, val, ec )
 subroutine cxConnectionConnectionsArraySet( src, val, ec )
 integer function cxConnectionConnectionsLengthGet( src, ec )
 subroutine cxConnectionConnectionsLengthSet( src, val, ec )
 integer function cxConnectionCopy( src )
 integer function cxConnectionDup( src )
 integer function cxConnectionElementsArrayGet( src, ec )
 integer function cxConnectionElementsArrayLen( src, ec )
 subroutine cxConnectionElementsArrayRem( src, val, ec )
 subroutine cxConnectionElementsArraySet( src, val, ec )
 integer function cxConnectionElementsLengthGet( src, ec )
 subroutine cxConnectionElementsLengthSet( src, val, ec )
 integer function cxConnectionNumElementsGet( src, ec )
 subroutine cxConnectionNumElementsSet( src, val, ec )
 integer function cxConnectionRead( fd )
 subroutine cxConnectionWrite( fd, mode, src )
 integer function cxPyramidAlloc( NumLevels, CompressionType, NumberIndices )
 integer function cxPyramidBaseLatticeGet( src, ec )
 subroutine cxPyramidBaseLatticeSet( src, val, ec )
 integer function cxPyramidCompressionIndexAlloc( src )
 integer function cxPyramidCompressionIndexGet( src, ec )
 integer function cxPyramidCompressionIndexLen( src, ec )
 subroutine cxPyramidCompressionIndexRem( src, val, ec )
 subroutine cxPyramidCompressionIndexSet( src, member, ec )
 integer function cxPyramidCompressionIndexType( src, ec )
 integer function cxPyramidCompressionTypeGet( src, ec )
 subroutine cxPyramidCompressionTypeSet( src, val, ec )
 integer function cxPyramidCopy( src )
 integer function cxPyramidDictionaryAlloc( NumEntries )
 integer function cxPyramidDictionaryCopy( src )
 integer function cxPyramidDictionaryDup( src )
 integer function cxPyramidDictionaryGet( src, ec )
 integer function cxPyramidDictionaryNumDimsGet( src, ec )
 subroutine cxPyramidDictionaryNumDimsSet( src, val, ec )
 integer function cxPyramidDictionaryNumEntriesGet( src, ec )
 subroutine cxPyramidDictionaryNumEntriesSet( src, val, ec )
 integer function cxPyramidDictionaryRead( fd )
 subroutine cxPyramidDictionarySet( src, val, ec )
 integer function cxPyramidDictionaryTableGet( src, ec )
 integer function cxPyramidDictionaryTableLen( src, ec )
 subroutine cxPyramidDictionaryTableRem( src, val, ec )
 subroutine cxPyramidDictionaryTableSet( src, val, ec )
 subroutine cxPyramidDictionaryWrite( fd, mode, src )
 integer function cxPyramidDup( src )
 integer function cxPyramidLayerConnectionGet( src, layerInd, ec )
 subroutine cxPyramidLayerConnectionSet( src, val, layerInd, ec )
 integer function cxPyramidLayerLatticeGet( src, layerInd, ec )
 subroutine cxPyramidLayerLatticeSet( src, val, layerInd, ec )
 integer function cxPyramidNumLevelsGet( src, ec )
 subroutine cxPyramidNumLevelsSet( src, val, ec )
 integer function cxPyramidNumberIndicesGet( src, ec )
 subroutine cxPyramidNumberIndicesSet( src, val, ec )
 integer function cxPyramidRead( fd )
 subroutine cxPyramidWrite( fd, mode, src )
 integer function cxPyramidlayerLen( src, ec )
 subroutine cxPyramidlayerRem( src, val, ec )
src
In C, a pointer to the data structure to be accessed in whole or part. In Fortran, an opaque integer handle to the data structure to be accessed in whole or part.
val
The val argument (if present) is the new value to be assigned to the structure member. See the section on Set routines below for more information on the val argument.
*Ind
Arguments following src and preceding ec with variable name ending in Ind (if any) are integer array bounds. If such an argument exists, the requested member is part of an array of structures, for which the *Ind variable provides the array index.
ec
In C, a pointer to a returned error code (if present). In Fortran, an integer output error code (if present). The ec output is an enumerated integer with cx_err_none (zero) indicating success. Any other value indicates an improper src input or an out-of-bounds Ind argument.
The return value (if present) is the accessed member, member type or length, allocated array or structure, duplicated structure, or read structure. See the section on the appropriate routines below for more information. The cxPyramid IRIS Explorer data structure is used to communicate data between modules in the IRIS Explorer scientific visualization system. The cxPyramid structure is defined using the IRIS Explorer Typing Language; the actual datatype specification is given at the bottom of the manual page. Derived from this datatype are several C and Fortran language routines that support manipulation of the cxPyramid structure members. The name of each routine is derived from the label of the associated member in the cxPyramid along with a keyword to denote the routine's action. Each routine name has the three parts type, member, and action, where type is either cxPyramid or a subsidiary reference-counted type, the optional member indicates the member to be accessed (or, if missing, indicates that the entire structure is the subject of the action), and action names the action the routine performs. Routines are generated to support only the actions which make sense for the cxPyramid structure. Not all types of routines may be represented if cxPyramid does not contain all types of structure members. Routines may be generated to support getting, setting and allocating structure members. Other routines compute the type, length, or array dimension product of appropriate structure members. Additional routines support copying, duplication, reading and writing of the entire cxPyramid data structure and of its subordinate reference counted sub-structures (if any). Similar routines are described together in a section below. Each description gives the information common to the routines in that section, with a table of the details particular to each routine. While the section headings mention only the cxPyramid routines, their discussions also pertain to similar routines for reference-counted types within cxPyramid. While most routines for the cxPyramid structure deal with the entire structure or a single member of it, some routines may access several members that have been aliased together (see, for instance, the data and coordinates arrays in the cxData and cxCoord structures of the cxLattice type). The routines that manipulate the non-uniquely labelled members in the cases of a switch structure have a special structure. Whereas a routine accessing a single structure member can have arguments and a return value of known type, the argument types of the union-based routine are not known at compile time. Therefore, such a routine expects as input or returns as output a pointer to memory; the pointer is either the pointer to the scalar member, or the actual member address in the case of an array or referenced structure. Some Get, Set, Type and Len routines may have this behavior. All of the routines documented above are automatically generated from the type file (whose suffix is .t). If you wish to examine the generated code for a given type (user- or IRIS Explorer-defined), you can recreate those files at will. Once you have created a .t file containing the type specification, you must also create a file named TYPES, which has on a single line the name of your type (without the .t suffix). Then create a Makefile by executing cxmkmf; you use the Makefile to build the type library. In the process of doing this, the generated code will be written to the file with suffix .api.c.

For example, assuming that the cxPyramid.t file exists, you would take the following steps:

        echo cxPyramid > TYPES
        cxmkmf
        make
Now your automatically generated code will reside in cxPyramid.api.c.

Note that this process will create several files in the local directory, so it is often helpful to use a separate directory for types, just as modules are developed in their own directories.

Routines in this group return the value of the appropriate structure member. The label of the member is used to construct the name of the routine, which has the three parts type, member, and Get. If the label refers to several members in disjoint cases of a switch statement, then the return value is a pointer to storage. This pointer is either a reference to the scalar member, or the actual member pointer, depending on the type of the member.
 signed long* cxConnectionConnectionsArrayGet( cxConnection *src, cxErrorCode *ec );
 signed long cxConnectionConnectionsLengthGet( cxConnection *src, cxErrorCode *ec );
 signed long* cxConnectionElementsArrayGet( cxConnection *src, cxErrorCode *ec );
 signed long cxConnectionElementsLengthGet( cxConnection *src, cxErrorCode *ec );
 signed long cxConnectionNumElementsGet( cxConnection *src, cxErrorCode *ec );
 cxLattice* cxPyramidBaseLatticeGet( cxPyramid *src, cxErrorCode *ec );
 void* cxPyramidCompressionIndexGet( cxPyramid *src, cxErrorCode *ec );
 cxCompressType cxPyramidCompressionTypeGet( cxPyramid *src, cxErrorCode *ec );
 cxPyramidDictionary* cxPyramidDictionaryGet( cxPyramid *src, cxErrorCode *ec );
 signed long cxPyramidDictionaryNumDimsGet( cxPyramidDictionary *src, cxErrorCode *ec );
 signed long cxPyramidDictionaryNumEntriesGet( cxPyramidDictionary *src, cxErrorCode *ec );
 cxPyramid** cxPyramidDictionaryTableGet( cxPyramidDictionary *src, cxErrorCode *ec );
 cxConnection* cxPyramidLayerConnectionGet( cxPyramid *src, long layerInd, cxErrorCode *ec );
 cxLattice* cxPyramidLayerLatticeGet( cxPyramid *src, long layerInd, cxErrorCode *ec );
 signed long cxPyramidNumLevelsGet( cxPyramid *src, cxErrorCode *ec );
 signed long cxPyramidNumberIndicesGet( cxPyramid *src, cxErrorCode *ec );
 integer function cxConnectionConnectionsArrayGet( src, ec )
 integer function cxConnectionConnectionsLengthGet( src, ec )
 integer function cxConnectionElementsArrayGet( src, ec )
 integer function cxConnectionElementsLengthGet( src, ec )
 integer function cxConnectionNumElementsGet( src, ec )
 integer function cxPyramidBaseLatticeGet( src, ec )
 integer function cxPyramidCompressionIndexGet( src, ec )
 integer function cxPyramidCompressionTypeGet( src, ec )
 integer function cxPyramidDictionaryGet( src, ec )
 integer function cxPyramidDictionaryNumDimsGet( src, ec )
 integer function cxPyramidDictionaryNumEntriesGet( src, ec )
 integer function cxPyramidDictionaryTableGet( src, ec )
 integer function cxPyramidLayerConnectionGet( src, layerInd, ec )
 integer function cxPyramidLayerLatticeGet( src, layerInd, ec )
 integer function cxPyramidNumLevelsGet( src, ec )
 integer function cxPyramidNumberIndicesGet( src, ec )
<ans>
The returned argument represents the structure member of interest. There are two cases, with different interpretations of the returned argument. The first case, in which the return type is not a generic pointer (in C a void* pointer, in Fortran an integer), returns the member of interest, whether scalar or pointer. In the second case, in which the return type is a generic pointer (in C a void* pointer), the returned value is a pointer to storage. If the requested member is a scalar, the returned value is a reference to that scalar. If the requested member is a pointer, the returned value is actually that pointer. This case happens when several members in different cases of a switch structure are given the same label in the IRIS Explorer Typing Language file cxPyramid.t. It may be difficult to distinguish the two cases in Fortran based on the function return type (if that type is integer). In this case the user should consult the definition of cxPyramid to determine whether several members have the same label string. In Fortran, the Get routines that return a character string or array of character strings are implemented as subroutines having that string as their last argument. They are not written as character functions. Such a subroutine returning an array of character strings assumes the caller has passed in enough storage to hold all the strings; the number of elements necessary to form the array can be found by calling the related Len routine.
Routines in this group set the value of the appropriate structure member. The label of the member is used to construct the name of the routine, which has the three parts type, member, and Set. If the label refers to several members in disjoint cases of a switch statement, then the input value must be a pointer to storage. This pointer is either a reference to a scalar value used to override the old member value, or the actual pointer used to replace the member, depending on the type of the member. The old member is deleted, if an array, or has its reference count decremented, if a shared structure.
 void cxConnectionConnectionsArraySet( cxConnection *src, signed long* val, cxErrorCode *ec );
 void cxConnectionConnectionsLengthSet( cxConnection *src, signed long val, cxErrorCode *ec );
 void cxConnectionElementsArraySet( cxConnection *src, signed long* val, cxErrorCode *ec );
 void cxConnectionElementsLengthSet( cxConnection *src, signed long val, cxErrorCode *ec );
 void cxConnectionNumElementsSet( cxConnection *src, signed long val, cxErrorCode *ec );
 void cxPyramidBaseLatticeSet( cxPyramid *src, cxLattice* val, cxErrorCode *ec );
 void cxPyramidCompressionIndexSet( cxPyramid *src, void *member, cxErrorCode *ec );
 void cxPyramidCompressionTypeSet( cxPyramid *src, cxCompressType val, cxErrorCode *ec );
 void cxPyramidDictionaryNumDimsSet( cxPyramidDictionary *src, signed long val, cxErrorCode *ec );
 void cxPyramidDictionaryNumEntriesSet( cxPyramidDictionary *src, signed long val, cxErrorCode *ec );
 void cxPyramidDictionarySet( cxPyramid *src, cxPyramidDictionary* val, cxErrorCode *ec );
 void cxPyramidDictionaryTableSet( cxPyramidDictionary *src, cxPyramid** val, cxErrorCode *ec );
 void cxPyramidLayerConnectionSet( cxPyramid *src, cxConnection* val, long layerInd, cxErrorCode *ec );
 void cxPyramidLayerLatticeSet( cxPyramid *src, cxLattice* val, long layerInd, cxErrorCode *ec );
 void cxPyramidNumLevelsSet( cxPyramid *src, signed long val, cxErrorCode *ec );
 void cxPyramidNumberIndicesSet( cxPyramid *src, signed long val, cxErrorCode *ec );
 subroutine cxConnectionConnectionsArraySet( src, val, ec )
 subroutine cxConnectionConnectionsLengthSet( src, val, ec )
 subroutine cxConnectionElementsArraySet( src, val, ec )
 subroutine cxConnectionElementsLengthSet( src, val, ec )
 subroutine cxConnectionNumElementsSet( src, val, ec )
 subroutine cxPyramidBaseLatticeSet( src, val, ec )
 subroutine cxPyramidCompressionIndexSet( src, member, ec )
 subroutine cxPyramidCompressionTypeSet( src, val, ec )
 subroutine cxPyramidDictionaryNumDimsSet( src, val, ec )
 subroutine cxPyramidDictionaryNumEntriesSet( src, val, ec )
 subroutine cxPyramidDictionarySet( src, val, ec )
 subroutine cxPyramidDictionaryTableSet( src, val, ec )
 subroutine cxPyramidLayerConnectionSet( src, val, layerInd, ec )
 subroutine cxPyramidLayerLatticeSet( src, val, layerInd, ec )
 subroutine cxPyramidNumLevelsSet( src, val, ec )
 subroutine cxPyramidNumberIndicesSet( src, val, ec )
val
The val argument (if present) is the new value to be assigned to the structure member. There are two cases, with different interpretations of val. The first case, in which the type of val is not a generic pointer (in C a void* pointer, in Fortran an integer), assigns val, whether scalar or pointer. In the second case, in which the type of val is a generic pointer (in C a void* pointer), val is a pointer to storage. If the requested member is a scalar, val is a reference to that scalar. If the requested member is a pointer, val is interpreted as actually that pointer. This case happens when several members in different cases of a switch structure are given the same label in the IRIS Explorer Typing Language file cxPyramid.t. It may be difficult to distinguish the two cases in Fortran based on the argument type (if that type is integer). In this case the user should consult the definition of cxPyramid to determine whether several members have the same label string.
Routines in this group return the type of the appropriate structure member, which is one of several members sharing the same label. The label of the member is used to construct the name of the routine, which has the three parts type, member, and Type.
 cxPrimType cxPyramidCompressionIndexType( cxPyramid *src, cxErrorCode *ec );
 integer function cxPyramidCompressionIndexType( src, ec )
Routines in this group return the length in words of the appropriate array member. This length is calculated as the product of the dimensioning scalars and variables used to declare the array. The label of the member is used to construct the name of the routine, which has the three parts type, member, and Len.
 long cxConnectionConnectionsArrayLen( cxConnection *src, cxErrorCode *ec );
 long cxConnectionElementsArrayLen( cxConnection *src, cxErrorCode *ec );
 long cxPyramidCompressionIndexLen( cxPyramid *src, cxErrorCode *ec );
 long cxPyramidDictionaryTableLen( cxPyramidDictionary *src, cxErrorCode *ec );
 long cxPyramidlayerLen( cxPyramid *src, cxErrorCode *ec );
 integer function cxConnectionConnectionsArrayLen( src, ec )
 integer function cxConnectionElementsArrayLen( src, ec )
 integer function cxPyramidCompressionIndexLen( src, ec )
 integer function cxPyramidDictionaryTableLen( src, ec )
 integer function cxPyramidlayerLen( src, ec )
<ans>
The type of the requested switch discriminator variable. In C, the return value is a cxPrimType enumerated integer. In Fortran, the return value is an integer. See the file /usr/explorer/include/cx/Typedefs.h for more information.
Routines in this group compute the product of an array member's elements, to reflect the contribution to the length of an array that uses this member as a dimensioning variable. The label of the member to be allocated is used to construct the name of the routine, which has the three parts type, member, and Prod.
<ans>
The returned integer value is the length of an array dimensioned by the specified member, computed by taking the product of the member's values.
Routines in this group duplicate the entire data structure. The type of the structure is used to construct the name of the routine, which has the two parts type and Dup.
 cxConnection* cxConnectionDup( cxConnection *src );
 cxPyramidDictionary* cxPyramidDictionaryDup( cxPyramidDictionary *src );
 cxPyramid* cxPyramidDup( cxPyramid *src );
 integer function cxConnectionDup( src )
 integer function cxPyramidDictionaryDup( src )
 integer function cxPyramidDup( src )
<ans>
The return value references the duplicated structure, or is zero if an error was encountered. In C, the return value is a pointer to the structure. In Fortran, the return value is an opaque integer handle to the duplicated data structure.
Routines in this group copy the data structure, but not its reference counted children. The children of the input structure are referenced from the output structure and their reference counts incremented. For instance, a copied lattice would have a new cxLattice structure and a new dims vector, but would refer to the original cxData and cxCoord structures. The type of the structure is used to construct the name of the routine, which has the two parts type and Copy.
 cxConnection* cxConnectionCopy( cxConnection *src );
 cxPyramid* cxPyramidCopy( cxPyramid *src );
 cxPyramidDictionary* cxPyramidDictionaryCopy( cxPyramidDictionary *src );
 integer function cxConnectionCopy( src )
 integer function cxPyramidCopy( src )
 integer function cxPyramidDictionaryCopy( src )
<ans>
The return value references the copied structure, or is zero if an error was encountered. In C, the return value is a pointer to the structure. In Fortran, the return value is an opaque integer handle to the duplicated data structure.
Routines in this group allocate a reference-counted structure, an array member, or one of several union members sharing the same label. The label of the member to be allocated is used to construct the name of the routine, which has the three parts type, (optionally) member, and Alloc. If there is no member designated, the routine allocates the entire reference-counted structure.
 cxConnection* cxConnectionAlloc( signed long ElementsLength, signed long ConnectionsLength );
 cxPyramid* cxPyramidAlloc( signed long NumLevels, cxCompressType CompressionType, signed long NumberIndices );
 void* cxPyramidCompressionIndexAlloc( cxPyramid *src );
 cxPyramidDictionary* cxPyramidDictionaryAlloc( signed long NumEntries );
 integer function cxConnectionAlloc( ElementsLength, ConnectionsLength )
 integer function cxPyramidAlloc( NumLevels, CompressionType, NumberIndices )
 integer function cxPyramidCompressionIndexAlloc( src )
 integer function cxPyramidDictionaryAlloc( NumEntries )
There are two types of allocation routines, those that allocate an array and those that allocate a reference-counted structure.
src
If src is an argument, then the allocation creates an array needed by the src structure. It is assumed that the src structure has been constructed to contain all the information needed to dimension the array. In C, src is a pointer to the structure. In Fortran, src is an opaque integer handle to the data structure.
<other>
The arguments other than src, if any, are dimensioning scalars, dimensioning arrays, and discriminating switches of some enumerated type. In C, the respective types of these arguments are long, long*, and enumerated types. In Fortran, their respective types are integer, integer array, and enumerated integer. These arguments are included in the argument list if they are needed to compute the size of an array or which case of a switch to take in allocating a reference-counted structure. It is possible that a structure allocation routine will not fully allocate the structure. This happens when an array or switch contains several items to also be allocated; there is no acceptable way to put all of the dimensioning information into the function call, so the array is not allocated (a null pointer is used instead) and the user is expected to use array allocation and member setting routines to complete the structure allocation. The return value references the allocated array or structure, or is zero if an error was encountered. In C, the return value is a pointer to the allocated structure. In Fortran, the return value is an opaque integer handle to the allocated data structure.
Routines in this group remove an array of objects, which may be scalars, structures, or reference-counted structures. Simple arrays are freed, arrays of structures are operated on recursively to remove their contents, and reference-counted structures have their reference counts decremented. The label of the member to be removed is used to construct the name of the routine, which has the three parts type, member, and Rem. No routine is created for removal of single reference-counted structures, use cxDataRefDec for that purpose. These routines are internal utilities used only by the Set routines. They are not meant for public use. No Fortran interface is provided. To delete a reference-counted object and the members it contains, use cxDataRefDec. To replace a member, use the related Set routine.
 void cxConnectionConnectionsArrayRem( cxConnection *src, signed long* *val, cxErrorCode *ec );
 void cxConnectionElementsArrayRem( cxConnection *src, signed long* *val, cxErrorCode *ec );
 void cxPyramidCompressionIndexRem( cxPyramid *src, void *val, cxErrorCode *ec );
 void cxPyramidDictionaryTableRem( cxPyramidDictionary *src, cxPyramid** *val, cxErrorCode *ec );
 void cxPyramidlayerRem( cxPyramid *src, cxPyramidLayer* *val, cxErrorCode *ec );
src
src is the reference-counted structure containing the member to be removed. In C, src is a pointer to the structure.
val
val is the address of the member to be removed. An array is deleted, while a shared structure has its reference count decremented. In C, val is a pointer to the member.
Routines in this group use the IRIS Explorer transcription mechanism to read an ASCII or binary IRIS Explorer data structure from a file descriptor. The name of the type is used to construct the name of the routine, which has the two parts type and Read.
 cxConnection* cxConnectionRead( FILE *fd );
 cxPyramidDictionary* cxPyramidDictionaryRead( FILE *fd );
 cxPyramid* cxPyramidRead( FILE *fd );
 integer function cxConnectionRead( fd )
 integer function cxPyramidDictionaryRead( fd )
 integer function cxPyramidRead( fd )
fd
The fd argument is the file descriptor from which to read data. In C, fd is of type FILE*. In Fortran, its type is integer.
Routines in this group use the IRIS Explorer transcription mechanism to write an ASCII or binary IRIS Explorer data structure to a file descriptor. The name of the type is used to construct the name of the routine, which has the two parts type and Write. The IRIS Explorer ASCII transcription format is not documented (to preserve the option of change at a future date), but is a straightforward ASCII presentation of the input structure; a careful comparison of such an output file with the input dataset will elucidate the format.
 void cxConnectionWrite( FILE *fd, int mode, cxConnection *src );
 void cxPyramidDictionaryWrite( FILE *fd, int mode, cxPyramidDictionary *src );
 void cxPyramidWrite( FILE *fd, int mode, cxPyramid *src );
 subroutine cxConnectionWrite( fd, mode, src )
 subroutine cxPyramidDictionaryWrite( fd, mode, src )
 subroutine cxPyramidWrite( fd, mode, src )
fd
The fd argument is the file descriptor to which to write data. In C, fd is of type FILE*. In Fortran, its type is integer.
mode
The integer mode argument determines whether the output file is transcribed in ASCII (mode == 0) or binary (mode != 0) IRIS Explorer format.
This is the cxPyramid data structure definition as specified in the file cxPyramid.t.
pragma "version 2.0"
#include  <cx/cxLattice.t>
shared root typedef struct cxPyramid {
    cxLattice   baseLattice "Base Lattice";
    long    count   "Num Levels";
    cxPyramidLayer  layer[count];
    cxPyramidReference  ref;
} cxPyramid;
typedef struct {
    closed cxConnection relation  "Layer %d Connection";
    closed cxLattice  nextLattice "Layer %d Lattice";
} cxPyramidLayer;
shared typedef struct {
    long            numElements     "Num Elements";
    long            elemArrayLen    "Elements Length";
    long            numConnections    "Connections Length";
    long            elements[elemArrayLen]  "Elements Array";
    long            connections[numConnections] "Connections Array";
} cxConnection;
typedef enum {
    cx_compress_none,
    cx_compress_unique,
    cx_compress_multiple
} cxCompressType;
shared typedef struct {
    long      nDim  "Num Dims";
    long      numEntries  "Num Entries";
    closed struct cxPyramid table[numEntries] "Table";

} cxPyramidDictionary;
typedef struct {
    cxCompressType  compressType  "Compression Type";
    switch (compressType) {

    case cx_compress_multiple:
  long      numIndices          "Number Indices";
  long      indices[numIndices] "Compression Index";

    case cx_compress_unique:
  long      index   "Compression Index";
    } r;
    cxPyramidDictionary     dictionary  "Dictionary";
} cxPyramidReference;
cxDataRefInc(3E), cxDataRefDec(3E), cxDataMalloc(3E), cxDataObjNew(3E), cxmkmf(1E).
Last modified: Mon Nov 6 16:33:42 GMT 2000
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1999