libdap Updated for version 3.21.1
libdap4 is an implementation of OPeNDAP's DAP protocol.
parser-util.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) 2014 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22//
23// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
24
25#ifndef PARSER_UTIL_H_
26#define PARSER_UTIL_H_
27
28namespace libdap {
29
43#if 0
44void save_str(char *dst, const char *src, const int line_num);
45#endif
46void save_str(std::string &dst, const char *src, const int);
47
48bool is_keyword(std::string id, const std::string &keyword);
49
55int check_byte(const char *val);
56
57int check_int16(const char *val);
58int check_uint16(const char *val);
59
60int check_int32(const char *val);
61int check_uint32(const char *val);
62
63int check_int64(const char *val);
64int check_uint64(const char *val);
65
66int check_float32(const char *val);
67int check_float64(const char *val);
68
71int check_url(const char *val);
72
74
80int check_int32(const char *val, int &v);
81int check_uint32(const char *val, unsigned int &v);
82
83int check_float64(const char *val, double &v);
85
91int get_int32(const char *val);
92unsigned int get_uint32(const char *val);
93long long get_int64(const char *val);
94unsigned long long get_uint64(const char *val);
95double get_float64(const char *val);
96
98
99} // namespace libdap
100
101#endif /* PARSER_UTIL_H_ */
int check_float64(const char *val)
int check_uint64(const char *val)
int check_url(const char *)
Is the value a valid URL?
int check_uint16(const char *val)
int check_int64(const char *val)
int check_byte(const char *val)
Is the value a valid byte?
int check_uint32(const char *val)
int check_int16(const char *val)
int check_float32(const char *val)
int check_int32(const char *val)
double get_float64(const char *val)
long long get_int64(const char *val)
unsigned int get_uint32(const char *val)
int get_int32(const char *val)
unsigned long long get_uint64(const char *val)
top level DAP object to house generic methods
Definition AISConnect.cc:30
void save_str(string &dst, const char *src, const int)
Save a string to a temporary variable during the parse.
bool is_keyword(string id, const string &keyword)