OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
agg_util::GridAggregationBase Class Referenceabstract

#include <GridAggregationBase.h>

Inheritance diagram for agg_util::GridAggregationBase:
Inheritance graph
Collaboration diagram for agg_util::GridAggregationBase:
Collaboration graph

Public Member Functions

virtual const AMDListgetDatasetList () const
 Accessor for the dataset description list that describes this aggregation. More...
 
 GridAggregationBase (const libdap::Grid &proto, const AMDList &memberDatasets, const DDSLoader &loaderProto)
 
 GridAggregationBase (const string &name, const AMDList &memberDatasets, const DDSLoader &loaderProto)
 Construct an EMPTY Grid structure with given name. More...
 
 GridAggregationBase (const GridAggregationBase &proto)
 
GridAggregationBaseoperator= (const GridAggregationBase &rhs)
 
virtual bool read ()
 Read in only those datasets that are in the constrained output making sure to apply the internal dimension constraints to the member datasets properly before reading them! Stream the data into the output buffer correctly. More...
 
void setShapeFrom (const libdap::Grid &protoSubGrid, bool addMaps)
 Use the data array and maps from protoSubGrid as the initial point for the shape of the Grid. More...
 
BaseType * transform_to_dap4 (libdap::D4Group *root, libdap::Constructor *container)
 
virtual ~GridAggregationBase ()
 

Protected Member Functions

void copyProtoMapsIntoThisGrid (const Dimension &aggDim)
 Copy the template's read in subgrid maps into this. More...
 
virtual const DimensiongetAggregationDimension () const =0
 Get the contained aggregation dimension info. More...
 
Grid * getSubGridTemplate ()
 Reveals the raw ptr, but only to subclasses. More...
 
void printConstraints (const libdap::Array &fromArray)
 
virtual void readAndAggregateConstrainedMapsHook ()
 Called from read()! Invokes the user hooks eventually. More...
 
void readProtoSubGrid ()
 Transfer constraints properly from this object's maps and read in the proto subgrid entirely (respecting constraints) More...
 
virtual void transferConstraintsToSubGridHook (Grid *pSubGrid)
 To be specialized in subclass to copy constraints on this object properly into the given pSubGrid map list and data array for read. More...
 

Detailed Description

Definition at line 48 of file GridAggregationBase.h.

Constructor & Destructor Documentation

agg_util::GridAggregationBase::GridAggregationBase ( const libdap::Grid &  proto,
const AMDList memberDatasets,
const DDSLoader loaderProto 
)

Definition at line 57 of file GridAggregationBase.cc.

agg_util::GridAggregationBase::GridAggregationBase ( const string &  name,
const AMDList memberDatasets,
const DDSLoader loaderProto 
)

Construct an EMPTY Grid structure with given name.

NOTE: The result is an incomplete type!

The shape prototype will be added by hand later for this case, where the caller needs more control than initializing the Grid from another Grid.

See also
setShapeFrom()
Parameters
namename to give the grid
memberDatasetsthe granules defining the aggregation
loaderProtothe laoder to use
agg_util::GridAggregationBase::GridAggregationBase ( const GridAggregationBase proto)

Definition at line 79 of file GridAggregationBase.cc.

agg_util::GridAggregationBase::~GridAggregationBase ( )
virtual

Definition at line 89 of file GridAggregationBase.cc.

Member Function Documentation

void agg_util::GridAggregationBase::copyProtoMapsIntoThisGrid ( const Dimension aggDim)
protected

Copy the template's read in subgrid maps into this.

Skip any map found in the subgrid named aggDim.name since we handle the aggregation dimension map specially.

Parameters
aggDima map with aggDim.name is NOT copied.

Definition at line 305 of file GridAggregationBase.cc.

References BESDEBUG_FUNC, agg_util::AggregationUtil::findMapByName(), getSubGridTemplate(), agg_util::Dimension::name, NCML_ASSERT_MSG, printConstraints(), and VALID_PTR.

Referenced by readAndAggregateConstrainedMapsHook().

Here is the call graph for this function:

virtual const Dimension& agg_util::GridAggregationBase::getAggregationDimension ( ) const
protectedpure virtual

