bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
WWWOutput.h
1
2// -*- mode: c++; c-basic-offset:4 -*-
3
4// This file is part of www_int, software which returns an HTML form which
5// can be used to build a URL to access data from a DAP data server.
6
7// Copyright (c) 2002,2003 OPeNDAP, Inc.
8// Author: James Gallagher <jgallagher@opendap.org>
9//
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.
14//
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.
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// (c) COPYRIGHT URI/MIT 1999
27// Please read the full copyright statement in the file COPYRIGHT_URI.
28//
29// Authors:
30// jhrg,jimg James Gallagher <jgallagher@gso.uri.edu>
31
32#ifndef _www_output_h
33#define _www_output_h
34
35#include <string>
36#include <iostream>
37
38#include <libdap/BaseType.h>
39#include <libdap/DDS.h>
40#include <libdap/DAS.h>
41
42using namespace libdap ;
43
47
48class WWWOutput {
49private:
50 // This pointer doesn't appear to be used anywhere, including in main()
51 // so commenting it out for now... pcw 08/15/07
52
53 // This pointer is allocated in main() and passed in here so that other
54 // functions/methods which use the global instance of WWWOutput name 'wo'
55 // can access the DAS object. There are better ways to do this, but this
56 // little tool is so simple that I don't think it needs to be
57 // rewritten... jhrg
58
59 //DAS *d_das;
60
61 protected:
62 ostream *d_strm;
63 int d_attr_rows;
64 int d_attr_cols;
65
66 void write_attributes(AttrTable *attr, const string prefix = "");
67
68 public:
76 WWWOutput(ostream &strm, int rows = 5, int cols = 70);
77
79#if 1
80 // TODO: Can this be removed?
82#endif
89 void write_disposition(string url, bool netcdf3_file_response, bool netcdf4_file_response);
90
91 void write_global_attributes(AttrTable &attr);
92
97 void write_variable_list(DDS &dds);
98
99 void write_variable_entries(DDS &dds);
100
101 void write_variable_attributes(BaseType * btp);
102};
103
104#endif // __www_output_h
void write_variable_list(DDS &dds)
WWWOutput(ostream &strm, int rows=5, int cols=70)
void write_disposition(string url, bool netcdf3_file_response, bool netcdf4_file_response)
void write_html_header()
STL class.