-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHDFSPArray_VDField.h
More file actions
71 lines (53 loc) · 1.88 KB
/
HDFSPArray_VDField.h
File metadata and controls
71 lines (53 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/////////////////////////////////////////////////////////////////////////////
// This file is part of the hdf4 data handler for the OPeNDAP data server.
// It retrieves the Vdata fields from NASA HDF4 data products.
// Each Vdata will be decomposed into individual Vdata fields.
// Each field will be mapped to A DAP variable.
// Authors: MuQun Yang <myang6@hdfgroup.org>
// Copyright (c) 2010-2012 The HDF Group
/////////////////////////////////////////////////////////////////////////////
#ifndef HDFSPARRAY_VDFIELD_H
#define HDFSPARRAY_VDFIELD_H
#include "hdf.h"
#include "mfhdf.h"
#include <libdap/Array.h>
class HDFSPArray_VDField:public libdap::Array
{
public:
HDFSPArray_VDField (int vdrank, const std::string& filename, const int fileid, int32 objref, int32 dtype, int32 fieldorder, const std::string & fieldname, const std::string & n = "", libdap::BaseType * v = 0):
Array (n, v),
rank (vdrank),
filename(filename),
fileid (fileid),
vdref (objref),
dtype (dtype),
fdorder (fieldorder),
fdname (fieldname) {
}
virtual ~ HDFSPArray_VDField ()
{
}
// Standard way of DAP handlers to pass the coordinates of the subsetted region to the handlers
// Return the number of elements to read.
int format_constraint (int *cor, int *step, int *edg);
libdap::BaseType *ptr_duplicate ()
{
return new HDFSPArray_VDField (*this);
}
virtual bool read ();
private:
// Field array rank
int rank;
std::string filename;
// file id
int32 fileid;
// Vdata reference number
int32 vdref;
// data type
int32 dtype;
// field order
int32 fdorder;
// field name
std::string fdname;
};
#endif