BESDefineCommand Class Reference

#include <BESDefineCommand.h>

Inheritance diagram for BESDefineCommand:

Inheritance graph
[legend]
Collaboration diagram for BESDefineCommand:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BESDefineCommand (const string &cmd)
virtual ~BESDefineCommand ()
virtual string parse_options (BESTokenizer &tokens, BESDataHandlerInterface &dhi)
virtual BESResponseHandlerparse_request (BESTokenizer &tokens, BESDataHandlerInterface &dhi)
 parses the request to build a definition that can be used in other requests, such as get commands.
virtual void dump (ostream &strm) const
 dumps information about this object

Static Public Member Functions

static void add_command (const string &cmd_str, BESCommand *cmd)
static bool del_command (const string &cmd_str)
static BESCommandfind_command (const string &cmd_str)

Static Public Attributes

static BESCommandTermCommand

Protected Attributes

string _cmd

Detailed Description

Definition at line 38 of file BESDefineCommand.h.


Constructor & Destructor Documentation

BESDefineCommand::BESDefineCommand ( const string &  cmd  )  [inline]

Definition at line 43 of file BESDefineCommand.h.

virtual BESDefineCommand::~BESDefineCommand (  )  [inline, virtual]

Definition at line 45 of file BESDefineCommand.h.


Member Function Documentation

string BESDefineCommand::parse_options ( BESTokenizer tokens,
BESDataHandlerInterface dhi 
) [virtual]

Reimplemented from BESCommand.

Definition at line 42 of file BESDefineCommand.cc.

References _BESDataHandlerInterface::data, BESTokenizer::get_next_token(), and SILENT.

Referenced by parse_request().

Here is the call graph for this function:

BESResponseHandler * BESDefineCommand::parse_request ( BESTokenizer tokenizer,
BESDataHandlerInterface dhi 
) [virtual]

parses the request to build a definition that can be used in other requests, such as get commands.

A request looks like:

define <def_name> as <container_list>
  [where <container_x>.constraint="<constraint>"]
  [,<container_x>.attributes="<attrs>"]
  [aggregate by "&lt;aggregation_command&gt;"];

where container_list is a list of containers representing points of data, such as a file. For each container in the container_list the user can specify a constraint and a list of attributes. You need not specify a constraint for a given container or a list of attributes. If just specifying a constraint then leave out the attributes. If just specifying a list of attributes then leave out the constraint. For example:

define d1 as container_1,container_2
  where container_1.constraint="constraint1"
  ,container_2.constraint="constraint2"
  ,container_2.attributes="attr1,attr2";

Parameters:
tokenizer holds on to the list of tokens to be parsed
dhi structure that holds request and response information
Exceptions:
BESParserException if this method is called, as the request string should have already been parsed.
See also:
BESTokenizer

_BESDataHandlerInterface

Implements BESCommand.

Definition at line 94 of file BESDefineCommand.cc.

References BESCommand::_cmd, _BESDataHandlerInterface::action, AGG_CMD, AGG_HANDLER, _BESDataHandlerInterface::container, _BESDataHandlerInterface::containers, _BESDataHandlerInterface::data, DEF_NAME, BESCommand::find_command(), BESResponseHandlerList::find_handler(), _BESDataHandlerInterface::first_container(), BESTokenizer::get_next_token(), BESContainer::get_symbolic_name(), BESContainerStorageList::look_for(), _BESDataHandlerInterface::next_container(), BESTokenizer::parse_container_name(), BESTokenizer::parse_error(), parse_options(), BESCommand::parse_request(), BESTokenizer::remove_quotes(), BESContainer::set_attributes(), BESContainer::set_constraint(), STORE_NAME, BESCommand::TermCommand, BESContainerStorageList::TheList(), BESResponseHandlerList::TheList(), and BESUtil::unescape().

Here is the call graph for this function:

void BESDefineCommand::dump ( ostream &  strm  )  const [virtual]

dumps information about this object

Displays the pointer value of this instance

Parameters:
strm C++ i/o stream to dump the information to

Reimplemented from BESCommand.

Definition at line 305 of file BESDefineCommand.cc.

References BESCommand::dump(), BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().

Here is the call graph for this function:

void BESCommand::add_command ( const string &  cmd_str,
BESCommand cmd 
) [static, inherited]

Definition at line 49 of file BESCommand.cc.

Referenced by TestModule::initialize(), DAPCommandModule::initialize(), and BESDefaultCommands::initialize().

bool BESCommand::del_command ( const string &  cmd_str  )  [static, inherited]

Definition at line 55 of file BESCommand.cc.

References BESCommand::TermCommand.

Referenced by TestModule::terminate(), DAPCommandModule::terminate(), and BESDefaultCommands::terminate().

BESCommand * BESCommand::find_command ( const string &  cmd_str  )  [static, inherited]

Definition at line 75 of file BESCommand.cc.

Referenced by BESCmdParser::parse(), TestCommand::parse_request(), BESShowCommand::parse_request(), BESSetCommand::parse_request(), BESGetCommand::parse_request(), BESDeleteCommand::parse_request(), and parse_request().


Member Data Documentation

string BESCommand::_cmd [protected, inherited]

Definition at line 54 of file BESCommand.h.

Referenced by BESCommand::dump(), TestCommand::parse_request(), BESShowCommand::parse_request(), BESSetCommand::parse_request(), BESGetCommand::parse_request(), BESDeleteCommand::parse_request(), BESDelDefsCommand::parse_request(), BESDelDefCommand::parse_request(), BESDelContainersCommand::parse_request(), BESDelContainerCommand::parse_request(), parse_request(), and BESCatalogCommand::parse_request().

BESCommand * BESCommand::TermCommand [static, inherited]

Definition at line 68 of file BESCommand.h.

Referenced by BESCommand::del_command(), TestModule::initialize(), DAPCommandModule::initialize(), BESDefaultCommands::initialize(), TestCommand::parse_request(), BESShowCommand::parse_request(), BESSetCommand::parse_request(), BESGetCommand::parse_request(), BESDeleteCommand::parse_request(), and parse_request().


The documentation for this class was generated from the following files:
Generated on Fri Nov 30 12:11:41 2007 for OPeNDAP Back End Server (BES) by  doxygen 1.5.1