31 #include "AggMemberDatasetUsingLocationRef.h"
33 #include "BESDataDDSResponse.h"
35 #include "NCMLDebug.h"
38 #include "BESStopWatch.h"
42 AggMemberDatasetUsingLocationRef::AggMemberDatasetUsingLocationRef(
const std::string& locationToLoad,
44 AggMemberDatasetWithDimensionCacheBase(locationToLoad), _loader(loaderToUse), _pDataResponse(0)
48 AggMemberDatasetUsingLocationRef::~AggMemberDatasetUsingLocationRef()
53 AggMemberDatasetUsingLocationRef::AggMemberDatasetUsingLocationRef(
const AggMemberDatasetUsingLocationRef& proto) :
54 RCObjectInterface(), AggMemberDatasetWithDimensionCacheBase(proto), _loader(proto._loader), _pDataResponse(0)
58 AggMemberDatasetUsingLocationRef&
59 AggMemberDatasetUsingLocationRef::operator=(
const AggMemberDatasetUsingLocationRef& that)
65 AggMemberDatasetWithDimensionCacheBase::operator=(that);
72 AggMemberDatasetUsingLocationRef::getDDS()
75 if (!_pDataResponse) {
80 pDDSRet = _pDataResponse->get_dds();
86 void 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);
114 void AggMemberDatasetUsingLocationRef::cleanup() throw ()
116 SAFE_DELETE(_pDataResponse);
119 void 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...