libdap++ Updated for version 3.8.2
|
Look at refactoring this by splitting it into three classes. Move the struct entry into its own calls (maybe called Attribute?), make AttrTable a child of that class and then make aliases a separate class, also a child of Attribute. Look at the design of the Java code.
A problem with this class is that Attr_iter objects cannot be dereferenced to return attributes. Instead they must be passed to methods which require that you have access to the AttrTable object into which they point.03/09/04 jhrg
dods_byte Byte::value()
. Sure you have to downcast from BaseType to Byte in order to use it, but you have to figure out you have a Byte to use Byte::buf2val() anyway, so what's the big deal? Having a method that returns the value would simplify code that reads from data sets to extract meta data (like lat/lon corner points, et c.).This should throw an exception on error!!!
These methods that use the btp_stack to keep track of the path from the top of a dataset to a particular variable can be rewritten to use the parent field instead.
All the methods that use names to identify variables should have counterparts that take BaseType pointers.
These methods that use the btp_stack to keep track of the path from the top of a dataset to a particular variable can be rewritten to use the parent field instead.
All the methods that use names to identify variables should have counterparts that take BaseType pointers.
Add a test to make sure that the required arguments are given.
We need to rethink the ancillary file/directory stuff. I don't think it's ever been used...
Move, in some sense, the _map_vars up to Constructor. Look at using Constructor's _var field for these.
Along the same lines as the previous item, consider removing the Part enum and adopting the convention that the first variable added is the array and any subsequent variables are maps.
Update documentation: get_cache_response() now also serves as is_url_in_cache() and is_url_valid() should only be called after a locked cached response is accessed using get_cahced_response(). These lock the cache for reading. The methods cache_response() and update_response() lock an entry for writing.
Check that the lock-for-write and lock-for-read work together since it's possible that an entry in use might have a stream of readers and never free the 'read-lock' thus blocking a writer.
Refactor along with Structure moving methods up into Constructor.
Add an isEmpty() method which returns true if the Sequence is empty. This should work before and after calling deserialize().