libdap Updated for version 3.21.1
libdap4 is an implementation of OPeNDAP's DAP protocol.
libdap::Keywords Class Reference

#include <Keywords2.h>

Collaboration diagram for libdap::Keywords:
Collaboration graph

Public Types

typedef string keyword
 
typedef string keyword_value
 
typedef set< keyword_valuevalue_set_t
 

Public Member Functions

virtual keyword_value get_keyword_value (const keyword &kw) const
 
virtual list< keywordget_keywords () const
 
virtual bool has_keyword (const keyword &kw) const
 
virtual bool is_known_keyword (const string &s) const
 
 Keywords ()
 
virtual string parse_keywords (const string &ce)
 
virtual ~Keywords ()
 

Detailed Description

Manage keywords for libdap. These are passed in to the library using the constraint expression - in fact they are an extension of the CE and this class implements the parsing needed to remove them from the CE so that the ConstraintExpression evaluator can parse it (because the keywords are not identifiers in the DDS, they will cause a parse error.

Note
If pointers are added to this code, modify DDS so copying still works!
The keywords are used to specify the DAP version(s) that the client can understand.
Keywords are parsed and used by the BES in Hyrax - libdap never makes calls to these methods.

Definition at line 52 of file Keywords2.h.

Member Typedef Documentation

◆ keyword

Definition at line 55 of file Keywords2.h.

◆ keyword_value

Definition at line 56 of file Keywords2.h.

◆ value_set_t

Definition at line 57 of file Keywords2.h.

Constructor & Destructor Documentation

◆ Keywords()

libdap::Keywords::Keywords ( )

Definition at line 40 of file Keywords2.cc.

◆ ~Keywords()

libdap::Keywords::~Keywords ( )
virtual

Definition at line 62 of file Keywords2.cc.

Member Function Documentation

◆ get_keyword_value()

Keywords::keyword_value libdap::Keywords::get_keyword_value ( const keyword & kw) const
virtual

Look at the parsed keywords for the value associated with a given keyword.

Parameters
k
Returns
The value

Definition at line 150 of file Keywords2.cc.

◆ get_keywords()

list< Keywords::keyword > libdap::Keywords::get_keywords ( ) const
virtual

Get a list of the strings that make up the set of current keywords for this request.

Returns
The list of keywords as a list of string objects.

Definition at line 128 of file Keywords2.cc.

◆ has_keyword()

bool libdap::Keywords::has_keyword ( const keyword & kw) const
virtual

Lookup a keyword_kind and return true if it has been set for this request, otherwise return false.

Parameters
kwKeyword
Returns
true if the keyword is set.

Definition at line 143 of file Keywords2.cc.

◆ is_known_keyword()

bool libdap::Keywords::is_known_keyword ( const string & word) const
virtual

Is the word one of the known keywords for this version of libdap?

Parameters
sAs a string, including the value
Returns
true if the keyword is known

Definition at line 121 of file Keywords2.cc.

◆ parse_keywords()

string libdap::Keywords::parse_keywords ( const string & ce)
virtual

Parse the constraint expression, removing all keywords. As a side effect, return the remaining CE.

Parameters
ce
Returns
The CE stripped of all recognized keywords.

Definition at line 162 of file Keywords2.cc.


The documentation for this class was generated from the following files: