bes Updated for version 3.20.13
agg_util::AggMemberDatasetSharedDDSWrapper Class Reference

#include <AggMemberDatasetSharedDDSWrapper.h>

Collaboration diagram for agg_util::AggMemberDatasetSharedDDSWrapper:
Collaboration graph

Public Member Functions

void addPreDeleteCB (UseCountHitZeroCB *pCB)
 
 AggMemberDatasetSharedDDSWrapper (const AggMemberDatasetSharedDDSWrapper &proto)
 
 AggMemberDatasetSharedDDSWrapper (const DDSAccessRCInterface *pDDSHolder)
 
virtual void fillDimensionCacheByUsingDDS ()
 
virtual void flushDimensionCache ()
 
virtual unsigned int getCachedDimensionSize (const std::string &dimName) const
 
const libdap::DDS * getDDS () override
 
const std::string & getLocation () const
 
virtual int getRefCount () const
 
virtual bool isDimensionCached (const std::string &dimName) const
 
virtual void loadDimensionCache (std::istream &istr)
 
AggMemberDatasetSharedDDSWrapperoperator= (const AggMemberDatasetSharedDDSWrapper &that)
 
virtual int ref () const
 
virtual void removeFromPool () const
 
void removePreDeleteCB (UseCountHitZeroCB *pCB)
 
virtual void saveDimensionCache (std::ostream &ostr)
 
virtual void setDimensionCacheFor (const Dimension &dim, bool throwIfFound)
 
virtual std::string toString () const
 
virtual int unref () const
 

Detailed Description

class AggMemberDatasetSharedDDSWrapper: concrete subclass of AggMemberDataset designed to hold a ref-counted reference to an object containing a DataDDS (DDSAccessRCInterface).

This allows an object containing an aggregated DDS (DDSAccessRCInterface) to exist outside of its normal scope by letting the wrapper hold a strong (counted) reference to it until the aggregation serialization is complete.

The wrapped DDSAccessRCInterface will be ref() upon construction or being added into this by assignment or copy construction and will be unref() upon destruction or loss of reference via assignment operator.

Definition at line 54 of file AggMemberDatasetSharedDDSWrapper.h.

Constructor & Destructor Documentation

◆ AggMemberDatasetSharedDDSWrapper() [1/3]

agg_util::AggMemberDatasetSharedDDSWrapper::AggMemberDatasetSharedDDSWrapper ( )

Definition at line 36 of file AggMemberDatasetSharedDDSWrapper.cc.

◆ AggMemberDatasetSharedDDSWrapper() [2/3]

agg_util::AggMemberDatasetSharedDDSWrapper::AggMemberDatasetSharedDDSWrapper ( const DDSAccessRCInterface pDDSHolder)
explicit

Definition at line 41 of file AggMemberDatasetSharedDDSWrapper.cc.

◆ ~AggMemberDatasetSharedDDSWrapper()

agg_util::AggMemberDatasetSharedDDSWrapper::~AggMemberDatasetSharedDDSWrapper ( )
override

Definition at line 49 of file AggMemberDatasetSharedDDSWrapper.cc.

◆ AggMemberDatasetSharedDDSWrapper() [3/3]

agg_util::AggMemberDatasetSharedDDSWrapper::AggMemberDatasetSharedDDSWrapper ( const AggMemberDatasetSharedDDSWrapper proto)

Definition at line 55 of file AggMemberDatasetSharedDDSWrapper.cc.

Member Function Documentation

◆ addPreDeleteCB()

void agg_util::RCObject::addPreDeleteCB ( UseCountHitZeroCB pCB)
inherited

Add uniquely. If it is added agan, the second time is ignored.

Definition at line 129 of file RCObject.cc.

◆ fillDimensionCacheByUsingDDS()

void agg_util::AggMemberDatasetWithDimensionCacheBase::fillDimensionCacheByUsingDDS ( )
virtualinherited

Uses the getDDS() call in order to find all named dimensions within it and to seed them into the dimension cache table for faster later lookups. Potentially slow!

Implements agg_util::AggMemberDataset.

Definition at line 146 of file AggMemberDatasetWithDimensionCacheBase.cc.

◆ flushDimensionCache()

void agg_util::AggMemberDatasetWithDimensionCacheBase::flushDimensionCache ( )
virtualinherited

Flush out any cache for the Dimensions so that it will have to be loaded.

Implements agg_util::AggMemberDataset.

Definition at line 161 of file AggMemberDatasetWithDimensionCacheBase.cc.

◆ getCachedDimensionSize()

unsigned int agg_util::AggMemberDatasetWithDimensionCacheBase::getCachedDimensionSize ( const std::string &  dimName) const
virtualinherited

Get the size of the given dimension named dimName cached within the dataset. If not found in cache, throws.

