40#include "config_hdf.h"
48#define SIGNED_BYTE_TO_INT32 1
55 switch (v.number_type()) {
57 rv = v.export_int16();
60#ifdef SIGNED_BYTE_TO_INT32
64 rv = v.export_int32();
68 rv = v.export_uint16();
72 rv = v.export_uint32();
76 rv = v.export_float32();
80 rv = v.export_float64();
83#ifndef SIGNED_BYTE_TO_INT32
89 rv = v.export_uint8();
106void *ExportDataForDODS(
const hdf_genvec & v,
int i)
108 switch (v.number_type()) {
110 auto temp =
new int16;
111 *temp = v.elt_int16(i);
112 return (
void *) temp;
115#ifdef SIGNED_BYTE_TO_INT32
119 auto temp =
new int32;
120 *temp = v.elt_int32(i);
121 return (
void *) temp;
125 auto temp =
new uint16;
126 *temp = v.elt_uint16(i);
127 return (
void *) temp;
131 auto temp =
new uint32;
132 *temp = v.elt_uint32(i);
133 return (
void *) temp;
137 auto temp =
new float32;
138 *temp = v.elt_float32(i);
139 return (
void *) temp;
143 auto temp =
new float64;
144 *temp = v.elt_float64(i);
145 return (
void *) temp;
148#ifndef SIGNED_BYTE_TO_INT32
154 auto temp =
new uint8;
155 *temp = v.elt_uint8(i);
156 return (
void *) temp;
178void *AccessDataForDODS(
const hdf_genvec & v,
int i)
182 switch (v.number_type()) {
184 *(
static_cast < int16 *
>(rv)) = v.elt_int16(i);
187#ifdef SIGNED_BYTE_TO_INT32
191 *(
static_cast < int32 *
>(rv)) = v.elt_int32(i);
195 *(
static_cast < uint16 *
>(rv)) = v.elt_uint16(i);
199 *(
static_cast < uint32 *
>(rv)) = v.elt_uint32(i);
203 *(
static_cast < float32 *
>(rv)) = v.elt_float32(i);
207 *(
static_cast < float64 *
>(rv)) = v.elt_float64(i);
210#ifndef SIGNED_BYTE_TO_INT32
216 *(
static_cast < uchar8 *
>(rv)) = v.elt_uint8(i);