31#include "AggMemberDatasetUsingLocationRef.h"
33#include "BESDataDDSResponse.h"
34#include <libdap/DDS.h>
38#include "BESStopWatch.h"
42AggMemberDatasetUsingLocationRef::AggMemberDatasetUsingLocationRef(
const std::string& locationToLoad,
44 AggMemberDatasetWithDimensionCacheBase(locationToLoad), _loader(loaderToUse), _pDataResponse(0)
48AggMemberDatasetUsingLocationRef::~AggMemberDatasetUsingLocationRef()
53AggMemberDatasetUsingLocationRef::AggMemberDatasetUsingLocationRef(
const AggMemberDatasetUsingLocationRef& proto) :
54 RCObjectInterface(), AggMemberDatasetWithDimensionCacheBase(proto), _loader(proto._loader), _pDataResponse(0)
58AggMemberDatasetUsingLocationRef&
59AggMemberDatasetUsingLocationRef::operator=(
const AggMemberDatasetUsingLocationRef& that)
65 AggMemberDatasetWithDimensionCacheBase::operator=(that);
72AggMemberDatasetUsingLocationRef::getDDS()
75 if (!_pDataResponse) {
80 pDDSRet = _pDataResponse->get_dds();
86void AggMemberDatasetUsingLocationRef::loadDDS()
92 if (getLocation().empty()) {
93 THROW_NCML_INTERNAL_ERROR(
"AggMemberDatasetUsingLocationRef():"
94 " got empty location! Cannot load!");
98 std::auto_ptr<BESDapResponse> newResponse = _loader.makeResponseForType(DDSLoader::eRT_RequestDataDDS);
102 NCML_ASSERT_MSG(_pDataResponse,
103 "AggMemberDatasetUsingLocationRef::loadDDS(): failed to get a BESDataDDSResponse back while loading location="
108 newResponse.release();
110 BESDEBUG(
"ncml",
"Loading loadDDS for aggregation member location = " << getLocation() << endl);
111 _loader.loadInto(getLocation(), DDSLoader::eRT_RequestDataDDS, _pDataResponse);
114void AggMemberDatasetUsingLocationRef::cleanup() throw ()
116 SAFE_DELETE(_pDataResponse);
119void AggMemberDatasetUsingLocationRef::copyRepFrom(
const AggMemberDatasetUsingLocationRef& rhs)
121 _loader = rhs._loader;
Represents an OPeNDAP DataDDS DAP2 data object within the BES.
static bool IsSet(const std::string &flagName)
see if the debug context flagName is set to true
virtual bool start(std::string name)
Helper class for temporarily hijacking an existing dhi to load a DDX response for one particular file...