parser-util.h
// -*- mode: c++; c-basic-offset:4 -*-
// This file is part of libdap, A C++ implementation of the OPeNDAP Data
// Access Protocol.
// Copyright (c) 2014 OPeNDAP, Inc.
// Author: James Gallagher <jgallagher@opendap.org>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
#ifndef PARSER_UTIL_H_
#define PARSER_UTIL_H_
namespace libdap {
void save_str(char *dst, const char *src, const int line_num);
void save_str(string &dst, const char *src, const int);
bool is_keyword(string id, const string &keyword);
int check_byte(const char *val);
int check_int16(const char *val);
int check_uint16(const char *val);
int check_int32(const char *val);
int check_uint32(const char *val);
int check_int64(const char *val);
int check_uint64(const char *val);
int check_float32(const char *val);
int check_float64(const char *val);
int check_url(const char *val);
long long get_int64(const char *val);
unsigned long long get_uint64(const char *val);
double get_float64(const char *val);
} // namespace libdap
#endif /* PARSER_UTIL_H_ */
libdap::save_str
void save_str(char *dst, const char *src, const int line_num)
Save a string to a temporary variable during the parse.
Definition: parser-util.cc:156
libdap::check_byte
int check_byte(const char *val)
Is the value a valid byte?
Definition: parser-util.cc:190
libdap
top level DAP object to house generic methods
Definition: AlarmHandler.h:35
libdap::check_url
int check_url(const char *)
Is the value a valid URL?
Definition: parser-util.cc:538