Get the contained aggregation dimension info.

Implemented in agg_util::GridAggregateOnOuterDimension, and agg_util::GridJoinExistingAggregation.

Referenced by readAndAggregateConstrainedMapsHook().

const AMDList & agg_util::GridAggregationBase::getDatasetList ( ) const
virtual

Accessor for the dataset description list that describes this aggregation.

Returns
a reference to the AggMemberDataset list.

Definition at line 185 of file GridAggregationBase.cc.

Referenced by agg_util::GridJoinExistingAggregation::makeAggregatedOuterMapVector().

Grid * agg_util::GridAggregationBase::getSubGridTemplate ( )
protected

Reveals the raw ptr, but only to subclasses.

Don't delete it, but can be changed etc.

Definition at line 230 of file GridAggregationBase.cc.

Referenced by copyProtoMapsIntoThisGrid(), agg_util::GridJoinExistingAggregation::makeAggregatedOuterMapVector(), and readProtoSubGrid().

GridAggregationBase & agg_util::GridAggregationBase::operator= ( const GridAggregationBase rhs)
void agg_util::GridAggregationBase::printConstraints ( const libdap::Array &  fromArray)
protected

Definition at line 277 of file GridAggregationBase.cc.

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

Referenced by copyProtoMapsIntoThisGrid(), and read().

Here is the call graph for this function:

bool agg_util::GridAggregationBase::read ( )
virtual

Read in only those datasets that are in the constrained output making sure to apply the internal dimension constraints to the member datasets properly before reading them! Stream the data into the output buffer correctly.

NOTE: Subclasses should implement the protected hooks if possible rather than overriding this function!

Returns
success.

Definition at line 192 of file GridAggregationBase.cc.

References BESDEBUG_FUNC, printConstraints(), readAndAggregateConstrainedMapsHook(), and VALID_PTR.

Here is the call graph for this function:

void agg_util::GridAggregationBase::readAndAggregateConstrainedMapsHook ( )
protectedvirtual

Called from read()! Invokes the user hooks eventually.

Can be overridden, but default calls should suffice for now.

Definition at line 259 of file GridAggregationBase.cc.

References copyProtoMapsIntoThisGrid(), getAggregationDimension(), and readProtoSubGrid().

Referenced by read().

Here is the call graph for this function:

void agg_util::GridAggregationBase::readProtoSubGrid ( )
protected

Transfer constraints properly from this object's maps and read in the proto subgrid entirely (respecting constraints)

Definition at line 285 of file GridAggregationBase.cc.

References getSubGridTemplate(), transferConstraintsToSubGridHook(), and VALID_PTR.

Referenced by readAndAggregateConstrainedMapsHook().

Here is the call graph for this function:

void agg_util::GridAggregationBase::setShapeFrom ( const libdap::Grid &  protoSubGrid,
bool  addMaps 
)

Use the data array and maps from protoSubGrid as the initial point for the shape of the Grid.

It may still not be complete until the callers adds maps, etc.

Parameters
protoSubGriddescribes the data array and map templates to use for the granules (modulo any agg subclass changes).
addMapsif true, add's all the maps in protoSubGrid into this. if false, does not.

Definition at line 153 of file GridAggregationBase.cc.

References VALID_PTR.

void agg_util::GridAggregationBase::transferConstraintsToSubGridHook ( Grid *  pSubGrid)
protectedvirtual

To be specialized in subclass to copy constraints on this object properly into the given pSubGrid map list and data array for read.

Should handle the aggregation dimension properly, hence the specialization.

Called from readProtoSubGrid

Parameters
pSubGridGrid to modify with the constraints

Reimplemented in agg_util::GridAggregateOnOuterDimension, and agg_util::GridJoinExistingAggregation.

Definition at line 373 of file GridAggregationBase.cc.

References THROW_NCML_INTERNAL_ERROR.

Referenced by readProtoSubGrid().

BaseType * agg_util::GridAggregationBase::transform_to_dap4 ( libdap::D4Group *  root,
libdap::Constructor *  container 
)

Definition at line 108 of file GridAggregationBase.cc.


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