bes  Updated for version 3.20.5
NCRequestHandler.h
1 // -*- mode: c++; c-basic-offset:4 -*-
2 
3 // This file is part of nc_handler, a data handler for the OPeNDAP data
4 // server.
5 
6 // Copyright (c) 2002,2003 OPeNDAP, Inc.
7 // Author: James Gallagher <jgallagher@opendap.org>
8 //
9 // This is free software; you can redistribute it and/or modify it under the
10 // terms of the GNU Lesser General Public License as published by the Free
11 // Software Foundation; either version 2.1 of the License, or (at your
12 // option) any later version.
13 //
14 // This software is distributed in the hope that it will be useful, but
15 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 // 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 // CDFRequestHandler.h
26 
27 #ifndef I_NCRequestHandler_H
28 #define I_NCRequestHandler_H 1
29 
30 #include <BESRequestHandler.h>
31 
32 class ObjMemCache; // in bes/dap
33 
34 namespace libdap {
35 class DDS;
36 }
37 
39 private:
40  static bool _show_shared_dims;
41  static bool _show_shared_dims_set;
42 
43  static bool _ignore_unknown_types;
44  static bool _ignore_unknown_types_set;
45 
46  static bool _promote_byte_to_short_set;
47  static bool _promote_byte_to_short;
48 
49  static unsigned int _cache_entries;
50  static float _cache_purge_level;
51 
52  static ObjMemCache *das_cache;
53  static ObjMemCache *dds_cache;
54  static ObjMemCache *dmr_cache;
55 
56  static void get_dds_with_attributes(const std::string& dataset_name, const std::string& container_name, libdap::DDS* dds);
57 
58 public:
59  NCRequestHandler(const string &name);
60  virtual ~NCRequestHandler(void);
61 
62  static bool nc_build_das(BESDataHandlerInterface &dhi);
63  static bool nc_build_dds(BESDataHandlerInterface &dhi);
64  static bool nc_build_data(BESDataHandlerInterface &dhi);
65  static bool nc_build_dmr(BESDataHandlerInterface &dhi);
66  static bool nc_build_help(BESDataHandlerInterface &dhi);
67  static bool nc_build_version(BESDataHandlerInterface &dhi);
68 
69  static bool get_show_shared_dims()
70  {
71  return _show_shared_dims;
72  }
73  static bool get_ignore_unknown_types()
74  {
75  return _ignore_unknown_types;
76  }
77  static bool get_promote_byte_to_short()
78  {
79  return _promote_byte_to_short;
80  }
81  static unsigned int get_cache_entries()
82  {
83  return _cache_entries;
84  }
85  static float get_cache_purge_level()
86  {
87  return _cache_purge_level;
88  }
89 };
90 
91 #endif
92 
Represents a specific data type request handler.
Structure storing information used by the BES to handle the request.
An in-memory cache for DapObj (DAS, DDS, ...) objects.
Definition: ObjMemCache.h:86