bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
util_ff.h
1
2// -*- mode: c++; c-basic-offset:4 -*-
3
4// This file is part of ff_handler a FreeForm API handler for the OPeNDAP
5// DAP2 data server.
6
7// Copyright (c) 2005 OPeNDAP, Inc.
8// Author: James Gallagher <jgallagher@opendap.org>
9//
10// This is free software; you can redistribute it and/or modify it under the
11// terms of the GNU Lesser General Public License as published by the Free
12// Software Foundation; either version 2.1 of the License, or (at your
13// option) any later version.
14//
15// This software is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18// License for more details.
19//
20// You should have received a copy of the GNU Lesser General Public
21// License along with this library; if not, write to the Free Software
22// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23//
24// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
25
26// Prototypes for the FreeForm server utility functions.
27//
28// jhrg 4/2/96
29
30// $Id$
31
32#ifndef _util_ff_h
33#define _util_ff_h
34
35#include "FreeFormCPP.h"
36
37#include <libdap/BaseType.h>
38#include <libdap/Error.h>
39#include <libdap/InternalErr.h>
40#include <libdap/dods-datatypes.h>
41
42using namespace libdap ;
43
44const int Msgt_size = 255;
45
46void free_ff_char_vector(char **v, int len);
47
48const string ff_types(Type dods_type);
49int ff_prec(Type dods_type);
50
51const string make_output_format(const string &name, Type type,
52 const int width);
53
54const string makeND_output_format(const string &name, Type type,
55 const int width, int ndim,
56 const long *start, const long *edge, const
57 long * stride, string *dname);
58
59const string &format_extension(const string &new_extension = "");
60const string &format_delimiter(const string &new_delimiter = "");
61
62// *** Cruft? see .cc file
63#if 0
64const string find_ancillary_formats(const string &dataset,
65 const string &delimiter = format_delimiter(),
66 const string &extension = format_extension());
67#endif
68const string find_ancillary_rss_formats(const string &dataset,
69 const string &delimiter = format_delimiter(),
70 const string &extension = format_extension());
71
72const string find_ancillary_rss_das(const string &dataset,
73 const string &delimiter = format_delimiter(),
74 const string &extension = format_extension());
75
76int SetDodsDB(FF_STD_ARGS_PTR std_args, DATA_BIN_HANDLE dbin_h, char * Msgt);
77long Records(const string &filename);
78
79bool file_exist(const char * filename);
80
81/*extern "C" */long read_ff(const char *dataset, const char *if_file, const char *o_format,
82 char *o_buffer, unsigned long size);
83
84bool is_integer_type(BaseType *btp);
85bool is_float_type(BaseType *btp);
86dods_uint32 get_integer_value(BaseType *var) throw(InternalErr);
87dods_float64 get_float_value(BaseType *var) throw(InternalErr);
88
89string get_Regex_format_file(const string &filename);
90
91#endif // _util_ff_h_
92
93
94
95
96
97
Type
Type of JSON value.
Definition rapidjson.h:664