bes
Updated for version 3.20.6
|
Public Types | |
enum | ResponseType { eRT_RequestDDX = 0, eRT_RequestDataDDS, eRT_Num } |
Public Member Functions | |
void | cleanup () |
restore dhi to clean state More... | |
DDSLoader (BESDataHandlerInterface &dhi) | |
Create a loader that will hijack dhi on a load call, then restore it's state. More... | |
DDSLoader (const DDSLoader &proto) | |
BESDataHandlerInterface & | getDHI () const |
void | loadInto (const std::string &location, ResponseType type, BESDapResponse *pResponse) |
Load a DDX or DataDDS response into the given pResponse object, which must be non-null. More... | |
DDSLoader & | operator= (const DDSLoader &) |
virtual | ~DDSLoader () |
Dtor restores the state of dhi Restores the state of the dhi to what it was when object if it is still hijacked (i.e. exception on load()) Destroys the BESDDSResponse if non-null, which is also the case on failed load() call. More... | |
Static Public Member Functions | |
static bool | checkResponseIsValidType (ResponseType type, BESDapResponse *pResponse) |
static std::string | getActionForType (ResponseType type) |
static std::string | getActionNameForType (ResponseType type) |
static std::auto_ptr< BESDapResponse > | makeResponseForType (ResponseType type) |
Definition at line 62 of file DDSLoader.h.
For telling the loader what type of BESDapResponse to load and return. It can handle a DDX load or a DataDDS load. The returned BesDapResponse will be of the proper subclass.
Definition at line 94 of file DDSLoader.h.
DDSLoader::DDSLoader | ( | BESDataHandlerInterface & | dhi | ) |
Create a loader that will hijack dhi on a load call, then restore it's state.
dhi | DHI to hijack during load, needs to be a valid object for the scope of this object's life. |
Definition at line 73 of file DDSLoader.cc.
|
virtual |
Dtor restores the state of dhi Restores the state of the dhi to what it was when object if it is still hijacked (i.e. exception on load()) Destroys the BESDDSResponse if non-null, which is also the case on failed load() call.
Definition at line 131 of file DDSLoader.cc.
|
static |
Return whether the given response's type matches the given ResposneType. If type==eRT_RequestDDX, pResponse must be BESDDSResponse If type==eRT_RequeastDataDDS, pResponse must be BESDataDDSResponse
Definition at line 472 of file DDSLoader.cc.
void DDSLoader::cleanup | ( | ) |
restore dhi to clean state
Ensures that the resources and dhi are all in the state they were at construction time. Probably not needed by users, but in case they want to catch an exception and then retry or something
Definition at line 256 of file DDSLoader.cc.
|
static |
Convert the type into the action in BESResponseNames.h for the type.
type | the response type |
Definition at line 448 of file DDSLoader.cc.
|
static |
Convert the type in the action name in BESResponseNames.h
type | the response type |
Definition at line 460 of file DDSLoader.cc.
|
inline |
Return a reference to the dhi we are using. A little dangerous to bare this rep, so be careful in its usage!
Definition at line 120 of file DDSLoader.h.
void DDSLoader::loadInto | ( | const std::string & | location, |
ResponseType | type, | ||
BESDapResponse * | pResponse | ||
) |
Load a DDX or DataDDS response into the given pResponse object, which must be non-null.
Similar to load(), but the caller passes in the response object to fill rather than wanting a new one.
If type == eRT_RequestDDX, pResponse MUST have type BESDDSReponse. If type == eRT_RequestDataDDS, pResponse MUST have type BESDataDDSResponse.
The location is loaded in pResponse based on the type of response requested.
location | the file to load |
type | the response type requested, must match type of pResponse |
pResponse | the response object to fill in, which must match the request type. |
If | there is a problem loading the location. |
Definition at line 148 of file DDSLoader.cc.
|
static |
Make a new response object for the requested type.
Definition at line 433 of file DDSLoader.cc.