32#ifndef FONcBaseType_h_
33#define FONcBaseType_h_ 1
39#include <libdap/AttrTable.h>
40#include <libdap/D4Attributes.h>
41#include <libdap/D4AttributeType.h>
44#define RETURN_AS_NETCDF "netcdf"
45#define RETURN_AS_NETCDF4 "netcdf-4"
46#define NC4_CLASSIC_MODEL "NC4_CLASSIC_MODEL"
47#define NC4_ENHANCED "NC4_ENHANCED"
53class ConstraintEvaluator;
68 std::string _orig_varname;
69 std::vector<std::string> _embed;
71 std::string _ncVersion;
72 std::string _nc4_datamodel;
79 libdap::ConstraintEvaluator *d_eval;
81 FONcBaseType() : _varid(0), _defined(
false), is_dap4(
false), is_dap4_group(
false), d_dds(
nullptr), d_eval(
nullptr) { }
86 libdap::DDS *get_dds()
const {
return d_dds;}
87 void set_dds(libdap::DDS *dds) {d_dds = dds;}
89 libdap::ConstraintEvaluator *get_eval()
const {
return d_eval;}
90 void set_eval(libdap::ConstraintEvaluator *eval) {d_eval = eval;}
92 virtual void convert(std::vector<std::string> embed,
bool is_dap4=
false,
bool is_dap4_group=
false);
93 virtual void define(
int ncid);
94 virtual void write(
int ncid) = 0;
96 virtual std::string name() = 0;
97 virtual nc_type
type();
99 virtual int varid()
const {
return _varid; }
101 virtual void dump(std::ostream &strm)
const = 0;
103 virtual void setVersion(
const std::string &version);
106 virtual bool isNetCDF4_ENHANCED();
107 virtual void set_is_dap4(
bool set_dap4) {is_dap4 = set_dap4;}
108 virtual libdap::AttrType getAttrType(nc_type t);
109 virtual D4AttributeType getD4AttrType(nc_type t);
110 virtual void updateD4AttrType(libdap::D4Attributes *d4_attrs, nc_type t);
111 virtual void updateAttrType(libdap::AttrTable& attrs, nc_type t);
top level BES object to house generic methods
A DAP BaseType with file out netcdf information included.
virtual void define(int ncid)
Define the variable in the netcdf file.
virtual bool isNetCDF4()
Returns true if NetCDF4 features will be required.
virtual nc_type type()
Returns the type of data of this variable.
virtual void clear_embedded()
Clears the list of embedded variable names.
virtual void setNC4DataModel(const string &nc4_datamodel)
Identifies the netCDF4 data model (CLASSIC or ENHANCED)
virtual void setVersion(const std::string &version)
Identifies variable with use of NetCDF4 features.
virtual void dump(std::ostream &strm) const =0
dump the contents of this object to the specified ostream