If a cached value exists from a prior load of the DDS using loadDimensionCacheFromDDS() or from a call to setDimensionCacheFor(), return that.

Otherwise, this must load the DDS to get the values.

Implementation is left up to subclasses for efficiency.

Returns
the size of the dimension if found
Exceptions
agg_util::DimensionNotFoundExceptionif not located via any means.

Implements agg_util::AggMemberDataset.

Definition at line 102 of file AggMemberDatasetWithDimensionCacheBase.cc.

◆ getDDS()

const libdap::DDS * agg_util::AggMemberDatasetSharedDDSWrapper::getDDS ( )
overridevirtual

Access via the wrapped DDSAccessRCInterface. If the wrapped DDS is NOT a DataDDS, we return NULL!

Returns
null or the wrapped DataDDS

Implements agg_util::AggMemberDataset.

Definition at line 77 of file AggMemberDatasetSharedDDSWrapper.cc.

◆ getLocation()

const std::string & agg_util::AggMemberDataset::getLocation ( ) const
inherited

The location to which the AggMemberDataset refers Note: this could be "" for some subclasses if they are virtual or nested

Definition at line 56 of file AggMemberDataset.cc.

◆ getRefCount()

int agg_util::RCObject::getRefCount ( ) const
virtualinherited

Get the current reference count

Implements agg_util::RCObjectInterface.

Definition at line 101 of file RCObject.cc.

◆ isDimensionCached()

bool agg_util::AggMemberDatasetWithDimensionCacheBase::isDimensionCached ( const std::string &  dimName) const
virtualinherited

Return whether the dimension is already cached, or would have to be loaded to be found.

Implements agg_util::AggMemberDataset.

Definition at line 116 of file AggMemberDatasetWithDimensionCacheBase.cc.

◆ loadDimensionCache()

void agg_util::AggMemberDatasetWithDimensionCacheBase::loadDimensionCache ( std::istream &  istr)
virtualinherited

Load the values in the dimension cache from the input stream

Implements agg_util::AggMemberDataset.

Definition at line 173 of file AggMemberDatasetWithDimensionCacheBase.cc.

◆ operator=()

AggMemberDatasetSharedDDSWrapper & agg_util::AggMemberDatasetSharedDDSWrapper::operator= ( const AggMemberDatasetSharedDDSWrapper that)

Definition at line 62 of file AggMemberDatasetSharedDDSWrapper.cc.

◆ ref()

int agg_util::RCObject::ref ( ) const
virtualinherited

Increase the reference count by one. const since we do not consider the ref count part of the semantic constness of the rep

Implements agg_util::RCObjectInterface.

Definition at line 71 of file RCObject.cc.

◆ removeFromPool()

void agg_util::RCObject::removeFromPool ( ) const
virtualinherited

If the object is in an auto-delete pool, remove it from the pool and force it to only delete when it's ref count goes to 0. Useful when we desire a particular object stay around outside of the pool's lifetime.

Implements agg_util::RCObjectInterface.

Definition at line 106 of file RCObject.cc.

◆ removePreDeleteCB()

void agg_util::RCObject::removePreDeleteCB ( UseCountHitZeroCB pCB)
inherited

Remove it exists. If not, this unchanged.

Definition at line 142 of file RCObject.cc.

◆ saveDimensionCache()

void agg_util::AggMemberDatasetWithDimensionCacheBase::saveDimensionCache ( std::ostream &  ostr)
virtualinherited

Append the values in the dimension cache to the output stream

Implements agg_util::AggMemberDataset.

Definition at line 167 of file AggMemberDatasetWithDimensionCacheBase.cc.

◆ setDimensionCacheFor()

void agg_util::AggMemberDatasetWithDimensionCacheBase::setDimensionCacheFor ( const Dimension dim,
bool  throwIfFound 
)
virtualinherited

Seed the dimension cache using the given dimension, so that later calls to getDimensionSize for dim.name will return the dim.size immediately without checking or loading the actual DDS.

If it already exists and throwIfFound then will throw an AggregationException.

If it exists and !throwIfFound, will replace the old one.

Parameters
dimthe dimension to seed
iftrue, throw if name take. Else replace original.

Implements agg_util::AggMemberDataset.

Definition at line 122 of file AggMemberDatasetWithDimensionCacheBase.cc.

◆ toString()

◆ unref()

int agg_util::RCObject::unref ( ) const
virtualinherited

Decrease the reference count by one. If it goes from 1 to 0, delete this and this is no longer valid.

Returns
the new ref count. If it is 0, the caller knows the object was deleted.

It is illegal to unref() an object with a count of 0. We don't throw to allow use in dtors, so the caller is assumed not to do it!

const since the reference count is not part of the semantic constness of the rep

Implements agg_util::RCObjectInterface.

Definition at line 78 of file RCObject.cc.


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