bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
ncml_module::NCMLBaseArray Class Referenceabstract
Inheritance diagram for ncml_module::NCMLBaseArray:
Inheritance graph
Collaboration diagram for ncml_module::NCMLBaseArray:
Collaboration graph

Public Member Functions

virtual void cacheCurrentConstraints ()
 
virtual void cacheSuperclassStateIfNeeded ()
 
virtual void cacheUnconstrainedDimensions ()
 
virtual void cacheValuesIfNeeded ()=0
 
virtual void copyDataFrom (libdap::Array &from)=0
 
virtual void createAndSetConstrainedValueBuffer ()=0
 
virtual Shape getSuperShape () const
 
virtual bool haveConstraintsChangedSinceLastRead () const
 
virtual bool isConstrained () const
 
virtual bool isDataCached () const =0
 
 NCMLBaseArray (const NCMLBaseArray &proto)
 
 NCMLBaseArray (const std::string &name)
 
NCMLBaseArrayoperator= (const NCMLBaseArray &rhs)
 
virtual bool read ()
 
virtual bool read_p ()
 
virtual void set_read_p (bool state)
 

Protected Attributes

Shape_currentConstraints
 
Shape_noConstraints
 

Detailed Description

Definition at line 43 of file NCMLBaseArray.h.

Constructor & Destructor Documentation

◆ NCMLBaseArray() [1/3]

ncml_module::NCMLBaseArray::NCMLBaseArray ( )

Definition at line 81 of file NCMLBaseArray.cc.

◆ NCMLBaseArray() [2/3]

ncml_module::NCMLBaseArray::NCMLBaseArray ( const std::string & name)
explicit

Definition at line 87 of file NCMLBaseArray.cc.

◆ NCMLBaseArray() [3/3]

ncml_module::NCMLBaseArray::NCMLBaseArray ( const NCMLBaseArray & proto)
explicit

Definition at line 92 of file NCMLBaseArray.cc.

◆ ~NCMLBaseArray()

ncml_module::NCMLBaseArray::~NCMLBaseArray ( )
virtual

Definition at line 98 of file NCMLBaseArray.cc.

Member Function Documentation

◆ cacheCurrentConstraints()

void ncml_module::NCMLBaseArray::cacheCurrentConstraints ( )
virtual

Store the current super Array shape as the current constraints so we remember

Definition at line 176 of file NCMLBaseArray.cc.

◆ cacheSuperclassStateIfNeeded()

void ncml_module::NCMLBaseArray::cacheSuperclassStateIfNeeded ( )
virtual

Required by subclasses to copy the original data values locally

Definition at line 201 of file NCMLBaseArray.cc.

◆ cacheUnconstrainedDimensions()

void ncml_module::NCMLBaseArray::cacheUnconstrainedDimensions ( )
virtual

Definition at line 187 of file NCMLBaseArray.cc.

◆ cacheValuesIfNeeded()

virtual void ncml_module::NCMLBaseArray::cacheValuesIfNeeded ( )
pure virtual

Must copy the unconstrained current values of the proper type within Vector into the local instance.

Implemented in ncml_module::NCMLArray< T >.

◆ copyDataFrom()

virtual void ncml_module::NCMLBaseArray::copyDataFrom ( libdap::Array & from)
pure virtual

Copy the data values from the given array, assuming the type matches the template type T of the subclass. If not, then exception.

Implemented in ncml_module::NCMLArray< T >.

◆ createAndSetConstrainedValueBuffer()

virtual void ncml_module::NCMLBaseArray::createAndSetConstrainedValueBuffer ( )
pure virtual

Given the current Shape of the Array, generate the constrained value buffer and set it into the Vector superclass rep for proper serialize().

Implemented in ncml_module::NCMLArray< T >.

◆ getSuperShape()

Shape ncml_module::NCMLBaseArray::getSuperShape ( ) const
virtual

Get the current dimensions of our superclass Array as a Shape object.

Definition at line 152 of file NCMLBaseArray.cc.

◆ haveConstraintsChangedSinceLastRead()

bool ncml_module::NCMLBaseArray::haveConstraintsChangedSinceLastRead ( ) const
virtual

Return whether the constraints used to create Vector._buf for the last read() have changed, meaning we need to recompute Vector._buf using the new values.

Definition at line 164 of file NCMLBaseArray.cc.

◆ isConstrained()

bool ncml_module::NCMLBaseArray::isConstrained ( ) const
virtual

Return whether the superclass Array has been constrained along any dimensions.

Definition at line 158 of file NCMLBaseArray.cc.

◆ isDataCached()

virtual bool ncml_module::NCMLBaseArray::isDataCached ( ) const
pure virtual
Returns
whether we have the unconstrained data cached yet.

Implemented in ncml_module::NCMLArray< T >.

◆ operator=()

NCMLBaseArray & ncml_module::NCMLBaseArray::operator= ( const NCMLBaseArray & rhs)

Definition at line 104 of file NCMLBaseArray.cc.

◆ read()

bool ncml_module::NCMLBaseArray::read ( )
virtual

If there are no constraints and this is the first call to read(), we will do nothing, assuming the sueprclasses have everything under control.

If there are constraints, this function will create the correct buffer in Vector with the constrained data, generated from cached local values gathered to be from the unconstrained state.

The first call to read() will assume the CURRENT Vector buffer has ALL values (unconstrained) and store a local copy before generating a Vector buffer for the current constraints.

After this call, the caller can be assured that the Vector's data buffer has properly constrained data matching the current super Array's constraints. Subsequent calls to read() will see if the constraints used to create the Vector data buffer have changed and if so recompute a new Vector buffer from the locally cached values.

Definition at line 132 of file NCMLBaseArray.cc.

◆ read_p()

bool ncml_module::NCMLBaseArray::read_p ( )
virtual

Override to return false if we have uncomputed constraints and only true if the current constraints match the Vector value buffer.

Definition at line 119 of file NCMLBaseArray.cc.

◆ set_read_p()

void ncml_module::NCMLBaseArray::set_read_p ( bool state)
virtual

Override to disable setting of this flag. We will leave it false unless the constraints match the Vector value buffer.

Definition at line 126 of file NCMLBaseArray.cc.

Member Data Documentation

◆ _currentConstraints

Shape* ncml_module::NCMLBaseArray::_currentConstraints
protected

Definition at line 162 of file NCMLBaseArray.h.

◆ _noConstraints

Shape* ncml_module::NCMLBaseArray::_noConstraints
protected

Definition at line 158 of file NCMLBaseArray.h.


The documentation for this class was generated from the following files: