bes
Updated for version 3.20.6
|
A Decorator Pattern for wrapping a libdap::Array in order to change its name efficiently in the face of buggy subclasses we cannot change. More...
#include <RenamedArrayWrapper.h>
Public Member Functions | |
virtual void | add_constraint (Dim_iter i, int start, int stride, int stop) |
Wrappers. More... | |
virtual void | add_var (BaseType *bt, Part part=nil) |
virtual void | add_var_nocopy (BaseType *bt, Part part=nil) |
virtual unsigned int | buf2val (void **val) |
virtual void | clear_constraint () |
virtual bool | deserialize (UnMarshaller &um, DDS *dds, bool reuse=false) |
virtual void | dump (ostream &strm) const |
virtual void | intern_data (ConstraintEvaluator &eval, DDS &dds) |
RenamedArrayWrapper & | operator= (const RenamedArrayWrapper &rhs) |
virtual RenamedArrayWrapper * | ptr_duplicate () |
virtual bool | read () |
virtual bool | read_p () |
RenamedArrayWrapper (const RenamedArrayWrapper &proto) | |
RenamedArrayWrapper (libdap::Array *toBeWrapped) | |
virtual void | reset_constraint () |
virtual bool | send_p () |
virtual bool | serialize (ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval=true) |
virtual void | set_read_p (bool state) |
virtual void | set_send_p (bool state) |
virtual bool | set_value (dods_byte *val, int sz) |
virtual bool | set_value (dods_float32 *val, int sz) |
virtual bool | set_value (dods_float64 *val, int sz) |
virtual bool | set_value (dods_int16 *val, int sz) |
virtual bool | set_value (dods_int32 *val, int sz) |
virtual bool | set_value (dods_int64 *val, int sz) |
virtual bool | set_value (dods_int8 *val, int sz) |
virtual bool | set_value (dods_uint16 *val, int sz) |
virtual bool | set_value (dods_uint32 *val, int sz) |
virtual bool | set_value (dods_uint64 *val, int sz) |
virtual bool | set_value (string *val, int sz) |
virtual bool | set_value (vector< dods_byte > &val, int sz) |
virtual bool | set_value (vector< dods_float32 > &val, int sz) |
virtual bool | set_value (vector< dods_float64 > &val, int sz) |
virtual bool | set_value (vector< dods_int16 > &val, int sz) |
virtual bool | set_value (vector< dods_int32 > &val, int sz) |
virtual bool | set_value (vector< dods_int64 > &val, int sz) |
virtual bool | set_value (vector< dods_int8 > &val, int sz) |
virtual bool | set_value (vector< dods_uint16 > &val, int sz) |
virtual bool | set_value (vector< dods_uint32 > &val, int sz) |
virtual bool | set_value (vector< dods_uint64 > &val, int sz) |
virtual bool | set_value (vector< string > &val, int sz) |
virtual string | toString () |
virtual string | toString () const |
virtual unsigned int | val2buf (void *val, bool reuse=false) |
virtual void * | value () |
virtual void | value (dods_byte *b) const |
virtual void | value (dods_float32 *b) const |
virtual void | value (dods_float64 *b) const |
virtual void | value (dods_int16 *b) const |
virtual void | value (dods_int32 *b) const |
virtual void | value (dods_int64 *b) const |
virtual void | value (dods_int8 *b) const |
virtual void | value (dods_uint16 *b) const |
virtual void | value (dods_uint32 *b) const |
virtual void | value (dods_uint64 *b) const |
virtual void | value (vector< string > &b) const |
virtual void | value (vector< unsigned int > *index, vector< string > &b) const |
virtual void | value (vector< unsigned int > *indices, dods_byte *b) const |
virtual void | value (vector< unsigned int > *indices, dods_float32 *b) const |
virtual void | value (vector< unsigned int > *indices, dods_float64 *b) const |
virtual void | value (vector< unsigned int > *indices, dods_int16 *b) const |
virtual void | value (vector< unsigned int > *indices, dods_int32 *b) const |
virtual void | value (vector< unsigned int > *indices, dods_int64 *b) const |
virtual void | value (vector< unsigned int > *indices, dods_int8 *b) const |
virtual void | value (vector< unsigned int > *indices, dods_uint16 *b) const |
virtual void | value (vector< unsigned int > *indices, dods_uint32 *b) const |
virtual void | value (vector< unsigned int > *indices, dods_uint64 *b) const |
virtual BaseType * | var (const string &name, btp_stack &s) |
virtual BaseType * | var (const string &name="", bool exact_match=true, btp_stack *s=0) |
A Decorator Pattern for wrapping a libdap::Array in order to change its name efficiently in the face of buggy subclasses we cannot change.
Unfortunately, this is needed to get around problems with subclasses requiring the old name for lazy loads even though set_name was called. This causes them to exception, which is bad. In particular, NCArray doesn't handle set_name properly and will fail to serialize.
Rather than seek out and make changes to fix these bugs, the temporary solution will be to wrap the Array to rename in this class. Almost all virtual functions will be passed through to the wrapped array, which will retain its original name for purposes of read(), but will be forced to use the new name when serializing.
Definition at line 60 of file RenamedArrayWrapper.h.
ncml_module::RenamedArrayWrapper::RenamedArrayWrapper | ( | libdap::Array * | toBeWrapped | ) |
Hand off the given Array* to be wrapped by this class. The memory is relinquished to this class.
Definition at line 59 of file RenamedArrayWrapper.cc.
|
virtual |
Wrappers.
Definition at line 94 of file RenamedArrayWrapper.cc.
|
virtual |
Definition at line 107 of file RenamedArrayWrapper.cc.