bes  Updated for version 3.20.6
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 "BaseType.h"
38 #include "Error.h"
39 #include "InternalErr.h"
40 #include "dods-datatypes.h"
41 
42 using namespace libdap ;
43 
44 const int Msgt_size = 255;
45 
46 void free_ff_char_vector(char **v, int len);
47 
48 const string ff_types(Type dods_type);
49 int ff_prec(Type dods_type);
50 
51 const string make_output_format(const string &name, Type type,
52  const int width);
53 
54 const 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 
59 const string &format_extension(const string &new_extension = "");
60 const string &format_delimiter(const string &new_delimiter = "");
61 
62 // *** Cruft? see .cc file
63 #if 0
64 const string find_ancillary_formats(const string &dataset,
65  const string &delimiter = format_delimiter(),
66  const string &extension = format_extension());
67 #endif
68 const string find_ancillary_rss_formats(const string &dataset,
69  const string &delimiter = format_delimiter(),
70  const string &extension = format_extension());
71 
72 const string find_ancillary_rss_das(const string &dataset,
73  const string &delimiter = format_delimiter(),
74  const string &extension = format_extension());
75 
76 int SetDodsDB(FF_STD_ARGS_PTR std_args, DATA_BIN_HANDLE dbin_h, char * Msgt);
77 long Records(const string &filename);
78 
79 bool 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 
84 bool is_integer_type(BaseType *btp);
85 bool is_float_type(BaseType *btp);
86 dods_uint32 get_integer_value(BaseType *var) throw(InternalErr);
87 dods_float64 get_float_value(BaseType *var) throw(InternalErr);
88 
89 string get_Regex_format_file(const string &filename);
90 
91 #endif // _util_ff_h_
92 
93 
94 
95 
96 
97 
struct_ff_std_args
Definition: freeform.h:867
Type
Type
Type of JSON value.
Definition: cmr_module/rapidjson/rapidjson.h:603
libdap
Definition: BESDapFunctionResponseCache.h:35
struct_databin
Definition: freeform.h:1294