bes
Updated for version 3.20.6
|
32 #include <BESInternalError.h>
35 #include "FONcStructure.h"
36 #include "FONcUtils.h"
37 #include "FONcAttributes.h"
50 _s =
dynamic_cast<Structure *
>(b);
52 string s = (string)
"File out netcdf, write_structure was passed a " +
"variable that is not a structure";
66 vector<FONcBaseType *>::iterator i = _vars.begin();
67 vector<FONcBaseType *>::iterator e = _vars.end();
100 FONcBaseType::convert(embed);
101 embed.push_back(
name());
102 Constructor::Vars_iter vi = _s->var_begin();
103 Constructor::Vars_iter ve = _s->var_end();
104 for (; vi != ve; vi++) {
107 BESDEBUG(
"fonc",
"FONcStructure::convert - converting " << bt->name() << endl);
110 _vars.push_back(fbt);
134 BESDEBUG(
"fonc",
"FONcStructure::define - defining " << _varname << endl);
135 vector<FONcBaseType *>::const_iterator i = _vars.begin();
136 vector<FONcBaseType *>::const_iterator e = _vars.end();
137 for (; i != e; i++) {
139 BESDEBUG(
"fonc",
"defining " << fbt->name() << endl);
145 BESDEBUG(
"fonc",
"FONcStructure::define - done defining " << _varname << endl);
158 BESDEBUG(
"fonc",
"FONcStructure::write - writing " << _varname << endl);
159 vector<FONcBaseType *>::const_iterator i = _vars.begin();
160 vector<FONcBaseType *>::const_iterator e = _vars.end();
161 for (; i != e; i++) {
165 BESDEBUG(
"fonc",
"FONcStructure::define - done writing " << _varname << endl);
187 strm << BESIndent::LMarg <<
"FONcStructure::dump - (" << (
void *)
this <<
")" << endl;
189 strm << BESIndent::LMarg <<
"name = " << _s->name() <<
" {" << endl;
191 vector<FONcBaseType *>::const_iterator i = _vars.begin();
192 vector<FONcBaseType *>::const_iterator e = _vars.end();
193 for (; i != e; i++) {
197 BESIndent::UnIndent();
198 strm << BESIndent::LMarg <<
"}" << endl;
199 BESIndent::UnIndent();
virtual void define(int ncid)
Define the variable in the netcdf file.
virtual void dump(std::ostream &strm) const =0
dump the contents of this object to the specified ostream
virtual void write(int ncid)
write the member variables of the structure to the netcdf file
virtual ~FONcStructure()
Destructor that cleans up the structure.
virtual string name()
Returns the name of the structure.
virtual void dump(ostream &strm) const
dumps information about this object for debugging purposes
FONcStructure(BaseType *b)
Constructor for FONcStructure that takes a DAP Structure.
virtual void define(int ncid)
Define the members of the structure in the netcdf file.
exception thrown if internal error encountered
static FONcBaseType * convert(BaseType *v)
Creates a FONc object for the given DAP object.
A DAP BaseType with file out netcdf information included.
virtual void convert(vector< string > embed)
Creates the FONc objects for each variable of the DAP structure.
virtual void setVersion(std::string version)
Identifies variable with use of NetCDF4 features.