51 : _arr( a ), _ingrid( ingrid ), _defined( false ), _ref( 1 )
82 if( !_ref )
delete this ;
101 bool isequal = true ;
103 Array *map = _arr->
array() ;
105 BESDEBUG(
"fonc",
"FONcMap::compare - comparing " << tomap->name()
106 <<
" to " << map->name() << endl ) ;
109 if( isequal && tomap->name() != map->name() )
115 if( isequal && tomap->var()->type() != map->var()->type() )
121 if( isequal && tomap->length() != map->length() )
127 if( isequal && tomap->dimensions() != map->dimensions() )
134 map->dimension_name( map->dim_begin() ) != map->name() )
141 tomap->dimension_name( tomap->dim_begin() ) !=
142 map->dimension_name( map->dim_begin() ) )
149 tomap->dimension_size( tomap->dim_begin(), true ) !=
150 map->dimension_size( map->dim_begin(), true ) )
158 switch( tomap->var()->type() )
162 dods_byte my_values[map->length()] ;
163 map->value( my_values ) ;
164 dods_byte to_values[map->length()] ;
165 tomap->value( to_values ) ;
166 for(
int i = 0; i < map->length(); i++ )
168 if( my_values[i] != to_values[i] )
178 dods_int16 my_values[map->length()] ;
179 map->value( my_values ) ;
180 dods_int16 to_values[map->length()] ;
181 tomap->value( to_values ) ;
182 for(
int i = 0; i < map->length(); i++ )
184 if( my_values[i] != to_values[i] )
194 dods_uint16 my_values[map->length()] ;
195 map->value( my_values ) ;
196 dods_uint16 to_values[map->length()] ;
197 tomap->value( to_values ) ;
198 for(
int i = 0; i < map->length(); i++ )
200 if( my_values[i] != to_values[i] )
210 dods_int32 my_values[map->length()] ;
211 map->value( my_values ) ;
212 dods_int32 to_values[map->length()] ;
213 tomap->value( to_values ) ;
214 for(
int i = 0; i < map->length(); i++ )
216 if( my_values[i] != to_values[i] )
226 dods_uint32 my_values[map->length()] ;
227 map->value( my_values ) ;
228 dods_uint32 to_values[map->length()] ;
229 tomap->value( to_values ) ;
230 for(
int i = 0; i < map->length(); i++ )
232 if( my_values[i] != to_values[i] )
242 dods_float32 my_values[map->length()] ;
243 map->value( my_values ) ;
244 dods_float32 to_values[map->length()] ;
245 tomap->value( to_values ) ;
246 for(
int i = 0; i < map->length(); i++ )
248 if( my_values[i] != to_values[i] )
258 dods_float64 my_values[map->length()] ;
259 map->value( my_values ) ;
260 dods_float64 to_values[map->length()] ;
261 tomap->value( to_values ) ;
262 for(
int i = 0; i < map->length(); i++ )
264 if( my_values[i] != to_values[i] )
275 vector<string> my_values ;
276 map->value( my_values ) ;
277 vector<string> to_values ;
278 tomap->value( to_values ) ;
279 vector<string>::const_iterator mi = my_values.begin() ;
280 vector<string>::const_iterator me = my_values.end() ;
281 vector<string>::const_iterator ti = to_values.begin() ;
282 for( ; mi != me; mi++, ti++ )
298 BESDEBUG(
"fonc",
"FONcMap::compare - done comparing " << tomap->name()
299 <<
" to " << map->name() <<
": " << isequal << endl ) ;
308 _shared_by.push_back( name ) ;
343 _arr->
write( ncid ) ;
357 << (
void *)
this <<
")" << endl ;
369 strm <<
" not set" << endl ;
371 strm << BESIndent::LMarg <<
"shared by: " ;
372 vector<string>::const_iterator i = _shared_by.begin() ;
373 vector<string>::const_iterator e = _shared_by.end() ;
377 if( !first ) strm <<
", " ;
virtual void write(int ncid)
writes out the vallues of the map to the netcdf file by calling write on the FONcArray ...
virtual void add_grid(const string &name)
Add the name of the grid as a grid that uses this map.
virtual ~FONcMap()
Destructor that cleans up the map.
A DAP Array with file out netcdf information included.
virtual void clear_embedded()
Clears the list of embedded variable names.
virtual bool compare(Array *arr)
a method to compare two grid maps, or possible grid maps.
virtual void write(int ncid)
Write the array out to the netcdf file.
virtual void decref()
decrements the reference count for this map
static ostream & LMarg(ostream &strm)
virtual void define(int ncid)
define the DAP Array in the netcdf file
virtual void dump(ostream &strm) const
dumps information about this object for debugging purposes
virtual void define(int ncid)
define the map in the netcdf file by calling define on the FONcArray
virtual void clear_embedded()
clear the embedded names for the FONcArray kept by this instance
#define BESDEBUG(x, y)
macro used to send debug information to the debug stream
virtual void dump(ostream &strm) const
dumps information about this object for debugging purposes