35#include "BESResponseHandler.h"
36#include "BESResponseNames.h"
37#include "BESVersionInfo.h"
38#include "BESTextInfo.h"
39#include "BESConstraintFuncs.h"
40#include "BESInternalError.h"
42#include "SampleRequestHandler.h"
43#include "SampleResponseNames.h"
50SampleRequestHandler::SampleRequestHandler(
const string &name) :
53 add_method( VERS_RESPONSE, SampleRequestHandler::sample_build_vers);
54 add_method( HELP_RESPONSE, SampleRequestHandler::sample_build_help);
57SampleRequestHandler::~SampleRequestHandler()
66 BESVersionInfo *info =
dynamic_cast<BESVersionInfo *
>(response);
67 if (!info)
throw BESInternalError(
"cast error", __FILE__, __LINE__);
68 info->add_module( PACKAGE_NAME, PACKAGE_VERSION);
78 BESInfo *info =
dynamic_cast<BESInfo *
>(response);
79 if (!info)
throw BESInternalError(
"cast error", __FILE__, __LINE__);
81 map<string, string, std::less<>> attrs;
82 attrs[
"name"] = PACKAGE_NAME;
83 attrs[
"version"] = PACKAGE_VERSION;
84 info->begin_tag(
"module", &attrs);
86 info->end_tag(
"module");
93 strm << BESIndent::LMarg <<
"SampleRequestHandler::dump - (" << (
void *)
this <<
")" << endl;
96 BESIndent::UnIndent();
Structure storing information used by the BES to handle the request.
virtual void add_data_from_file(const std::string &key, const std::string &name)
add data from a file to the informational object.
Represents a specific data type request handler.
virtual void dump(std::ostream &strm) const
dumps information about this object
virtual BESResponseObject * get_response_object()
return the current response object
virtual void dump(std::ostream &strm) const
dumps information about this object