source: XIOS/branchs/xios-1.0/extern/src_netcdf4/ocnode.h @ 2100

Last change on this file since 2100 was 409, checked in by ymipsl, 12 years ago

Add improved nectdf internal library src

YM

  • Property svn:eol-style set to native
File size: 2.9 KB
Line 
1/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
2   See the COPYRIGHT file for more information. */
3
4#ifndef OCNODE_H
5#define OCNODE_H
6
7/*! Specifies the Diminfo. */
8/* Track info purely about declared dimensions.
9   More information is included in the Dimdata structure (dim.h)
10*/
11typedef struct OCdiminfo {
12    struct OCnode* array;   /* defining array node (if known)*/
13    unsigned int arrayindex;/* rank position ofthis dimension in the array*/
14    ocindex_t declsize;     /* from DDS*/
15} OCdiminfo;
16
17/*! Specifies the Arrayinfo.*/
18typedef struct OCarrayinfo {
19    /* The complete set of dimension info applicable to this node*/
20    OClist*  dimensions;
21    /* convenience (because they are computed so often*/
22    unsigned int rank; /* == |dimensions|*/
23} OCarrayinfo;
24
25/*! Specifies Attribute info */
26typedef struct OCattribute {
27    char*   name;
28    OCtype etype; /* type of the attribute */
29    size_t  nvalues;
30    char**  values;  /* |values| = nvalues*sizeof(char**)*/
31} OCattribute;
32
33/*! Specifies the Attinfo.*/
34/* This is the form as it comes out of the DAS parser*/
35typedef struct OCattinfo {
36    int isglobal;   /* is this supposed to be a global attribute set?*/
37    OClist* values; /* oclist<char*>*/
38} OCattinfo;
39
40/*! Specifies the OCnode. */
41typedef struct OCnode {
42    unsigned int    magic;
43    OCtype          octype;
44    OCtype          etype; /* essentially the dap type from the dds*/
45    char*           name;
46    char*           fullname;
47    struct OCnode*  container; /* this node is subnode of container */
48    struct OCnode*  root;      /* root node of tree containing this node */
49    struct OCtree*  tree;      /* !NULL iff this is a root node */
50    struct OCnode*  datadds;   /* correlated datadds node, if any */
51    OCdiminfo       dim;       /* octype == OC_Dimension*/
52    OCarrayinfo     array;     /* octype == {OC_Structure, OC_Primitive}*/
53    OCattinfo       att;       /* octype == OC_Attribute */
54    /* primary edge info*/
55    OClist* subnodes; /*oclist<OCnode*>*/
56    /*int     attributed;*/ /* 1 if merge was done*/
57    OClist* attributes; /* oclist<OCattribute*>*/
58    struct OCSKIP {/* Support fast skipping ; in following, 0 => undefined */
59        ocindex_t count;        /* no. instances (== dimension cross product); may be indeterminate*/
60        ocoffset_t instancesize;/*size of single instance; may be indeterminate*/
61        ocoffset_t totalsize;   /* usually: count*instancesize + overhead; may be indeterminate */
62        ocoffset_t offset;      /* mostly for debugging */
63    } skip;
64#ifdef OCIGNORE
65    struct {/* do simple index cache */
66        int cacheable; /* is this object cacheable? */
67        int valid;   /* is this cache valid */
68        ocindex_t index; /* last index */
69        ocoffset_t offset; /* position of the last indexed instance */ 
70    } cache;
71#endif
72} OCnode;
73
74#if SIZEOF_SIZE_T == 4
75#define OCINDETERMINATE  ((size_t)0xffffffff)
76#endif
77#if SIZEOF_SIZE_T == 8
78#define OCINDETERMINATE  ((size_t)0xffffffffffffffff)
79#endif
80
81#endif /*OCNODE_H*/
Note: See TracBrowser for help on using the repository browser.