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_ll(tomap->dim_begin(),
true) !=
map->dimension_size_ll(
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);
181 _arr->clear_embedded();
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: ";
236 for (; i != e; i++) {
237 if (!first) strm <<
", ";
242 BESIndent::UnIndent();
A DAP Array with file out netcdf information included.
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