32#include "AggMemberDatasetUsingLocationRef.h"
34#include "BESDataDDSResponse.h"
35#include <libdap/DDS.h>
40#include "BESStopWatch.h"
46AggMemberDatasetUsingLocationRef::AggMemberDatasetUsingLocationRef(
const std::string& locationToLoad,
48 AggMemberDatasetWithDimensionCacheBase(locationToLoad), _loader(loaderToUse), _pDataResponse(0)
52AggMemberDatasetUsingLocationRef::~AggMemberDatasetUsingLocationRef()
57AggMemberDatasetUsingLocationRef::AggMemberDatasetUsingLocationRef(
const AggMemberDatasetUsingLocationRef& proto) :
58 RCObjectInterface(), AggMemberDatasetWithDimensionCacheBase(proto), _loader(proto._loader)
62AggMemberDatasetUsingLocationRef&
63AggMemberDatasetUsingLocationRef::operator=(
const AggMemberDatasetUsingLocationRef& that)
69 AggMemberDatasetWithDimensionCacheBase::operator=(that);
76AggMemberDatasetUsingLocationRef::getDDS()
79 if (!_pDataResponse) {
84 pDDSRet = _pDataResponse->get_dds();
90void AggMemberDatasetUsingLocationRef::loadDDS()
96 if (getLocation().empty()) {
97 THROW_NCML_INTERNAL_ERROR(
"AggMemberDatasetUsingLocationRef():"
98 " got empty location! Cannot load!");
106 NCML_ASSERT_MSG(_pDataResponse,
107 "AggMemberDatasetUsingLocationRef::loadDDS(): failed to get a BESDataDDSResponse back while loading location="
112 (void) newResponse.release();
114 BESDEBUG(
"ncml",
"Loading loadDDS for aggregation member location = " << getLocation() << endl);
115 _loader.loadInto(getLocation(), DDSLoader::eRT_RequestDataDDS, _pDataResponse);
118void AggMemberDatasetUsingLocationRef::cleanup() noexcept
120 SAFE_DELETE(_pDataResponse);
123void AggMemberDatasetUsingLocationRef::copyRepFrom(
const AggMemberDatasetUsingLocationRef& rhs)
125 _loader = rhs._loader;
126 _pDataResponse =
nullptr;
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)
static std::unique_ptr< BESDapResponse > makeResponseForType(ResponseType type)
Helper class for temporarily hijacking an existing dhi to load a DDX response for one particular file...