OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
agg_util::ArrayAggregationBase Class Reference

Base class for subclasses of libdap::Array which perform aggregation on a list of AggMemberDatasets when asked. More...

#include <ArrayAggregationBase.h>

Inheritance diagram for agg_util::ArrayAggregationBase:
Inheritance graph
Collaboration diagram for agg_util::ArrayAggregationBase:
Collaboration graph

Public Member Functions

 ArrayAggregationBase (const libdap::Array &granuleProto, const AMDList &memberDatasets, std::auto_ptr< ArrayGetterInterface > &arrayGetter)
 Construct the base class using the given parameters. More...
 
 ArrayAggregationBase (const ArrayAggregationBase &rhs)
 
const AMDListgetDatasetList () const
 Get the list of AggMemberDataset's that comprise this aggregation. More...
 
ArrayAggregationBaseoperator= (const ArrayAggregationBase &rhs)
 
virtual ArrayAggregationBaseptr_duplicate ()
 virtual constructor i.e. More...
 
virtual bool read ()
 Base implementation that works for both joinNew and joinExisting. More...
 
virtual ~ArrayAggregationBase ()
 

Protected Member Functions

const ArrayGetterInterfacegetArrayGetterInterface () const
 Accessor for subclasses Note this is protected, so not const! Subclasses may mutate the return hence this, but should not delete it, hence the reference. More...
 
libdap::Array & getGranuleTemplateArray ()
 Accessor for subclasses Note this is protected, so not const! Subclasses may mutate the return hence this, but should not delete it, hence the reference. More...
 
void printConstraints (const Array &fromArray)
 Print out the constraints on fromArray to the debug channel. More...
 
virtual void readConstrainedGranuleArraysAndAggregateDataHook ()
 The meat of the subclass impl of read(). More...
 
virtual void transferOutputConstraintsIntoGranuleTemplateHook ()
 subclass hook from read() to setup constraints on inner dims correctly More...
 

Detailed Description

Base class for subclasses of libdap::Array which perform aggregation on a list of AggMemberDatasets when asked.

Definition at line 43 of file ArrayAggregationBase.h.

Constructor & Destructor Documentation

agg_util::ArrayAggregationBase::ArrayAggregationBase ( const libdap::Array &  granuleProto,
const AMDList memberDatasets,
std::auto_ptr< ArrayGetterInterface > &  arrayGetter 
)

Construct the base class using the given parameters.

Used for join aggregation concrete subclasses.

Parameters
granulePrototemplate describing the data array of for a granule (member) of the join agg. Note: for joinExisting the array size may not be correct!
memberDatasetsthe granules to use in the agg
arrayGetterauto_ptr to the data array getter for the variable. Note the auto_ptr ref is sunk by the ctor so don't delete/release from the caller.
Returns

Definition at line 43 of file ArrayAggregationBase.cc.

Referenced by ptr_duplicate().

agg_util::ArrayAggregationBase::ArrayAggregationBase ( const ArrayAggregationBase rhs)

Definition at line 54 of file ArrayAggregationBase.cc.

References BESDEBUG.

agg_util::ArrayAggregationBase::~ArrayAggregationBase ( )
virtual

Definition at line 67 of file ArrayAggregationBase.cc.

Member Function Documentation

const ArrayGetterInterface & agg_util::ArrayAggregationBase::getArrayGetterInterface ( ) const
protected

Accessor for subclasses Note this is protected, so not const! Subclasses may mutate the return hence this, but should not delete it, hence the reference.

Definition at line 168 of file ArrayAggregationBase.cc.

References VALID_PTR.

Referenced by agg_util::ArrayJoinExistingAggregation::readConstrainedGranuleArraysAndAggregateDataHook(), and agg_util::ArrayAggregateOnOuterDimension::readConstrainedGranuleArraysAndAggregateDataHook().

const AMDList & agg_util::ArrayAggregationBase::getDatasetList ( ) const
libdap::Array & agg_util::ArrayAggregationBase::getGranuleTemplateArray ( )
protected
ArrayAggregationBase & agg_util::ArrayAggregationBase::operator= ( const ArrayAggregationBase rhs)
void agg_util::ArrayAggregationBase::printConstraints ( const Array &  fromArray)
protected

Print out the constraints on fromArray to the debug channel.

Definition at line 152 of file ArrayAggregationBase.cc.

References BESDEBUG, and agg_util::AggregationUtil::printConstraints().

Referenced by read().

Here is the call graph for this function:

ArrayAggregationBase * agg_util::ArrayAggregationBase::ptr_duplicate ( )
virtual

virtual constructor i.e.

clone

Reimplemented in agg_util::ArrayAggregateOnOuterDimension, and agg_util::ArrayJoinExistingAggregation.

Definition at line 86 of file ArrayAggregationBase.cc.

References ArrayAggregationBase().

Here is the call graph for this function:

bool agg_util::ArrayAggregationBase::read ( )
virtual

Base implementation that works for both joinNew and joinExisting.

Sets ups constraints and things and then calls the subclass helper readAndAggregateGranules() for the specialized subclass behaviors.

Exceptions
Canthrow BESError, minimally
Returns
whether it works

Definition at line 93 of file ArrayAggregationBase.cc.

References BESDEBUG_FUNC, getGranuleTemplateArray(), printConstraints(), readConstrainedGranuleArraysAndAggregateDataHook(), and transferOutputConstraintsIntoGranuleTemplateHook().

Here is the call graph for this function:

void agg_util::ArrayAggregationBase::readConstrainedGranuleArraysAndAggregateDataHook ( )
protectedvirtual

The meat of the subclass impl of read().

Called from read() once this base class state is ready for the granule data.

Reimplemented in agg_util::ArrayAggregateOnOuterDimension, and agg_util::ArrayJoinExistingAggregation.

Definition at line 213 of file ArrayAggregationBase.cc.

References NCML_ASSERT_MSG.

Referenced by read().

void agg_util::ArrayAggregationBase::transferOutputConstraintsIntoGranuleTemplateHook ( )
protectedvirtual

subclass hook from read() to setup constraints on inner dims correctly

Reimplemented in agg_util::ArrayAggregateOnOuterDimension, and agg_util::ArrayJoinExistingAggregation.

Definition at line 203 of file ArrayAggregationBase.cc.

References NCML_ASSERT_MSG.

Referenced by read().


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