libdap++
Updated for version 3.8.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Keywords2.h
Go to the documentation of this file.
1
// -*- mode: c++; c-basic-offset:4 -*-
2
3
// This file is part of libdap, A C++ implementation of the OPeNDAP Data
4
// Access Protocol.
5
6
// Copyright (c) 2011 OPeNDAP, Inc.
7
// Author: James Gallagher <jgallagher@opendap.org>
8
//
9
// This library is free software; you can redistribute it and/or
10
// modify it under the terms of the GNU Lesser General Public
11
// License as published by the Free Software Foundation; either
12
// version 2.1 of the License, or (at your option) any later version.
13
//
14
// This library is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
// Lesser General Public License for more details.
18
//
19
// You should have received a copy of the GNU Lesser General Public
20
// License along with this library; if not, write to the Free Software
21
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
//
23
// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
24
25
#ifndef KEYWORDS_H_
26
#define KEYWORDS_H_
27
28
#include <string>
29
#include <set>
30
#include <map>
31
#include <list>
32
33
using namespace
std;
34
35
namespace
libdap {
36
49
class
Keywords
{
50
public
:
51
// convenience types
52
typedef
string
keyword
;
53
typedef
string
keyword_value
;
54
typedef
set<keyword_value>
value_set_t
;
55
56
private
:
58
map<keyword, keyword_value> d_parsed_keywords;
59
61
map<keyword, value_set_t> d_known_keywords;
62
63
virtual
void
m_add_keyword(
const
keyword
&word,
const
keyword_value
&value);
64
virtual
bool
m_is_valid_keyword(
const
keyword
&word,
const
keyword_value
&value)
const
;
65
66
public
:
67
Keywords
();
68
virtual
~
Keywords
();
69
70
virtual
string
parse_keywords(
const
string
&ce);
71
72
// Is this keyword in the dictionary?
73
virtual
bool
is_known_keyword(
const
string
&s)
const
;
74
75
// Get a list of all of the keywords parsed
76
virtual
list<keyword> get_keywords()
const
;
77
// Has a particular keyword been parsed
78
virtual
bool
has_keyword(
const
keyword
&kw)
const
;
79
80
// Get the parsed keyword (and it's dictionary value) of a particular kind
81
virtual
keyword_value
get_keyword_value(
const
keyword
&kw)
const
;
82
};
83
84
}
85
86
#endif
/* KEYWORDS_H_ */
Keywords2.h
Generated on Thu Mar 13 2014 01:23:39 for libdap++ by
1.8.1.2