32#include <BESInternalError.h>
34#include "FONcSequence.h"
48 _s =
dynamic_cast<libdap::Sequence *
>(b);
50 throw BESInternalError(
"File out netcdf, FONcSequence was passed a variable that is not a DAP Sequence", __FILE__, __LINE__);
74 FONcBaseType::convert(embed,_dap4,is_dap4_group);
93 string val = (string)
"The sequence " + d_varname +
" is a member of this dataset and has been elided.";
94 int stax = nc_put_att_text(ncid, NC_GLOBAL, d_varname.c_str(), val.size(), val.c_str());
95 if (stax != NC_NOERR) {
96 string err = (string)
"File out netcdf, " +
"failed to write string attribute for sequence " + d_varname;
115string FONcSequence::name()
128 strm << BESIndent::LMarg <<
"FONcSequence::dump - (" << (
void *)
this <<
")" << endl;
130 strm << BESIndent::LMarg <<
"name = " << _s->name() << endl;
131 BESIndent::UnIndent();
exception thrown if internal error encountered
virtual void define(int ncid)
define the DAP Sequence in the netcdf file
virtual void dump(ostream &strm) const
dumps information about this object for debugging purposes
FONcSequence(libdap::BaseType *b)
Constructor for FONcSequence that takes a DAP Sequence.
virtual ~FONcSequence()
Destructor that cleans up the sequence.
virtual void convert(vector< string > embed, bool _dap4=false, bool is_dap4_group=false)
convert the Sequence to something that can be stored in a netcdf file
virtual void write(int ncid)
Write the sequence data out to the netcdf file.
static void handle_error(int stax, const string &err, const string &file, int line)
handle any netcdf errors
static string gen_name(const vector< string > &embed, const string &name, string &original)
generate a new name for the embedded variable