bes  Updated for version 3.20.6
DMRpp.h
1 
2 // -*- mode: c++; c-basic-offset:4 -*-
3 
4 // This file is part of the BES
5 
6 // Copyright (c) 2016 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 MODULES_DMRPP_MODULE_DMRPP_H_
26 #define MODULES_DMRPP_MODULE_DMRPP_H_
27 
28 #include <string>
29 #include <DMR.h>
30 
31 namespace libdap {
32 class XMLWriter;
33 }
34 
35 namespace dmrpp {
36 
37 class DmrppTypeFactory;
38 
42 class DMRpp : public libdap::DMR {
43 private:
44  std::string d_href;
45  bool d_print_chunks;
46 
47 public:
48  DMRpp() : DMR() { }
49  DMRpp(const DMRpp &dmrpp) : DMR(dmrpp) { }
50 
51  DMRpp(DmrppTypeFactory *factory, const std::string &name = "");
52 
53  virtual ~DMRpp() { }
54 
55  virtual std::string get_href() const { return d_href; }
56  virtual void set_href(const std::string &h) { d_href = h; }
57 
58  virtual bool get_print_chunks() const { return d_print_chunks; }
59  virtual void set_print_chunks(bool pc) { d_print_chunks = pc; }
60 
61  virtual void print_dap4(libdap::XMLWriter &xml, bool constrained = false);
62 
63  virtual void print_dmrpp(libdap::XMLWriter &xml, const std::string &href ="", bool constrained = false, bool print_chunks = true);
64 };
65 
66 } /* namespace dmrpp */
67 
68 #endif /* MODULES_DMRPP_MODULE_DMRPP_H_ */
dmrpp::DmrppTypeFactory
Definition: DmrppTypeFactory.h:39
dmrpp::DMRpp::print_dap4
virtual void print_dap4(libdap::XMLWriter &xml, bool constrained=false)
override DMR::print_dap4() so the chunk info will print too.
Definition: DMRpp.cc:134
libdap
Definition: BESDapFunctionResponseCache.h:35
dmrpp::DMRpp::print_dmrpp
virtual void print_dmrpp(libdap::XMLWriter &xml, const std::string &href="", bool constrained=false, bool print_chunks=true)
Print the DMR++ response.
Definition: DMRpp.cc:70
dmrpp::DMRpp
Provide a way to print the DMR++ response.
Definition: DMRpp.h:42