2
// -*- mode: c++; c-basic-offset:4 -*-
4
// This file is part of libdap, A C++ implementation of the OPeNDAP Data
7
// Copyright (c) 2011 OPeNDAP, Inc.
8
// Author: James Gallagher <jgallagher@opendap.org>
10
// This library is free software; you can redistribute it and/or
11
// modify it under the terms of the GNU Lesser General Public
12
// License as published by the Free Software Foundation; either
13
// version 2.1 of the License, or (at your option) any later version.
15
// This library is distributed in the hope that it will be useful,
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
// Lesser General Public License for more details.
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
24
// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
26
#ifndef _response_builder_h
27
#define _response_builder_h
31
class libdap::ConstraintEvaluator;
35
* Used for testing only. This duplicates code in the bes/dap module.
42
friend class ResponseBuilderTest;
45
std::string d_dataset; /// Name of the dataset/database
46
std::string d_ce; /// Constraint expression
47
std::string d_btp_func_ce; /// The BTP functions, extracted from the CE
48
int d_timeout; /// Response timeout after N seconds
49
std::string d_default_protocol; /// Version std::string for the library's default protocol version
55
/** Make an empty instance. Use the set_*() methods to load with needed
56
values. You must call at least set_dataset_name() or be requesting
57
version information. */
62
virtual ~ResponseBuilder();
64
virtual std::string get_ce() const;
65
virtual void set_ce(std::string _ce);
67
virtual std::string get_dataset_name() const;
68
virtual void set_dataset_name(const std::string _dataset);
70
virtual void dataset_constraint(std::ostream &out, libdap::DDS &dds, libdap::ConstraintEvaluator &eval, bool ce_eval = true);
71
virtual void send_data(std::ostream &data_stream, libdap::DDS &dds, libdap::ConstraintEvaluator &eval, bool with_mime_headers = true);
74
#endif // _response_builder_h