36#include <libdap/Array.h>
58 : _arr(a), _ingrid(ingrid), _defined(false), _ref(1)
88 if (!_ref)
delete this;
108 libdap::Array *map = _arr->array();
110 BESDEBUG(
"fonc",
"FONcMap::compare - comparing " << tomap->name()
111 <<
" to " << map->name() << endl);
114 if (isequal && tomap->name() != map->name()) {
119 if (isequal && tomap->var()->type() != map->var()->type()) {
124 if (isequal && tomap->length() != map->length()) {
129 if (isequal && tomap->dimensions() != map->dimensions()) {
134 if (isequal && map->dimension_name(map->dim_begin()) != map->name()) {
139 if (isequal && tomap->dimension_name(tomap->dim_begin()) != map->dimension_name(map->dim_begin())) {
144 if (isequal && tomap->dimension_size(tomap->dim_begin(),
true) != map->dimension_size(map->dim_begin(),
true)) {
150 char *map_buf = map->get_buf();
151 char *tomap_buf = tomap->get_buf();
158 if (map_buf && tomap_buf && 0 != memcmp(map_buf, tomap_buf, map->width()))
163 "FONcMap::compare - done comparing " << tomap->name() <<
" to " << map->name() <<
": " << isequal << endl);
172 _shared_by.push_back(name);
219 strm << BESIndent::LMarg <<
"FONcMap::dump - ("
220 << (
void *)
this <<
")" << endl;
222 strm << BESIndent::LMarg <<
"array:";
227 BESIndent::UnIndent();
230 strm <<
" not set" << endl;
232 strm << BESIndent::LMarg <<
"shared by: ";
233 vector<string>::const_iterator i = _shared_by.begin();
234 vector<string>::const_iterator e = _shared_by.end();
236 for (; i != e; i++) {
237 if (!first) strm <<
", ";
242 BESIndent::UnIndent();
A DAP Array with file out netcdf information included.
virtual void dump(std::ostream &strm) const override
dumps information about this object for debugging purposes
virtual void define(int ncid) override
define the DAP Array in the netcdf file
virtual void write(int ncid) override
Write the array out to the netcdf file.
virtual void clear_embedded()
Clears the list of embedded variable names.
virtual void clear_embedded()
clear the embedded names for the FONcArray kept by this instance
virtual void dump(std::ostream &strm) const
dumps information about this object for debugging purposes
virtual ~FONcMap()
Destructor that cleans up the map.
virtual void decref()
decrements the reference count for this map
virtual void add_grid(const std::string &name)
Add the name of the grid as a grid that uses this map.
virtual void write(int ncid)
writes out the vallues of the map to the netcdf file by calling write on the FONcArray
virtual bool compare(libdap::Array *arr)
a method to compare two grid maps, or possible grid maps.
virtual void define(int ncid)
define the map in the netcdf file by calling define on the FONcArray