netcdf-c/oc2/ocdata.h
dmh a189b98b0b 1. Any test that references nctestserver/NC_findtestserver
should be under ENABLE_DAP_REMOTE_TESTS.
   Fixed to make sure that this is so.
   Also attempted to fix ncdap_test/CMakeLists.txt,
   but probably got it wrong.
   HT to Nico Schlomer.
2. Attempted to reduce the number of conversion errors
   when -Wconversion is set. Fixed oc2, but
   rest of netcdf remains to be done.
   HT to Nico Schlomer.
3. When doing #2, I discovered an error in ncgen.y
   that has remained hidden. This required some other
   test case fixes.
2014-03-08 20:41:30 -07:00

49 lines
1.7 KiB
C

/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
See the COPYRIGHT file for more information. */
#ifndef OCDATA_H
#define OCDATA_H
/*
This structure is used to set up
pointers into the DataDDS data packet
to speed up access.
This has some similarities to OCNODE.
*/
struct OCdata {
OCheader header;
OCDT datamode;
OCnode* template;
OCdata* container; /* link back to container instance */
size_t index; /* WRT to the container */
off_t xdroffset; /* Of this instance wrt xxdr_getpos() */
off_t xdrsize; /* for leafs, and as defined by xdr; if known else 0*/
size_t ninstances;/* |instances| */
OCdata** instances; /* vector of instances; if rank > 0, then
it captures the array elements, else
it captures the field instances. */
size_t nstrings;
off_t* strings;
};
extern void ocdata_free(OCstate*, OCdata*);
extern OCerror ocdata_ithfield(OCstate*, OCdata* container, size_t index, OCdata** fieldp);
extern OCerror ocdata_container(OCstate*, OCdata* data, OCdata** containerp);
extern OCerror ocdata_root(OCstate*, OCdata* data, OCdata** rootp);
extern OCerror ocdata_ithelement(OCstate*, OCdata* data, size_t* indices, OCdata** elementp);
extern OCerror ocdata_ithrecord(OCstate*, OCdata* data, size_t index, OCdata** recordp);
extern OCerror ocdata_position(OCstate*, OCdata* data, size_t* indices);
extern OCerror ocdata_recordcount(OCstate*, OCdata*, size_t*);
extern OCerror ocdata_getroot(OCstate*, OCnode*, OCdata**);
/* Atomic leaf reading */
extern int ocdata_read(OCstate*,OCdata*,size_t,size_t,void*,size_t);
#endif /*OCDATA_H*/