52 auto_ptr< NCMLBaseArray >
57 libdap::Array& proto =
const_cast<libdap::Array&
>(protoC);
59 BESDEBUG(
"ncml",
"NCMLBaseArray::createFromArray(): Converting prototype Array name=" + proto.name() +
" into an NCMLArray..." << endl);
61 BaseType* pTemplate = proto.var();
62 NCML_ASSERT_MSG(pTemplate,
"NCMLArray::createFromArray(): got NULL template BaseType var() for proto name=" + proto.name());
65 string ncmlArrayType =
"Array<" + pTemplate->type_name() +
">";
68 auto_ptr< NCMLBaseArray > pNewArray = auto_ptr< NCMLBaseArray > (
dynamic_cast< NCMLBaseArray*
>(pNewBT.release()));
72 pNewArray->copyDataFrom(proto);
80 , _currentConstraints(0)
88 , _currentConstraints(0)
95 , _currentConstraints(0)
97 copyLocalRepFrom(proto);
114 Array::operator=(rhs);
117 copyLocalRepFrom(rhs);
140 BESDEBUG(
"ncml",
"NCMLArray::read() called!" << endl);
258 NCMLBaseArray::destroy() throw ()
virtual Shape getSuperShape() const
Get the current dimensions of our superclass Array as a Shape object.
virtual bool read()
If there are no constraints and this is the first call to read(), we will do nothing, assuming the sueprclasses have everything under control.
virtual bool read_p()
Override to return false if we have uncomputed constraints and only true if the current constraints m...
virtual bool isConstrained() const
Return whether the superclass Array has been constrained along any dimensions.
#define NCML_ASSERT(cond)
An abstract superclass for NCMLArray that handles the non-parameterized functionality and allows u...
virtual void cacheSuperclassStateIfNeeded()
Required by subclasses to copy the original data values locally.
#define NCML_ASSERT_MSG(cond, msg)
void setToUnconstrained()
Go through and set all the values to be the unconstrained values.
A wrapper class for a vector of Array::dimension structs.
virtual void cacheUnconstrainedDimensions()
NCMLBaseArray & operator=(const NCMLBaseArray &rhs)
bool isConstrained() const
Are there constraints on the dimension?
virtual void cacheValuesIfNeeded()=0
Must copy the unconstrained current values of the proper type within Vector into the local instance...
static std::auto_ptr< libdap::BaseType > makeVariable(const libdap::Type &type, const string &name)
Return a new variable of the given type.
Shape * _currentConstraints
virtual void set_read_p(bool state)
Override to disable setting of this flag.
#define BESDEBUG(x, y)
macro used to send debug information to the debug stream
virtual void createAndSetConstrainedValueBuffer()=0
Given the current Shape of the Array, generate the constrained value buffer and set it into the Vecto...
virtual void cacheCurrentConstraints()
Store the current super Array shape as the current constraints so we remember.
virtual bool haveConstraintsChangedSinceLastRead() const
Return whether the constraints used to create Vector._buf for the last read() have changed...
static auto_ptr< NCMLBaseArray > createFromArray(const libdap::Array &proto)
Make a new NCMLArray from the given proto, using the Array interface.