Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > c9cfbd1355daacaf3b34517a6d7b18cc > files > 114

libdap-doc-3.11.0-2.fc15.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>libdap++: DODSFilter.cc Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">libdap++&#160;<span id="projectnumber">Updated for version 3.8.2</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('DODSFilter_8cc.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<h1>DODSFilter.cc</h1>  </div>
</div>
<div class="contents">
<a href="DODSFilter_8cc.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00002"></a>00002 <span class="comment">// -*- mode: c++; c-basic-offset:4 -*-</span>
<a name="l00003"></a>00003 
<a name="l00004"></a>00004 <span class="comment">// This file is part of libdap, A C++ implementation of the OPeNDAP Data</span>
<a name="l00005"></a>00005 <span class="comment">// Access Protocol.</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="comment">// Copyright (c) 2002,2003 OPeNDAP, Inc.</span>
<a name="l00008"></a>00008 <span class="comment">// Author: James Gallagher &lt;jgallagher@opendap.org&gt;</span>
<a name="l00009"></a>00009 <span class="comment">//</span>
<a name="l00010"></a>00010 <span class="comment">// This library is free software; you can redistribute it and/or</span>
<a name="l00011"></a>00011 <span class="comment">// modify it under the terms of the GNU Lesser General Public</span>
<a name="l00012"></a>00012 <span class="comment">// License as published by the Free Software Foundation; either</span>
<a name="l00013"></a>00013 <span class="comment">// version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00014"></a>00014 <span class="comment">//</span>
<a name="l00015"></a>00015 <span class="comment">// This library is distributed in the hope that it will be useful,</span>
<a name="l00016"></a>00016 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00017"></a>00017 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00018"></a>00018 <span class="comment">// Lesser General Public License for more details.</span>
<a name="l00019"></a>00019 <span class="comment">//</span>
<a name="l00020"></a>00020 <span class="comment">// You should have received a copy of the GNU Lesser General Public</span>
<a name="l00021"></a>00021 <span class="comment">// License along with this library; if not, write to the Free Software</span>
<a name="l00022"></a>00022 <span class="comment">// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</span>
<a name="l00023"></a>00023 <span class="comment">//</span>
<a name="l00024"></a>00024 <span class="comment">// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="comment">// (c) COPYRIGHT URI/MIT 1997-1999</span>
<a name="l00027"></a>00027 <span class="comment">// Please read the full copyright statement in the file COPYRIGHT_URI.</span>
<a name="l00028"></a>00028 <span class="comment">//</span>
<a name="l00029"></a>00029 <span class="comment">// Authors:</span>
<a name="l00030"></a>00030 <span class="comment">//      jhrg,jimg       James Gallagher &lt;jgallagher@gso.uri.edu&gt;</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="comment">// Implementation of the DODSFilter class. This class is used to build dods</span>
<a name="l00033"></a>00033 <span class="comment">// filter programs which, along with a CGI program, comprise OPeNDAP servers.</span>
<a name="l00034"></a>00034 <span class="comment">// jhrg 8/26/97</span>
<a name="l00035"></a>00035 
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 <span class="preprocessor">#include &quot;<a class="code" href="config_8h.html">config.h</a>&quot;</span>
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 <span class="keyword">static</span> <span class="keywordtype">char</span> rcsid[] <a class="code" href="config_8h.html#a05e109ec893d0b12023d5b0cf4f718c4">not_used</a> =
<a name="l00040"></a>00040     {<span class="stringliteral">&quot;$Id: DODSFilter.cc 23477 2010-09-02 21:02:59Z jimg $&quot;</span>
<a name="l00041"></a>00041     };
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="preprocessor">#include &lt;signal.h&gt;</span>
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="preprocessor">#ifndef WIN32</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#include &lt;unistd.h&gt;</span>   <span class="comment">// for getopt</span>
<a name="l00047"></a>00047 <span class="preprocessor">#include &lt;sys/wait.h&gt;</span>
<a name="l00048"></a>00048 <span class="preprocessor">#else</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#include &lt;io.h&gt;</span>
<a name="l00050"></a>00050 <span class="preprocessor">#include &lt;fcntl.h&gt;</span>
<a name="l00051"></a>00051 <span class="preprocessor">#include &lt;process.h&gt;</span>
<a name="l00052"></a>00052 <span class="preprocessor">#endif</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span>
<a name="l00054"></a>00054 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00055"></a>00055 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00056"></a>00056 <span class="preprocessor">#include &lt;algorithm&gt;</span>
<a name="l00057"></a>00057 <span class="preprocessor">#include &lt;cstdlib&gt;</span>
<a name="l00058"></a>00058 <span class="preprocessor">#include &lt;cstring&gt;</span>
<a name="l00059"></a>00059 
<a name="l00060"></a>00060 <span class="preprocessor">#include &lt;uuid/uuid.h&gt;</span>  <span class="comment">// used to build CID header value for data ddx</span>
<a name="l00061"></a>00061 
<a name="l00062"></a>00062 <span class="preprocessor">#include &lt;GetOpt.h&gt;</span>
<a name="l00063"></a>00063 
<a name="l00064"></a>00064 <span class="preprocessor">#include &quot;<a class="code" href="DAS_8h.html">DAS.h</a>&quot;</span>
<a name="l00065"></a>00065 <span class="preprocessor">#include &quot;<a class="code" href="DDS_8h.html">DDS.h</a>&quot;</span>
<a name="l00066"></a>00066 <span class="preprocessor">#include &quot;<a class="code" href="debug_8h.html">debug.h</a>&quot;</span>
<a name="l00067"></a>00067 <span class="preprocessor">#include &quot;<a class="code" href="mime__util_8h.html">mime_util.h</a>&quot;</span>
<a name="l00068"></a>00068 <span class="preprocessor">#include &quot;<a class="code" href="Ancillary_8h.html">Ancillary.h</a>&quot;</span>
<a name="l00069"></a>00069 <span class="preprocessor">#include &quot;<a class="code" href="util_8h.html">util.h</a>&quot;</span>
<a name="l00070"></a>00070 <span class="preprocessor">#include &quot;<a class="code" href="escaping_8h.html">escaping.h</a>&quot;</span>
<a name="l00071"></a>00071 <span class="preprocessor">#include &quot;<a class="code" href="DODSFilter_8h.html">DODSFilter.h</a>&quot;</span>
<a name="l00072"></a>00072 <span class="preprocessor">#if FILE_METHODS</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="XDRFileMarshaller_8h.html">XDRFileMarshaller.h</a>&quot;</span>
<a name="l00074"></a>00074 <span class="preprocessor">#endif</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="XDRStreamMarshaller_8h.html">XDRStreamMarshaller.h</a>&quot;</span>
<a name="l00076"></a>00076 <span class="preprocessor">#include &quot;<a class="code" href="InternalErr_8h.html">InternalErr.h</a>&quot;</span>
<a name="l00077"></a>00077 
<a name="l00078"></a>00078 <span class="preprocessor">#ifndef WIN32</span>
<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="SignalHandler_8h.html">SignalHandler.h</a>&quot;</span>
<a name="l00080"></a>00080 <span class="preprocessor">#include &quot;<a class="code" href="EventHandler_8h.html">EventHandler.h</a>&quot;</span>
<a name="l00081"></a>00081 <span class="preprocessor">#include &quot;<a class="code" href="AlarmHandler_8h.html">AlarmHandler.h</a>&quot;</span>
<a name="l00082"></a>00082 <span class="preprocessor">#endif</span>
<a name="l00083"></a>00083 <span class="preprocessor"></span>
<a name="l00084"></a><a class="code" href="DODSFilter_8cc.html#a6cb23a858b0a21bdaa644b9181dc415f">00084</a> <span class="preprocessor">#define CRLF &quot;\r\n&quot;             // Change here, expr-test.cc and DODSFilter.cc</span>
<a name="l00085"></a>00085 <span class="preprocessor"></span>
<a name="l00086"></a>00086 <span class="comment">//#undef FILE_METHODS</span>
<a name="l00087"></a>00087 
<a name="l00088"></a>00088 <span class="keyword">using namespace </span>std;
<a name="l00089"></a>00089 
<a name="l00090"></a>00090 <span class="keyword">namespace </span>libdap {
<a name="l00091"></a>00091 
<a name="l00092"></a><a class="code" href="namespacelibdap.html#a6f36b78e0590ec9e3a0583f0ecfead64">00092</a> <span class="keyword">const</span> <span class="keywordtype">string</span> <a class="code" href="getdap_8cc.html#a9391ac68c9115711e45eb80120891130">usage</a> =
<a name="l00093"></a>00093     <span class="stringliteral">&quot;Usage: &lt;handler name&gt; -o &lt;response&gt; -u &lt;url&gt; [options ...] [data set]\n\</span>
<a name="l00094"></a>00094 <span class="stringliteral">    \n\</span>
<a name="l00095"></a>00095 <span class="stringliteral">    options: -o &lt;response&gt;: DAS, DDS, DataDDS, DDX, BLOB or Version (Required)\n\</span>
<a name="l00096"></a>00096 <span class="stringliteral">    -u &lt;url&gt;: The complete URL minus the CE (required for DDX)\n\</span>
<a name="l00097"></a>00097 <span class="stringliteral">    -c: Compress the response using the deflate algorithm.\n\</span>
<a name="l00098"></a>00098 <span class="stringliteral">    -e &lt;expr&gt;: When returning a DataDDS, use &lt;expr&gt; as the constraint.\n\</span>
<a name="l00099"></a>00099 <span class="stringliteral">    -v &lt;version&gt;: Use &lt;version&gt; as the version number\n\</span>
<a name="l00100"></a>00100 <span class="stringliteral">    -d &lt;dir&gt;: Look for ancillary file in &lt;dir&gt; (deprecated).\n\</span>
<a name="l00101"></a>00101 <span class="stringliteral">    -f &lt;file&gt;: Look for ancillary data in &lt;file&gt; (deprecated).\n\</span>
<a name="l00102"></a>00102 <span class="stringliteral">    -r &lt;dir&gt;: Use &lt;dir&gt; as a cache directory\n\</span>
<a name="l00103"></a>00103 <span class="stringliteral">    -l &lt;time&gt;: Conditional request; if data source is unchanged since\n\</span>
<a name="l00104"></a>00104 <span class="stringliteral">    &lt;time&gt;, return an HTTP 304 response.\n\</span>
<a name="l00105"></a>00105 <span class="stringliteral">    -t &lt;seconds&gt;: Timeout the handler after &lt;seconds&gt;.\n\</span>
<a name="l00106"></a>00106 <span class="stringliteral">    -h: This message.&quot;</span>;
<a name="l00107"></a>00107 
<a name="l00172"></a><a class="code" href="classlibdap_1_1DODSFilter.html#aab6e493b315d390b41f6d6e806c90045">00172</a> DODSFilter::DODSFilter(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[]) <span class="keywordflow">throw</span>(<a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>)
<a name="l00173"></a>00173 {
<a name="l00174"></a>00174     initialize(argc, argv);
<a name="l00175"></a>00175 
<a name="l00176"></a>00176     <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;d_comp: &quot;</span> &lt;&lt; d_comp &lt;&lt; endl);
<a name="l00177"></a>00177     <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;d_ce: &quot;</span> &lt;&lt; d_ce &lt;&lt; endl);
<a name="l00178"></a>00178     <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;d_cgi_ver: &quot;</span> &lt;&lt; d_cgi_ver &lt;&lt; endl);
<a name="l00179"></a>00179     <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;d_response: &quot;</span> &lt;&lt; d_response &lt;&lt; endl);
<a name="l00180"></a>00180     <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;d_anc_dir: &quot;</span> &lt;&lt; d_anc_dir &lt;&lt; endl);
<a name="l00181"></a>00181     <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;d_anc_file: &quot;</span> &lt;&lt; d_anc_file &lt;&lt; endl);
<a name="l00182"></a>00182     <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;d_cache_dir: &quot;</span> &lt;&lt; d_cache_dir &lt;&lt; endl);
<a name="l00183"></a>00183     <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;d_conditional_request: &quot;</span> &lt;&lt; d_conditional_request &lt;&lt; endl);
<a name="l00184"></a>00184     <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;d_if_modified_since: &quot;</span> &lt;&lt; d_if_modified_since &lt;&lt; endl);
<a name="l00185"></a>00185     <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;d_url: &quot;</span> &lt;&lt; d_url &lt;&lt; endl);
<a name="l00186"></a>00186     <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;d_timeout: &quot;</span> &lt;&lt; d_timeout &lt;&lt; endl);
<a name="l00187"></a>00187 }
<a name="l00188"></a>00188 
<a name="l00189"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a31b50cf60ff28ac38e73703abb432cb7">00189</a> DODSFilter::~DODSFilter()
<a name="l00190"></a>00190 {
<a name="l00191"></a>00191 }
<a name="l00192"></a>00192 
<a name="l00195"></a>00195 <span class="keywordtype">void</span>
<a name="l00196"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a8ac695c5b7ebe39e2a7c8dd44079f317">00196</a> DODSFilter::initialize()
<a name="l00197"></a>00197 {
<a name="l00198"></a>00198     <span class="comment">// Set default values. Don&#39;t use the C++ constructor initialization so</span>
<a name="l00199"></a>00199     <span class="comment">// that a subclass can have more control over this process.</span>
<a name="l00200"></a>00200     d_comp = <span class="keyword">false</span>;
<a name="l00201"></a>00201     d_bad_options = <span class="keyword">false</span>;
<a name="l00202"></a>00202     d_conditional_request = <span class="keyword">false</span>;
<a name="l00203"></a>00203     d_dataset = <span class="stringliteral">&quot;&quot;</span>;
<a name="l00204"></a>00204     d_ce = <span class="stringliteral">&quot;&quot;</span>;
<a name="l00205"></a>00205     d_cgi_ver = <span class="stringliteral">&quot;&quot;</span>;
<a name="l00206"></a>00206     d_anc_dir = <span class="stringliteral">&quot;&quot;</span>;
<a name="l00207"></a>00207     d_anc_file = <span class="stringliteral">&quot;&quot;</span>;
<a name="l00208"></a>00208     d_cache_dir = <span class="stringliteral">&quot;&quot;</span>;
<a name="l00209"></a>00209     d_response = Unknown_Response;;
<a name="l00210"></a>00210     d_anc_das_lmt = 0;
<a name="l00211"></a>00211     d_anc_dds_lmt = 0;
<a name="l00212"></a>00212     d_if_modified_since = -1;
<a name="l00213"></a>00213     d_url = <span class="stringliteral">&quot;&quot;</span>;
<a name="l00214"></a>00214     d_program_name = <span class="stringliteral">&quot;Unknown&quot;</span>;
<a name="l00215"></a>00215     d_timeout = 0;
<a name="l00216"></a>00216 
<a name="l00217"></a>00217 <span class="preprocessor">#ifdef WIN32</span>
<a name="l00218"></a>00218 <span class="preprocessor"></span>    <span class="comment">//  We want serving from win32 to behave in a manner</span>
<a name="l00219"></a>00219     <span class="comment">//  similar to the UNIX way - no CR-&gt;NL terminated lines</span>
<a name="l00220"></a>00220     <span class="comment">//  in files. Hence stdout goes to binary mode.</span>
<a name="l00221"></a>00221     _setmode(_fileno(stdout), _O_BINARY);
<a name="l00222"></a>00222 <span class="preprocessor">#endif</span>
<a name="l00223"></a>00223 <span class="preprocessor"></span>}
<a name="l00224"></a>00224 
<a name="l00236"></a>00236 <span class="keywordtype">void</span>
<a name="l00237"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a1420d214791dc0c4bb907cd9f6d967a6">00237</a> DODSFilter::initialize(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[])
<a name="l00238"></a>00238 {
<a name="l00239"></a>00239     initialize();
<a name="l00240"></a>00240 
<a name="l00241"></a>00241     d_program_name = argv[0];
<a name="l00242"></a>00242 
<a name="l00243"></a>00243     <span class="comment">// This should be specialized by a subclass. This may throw Error.</span>
<a name="l00244"></a>00244     <span class="keywordtype">int</span> next_arg = process_options(argc, argv);
<a name="l00245"></a>00245 
<a name="l00246"></a>00246     <span class="comment">// Look at what&#39;s left after processing the command line options. Either</span>
<a name="l00247"></a>00247     <span class="comment">// there MUST be a dataset name OR the caller is asking for version</span>
<a name="l00248"></a>00248     <span class="comment">// information. If neither is true, then the options are bad.</span>
<a name="l00249"></a>00249     <span class="keywordflow">if</span> (next_arg &lt; argc) {
<a name="l00250"></a>00250         d_dataset = argv[next_arg];
<a name="l00251"></a>00251         d_dataset = <a class="code" href="namespacelibdap.html#a376f9593431111a80ef78c98b8f4a0e2">www2id</a>(d_dataset, <span class="stringliteral">&quot;%&quot;</span>, <span class="stringliteral">&quot;%20&quot;</span>);
<a name="l00252"></a>00252     }
<a name="l00253"></a>00253     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (get_response() != Version_Response)
<a name="l00254"></a>00254         print_usage();   <span class="comment">// Throws Error</span>
<a name="l00255"></a>00255 }
<a name="l00256"></a>00256 
<a name="l00265"></a>00265 <span class="keywordtype">int</span>
<a name="l00266"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a609ed4df55fdf7cc995e3951a1f2ddd0">00266</a> DODSFilter::process_options(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[])
<a name="l00267"></a>00267 {
<a name="l00268"></a>00268     <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;Entering process_options... &quot;</span>);
<a name="l00269"></a>00269 
<a name="l00270"></a>00270     <span class="keywordtype">int</span> option_char;
<a name="l00271"></a>00271     GetOpt getopt (argc, argv, <span class="stringliteral">&quot;ce: v: d: f: r: l: o: u: t: &quot;</span>);
<a name="l00272"></a>00272 
<a name="l00273"></a>00273     <span class="keywordflow">while</span> ((option_char = getopt()) != EOF) {
<a name="l00274"></a>00274         <span class="keywordflow">switch</span> (option_char) {
<a name="l00275"></a>00275         <span class="keywordflow">case</span> <span class="charliteral">&#39;c&#39;</span>: d_comp = <span class="keyword">true</span>; <span class="keywordflow">break</span>;
<a name="l00276"></a>00276         <span class="keywordflow">case</span> <span class="charliteral">&#39;e&#39;</span>: set_ce(getopt.optarg); <span class="keywordflow">break</span>;
<a name="l00277"></a>00277         <span class="keywordflow">case</span> <span class="charliteral">&#39;v&#39;</span>: set_cgi_version(getopt.optarg); <span class="keywordflow">break</span>;
<a name="l00278"></a>00278         <span class="keywordflow">case</span> <span class="charliteral">&#39;d&#39;</span>: d_anc_dir = getopt.optarg; <span class="keywordflow">break</span>;
<a name="l00279"></a>00279         <span class="keywordflow">case</span> <span class="charliteral">&#39;f&#39;</span>: d_anc_file = getopt.optarg; <span class="keywordflow">break</span>;
<a name="l00280"></a>00280         <span class="keywordflow">case</span> <span class="charliteral">&#39;r&#39;</span>: d_cache_dir = getopt.optarg; <span class="keywordflow">break</span>;
<a name="l00281"></a>00281         <span class="keywordflow">case</span> <span class="charliteral">&#39;o&#39;</span>: set_response(getopt.optarg); <span class="keywordflow">break</span>;
<a name="l00282"></a>00282         <span class="keywordflow">case</span> <span class="charliteral">&#39;u&#39;</span>: set_URL(getopt.optarg); <span class="keywordflow">break</span>;
<a name="l00283"></a>00283         <span class="keywordflow">case</span> <span class="charliteral">&#39;t&#39;</span>: d_timeout = atoi(getopt.optarg); <span class="keywordflow">break</span>;
<a name="l00284"></a>00284         <span class="keywordflow">case</span> <span class="charliteral">&#39;l&#39;</span>:
<a name="l00285"></a>00285             d_conditional_request = <span class="keyword">true</span>;
<a name="l00286"></a>00286             d_if_modified_since
<a name="l00287"></a>00287             = <span class="keyword">static_cast&lt;</span>time_t<span class="keyword">&gt;</span>(strtol(getopt.optarg, NULL, 10));
<a name="l00288"></a>00288             <span class="keywordflow">break</span>;
<a name="l00289"></a>00289         <span class="keywordflow">case</span> <span class="charliteral">&#39;h&#39;</span>: print_usage(); exit(1);
<a name="l00290"></a>00290         <span class="keywordflow">default</span>: print_usage(); <span class="comment">// Throws Error</span>
<a name="l00291"></a>00291         }
<a name="l00292"></a>00292     }
<a name="l00293"></a>00293 
<a name="l00294"></a>00294     <a class="code" href="debug_8h.html#a0d28d57d1228cf13a4c1288cc4758344">DBGN</a>(cerr &lt;&lt; <span class="stringliteral">&quot;exiting.&quot;</span> &lt;&lt; endl);
<a name="l00295"></a>00295 
<a name="l00296"></a>00296     <span class="keywordflow">return</span> getopt.optind; <span class="comment">// return the index of the next argument</span>
<a name="l00297"></a>00297 }
<a name="l00298"></a>00298 
<a name="l00303"></a>00303 <span class="keywordtype">bool</span>
<a name="l00304"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a0129530c994f1e826c6b6357ea48a650">00304</a> DODSFilter::is_conditional()<span class="keyword"> const</span>
<a name="l00305"></a>00305 <span class="keyword"></span>{
<a name="l00306"></a>00306     <span class="keywordflow">return</span> d_conditional_request;
<a name="l00307"></a>00307 }
<a name="l00308"></a>00308 
<a name="l00322"></a>00322 <span class="keywordtype">void</span>
<a name="l00323"></a><a class="code" href="classlibdap_1_1DODSFilter.html#ad95070bc42a8aff97cb6c626c78480b6">00323</a> DODSFilter::set_cgi_version(<span class="keywordtype">string</span> <a class="code" href="getdap_8cc.html#aa31f487a99743d24af9076a3e11e5425">version</a>)
<a name="l00324"></a>00324 {
<a name="l00325"></a>00325     d_cgi_ver = <a class="code" href="getdap_8cc.html#aa31f487a99743d24af9076a3e11e5425">version</a>;
<a name="l00326"></a>00326 }
<a name="l00327"></a>00327 
<a name="l00333"></a>00333 <span class="keywordtype">string</span>
<a name="l00334"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a06f827d52efe528675ee43533fdbae16">00334</a> DODSFilter::get_cgi_version()<span class="keyword"> const</span>
<a name="l00335"></a>00335 <span class="keyword"></span>{
<a name="l00336"></a>00336     <span class="keywordflow">return</span> d_cgi_ver;
<a name="l00337"></a>00337 }
<a name="l00338"></a>00338 
<a name="l00345"></a>00345 <span class="keywordtype">string</span>
<a name="l00346"></a><a class="code" href="classlibdap_1_1DODSFilter.html#aad1eee238ed4bde5f5dc49ecf0966635">00346</a> DODSFilter::get_ce()<span class="keyword"> const</span>
<a name="l00347"></a>00347 <span class="keyword"></span>{
<a name="l00348"></a>00348     <span class="keywordflow">return</span> d_ce;
<a name="l00349"></a>00349 }
<a name="l00350"></a>00350 
<a name="l00351"></a>00351 <span class="keywordtype">void</span>
<a name="l00352"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a7a3b83c758edb5ed45270004673a355d">00352</a> DODSFilter::set_ce(<span class="keywordtype">string</span> _ce)
<a name="l00353"></a>00353 {
<a name="l00354"></a>00354     d_ce = <a class="code" href="namespacelibdap.html#a376f9593431111a80ef78c98b8f4a0e2">www2id</a>(_ce, <span class="stringliteral">&quot;%&quot;</span>, <span class="stringliteral">&quot;%20&quot;</span>);
<a name="l00355"></a>00355 }
<a name="l00356"></a>00356 
<a name="l00365"></a>00365 <span class="keywordtype">string</span>
<a name="l00366"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a9a1de0e3f85c4126901e1d70e00f35ea">00366</a> DODSFilter::get_dataset_name()<span class="keyword"> const</span>
<a name="l00367"></a>00367 <span class="keyword"></span>{
<a name="l00368"></a>00368     <span class="keywordflow">return</span> d_dataset;
<a name="l00369"></a>00369 }
<a name="l00370"></a>00370 
<a name="l00371"></a>00371 <span class="keywordtype">void</span>
<a name="l00372"></a><a class="code" href="classlibdap_1_1DODSFilter.html#ab4aa216d0b462b2a18234a241d9b6b01">00372</a> DODSFilter::set_dataset_name(<span class="keyword">const</span> <span class="keywordtype">string</span> ds)
<a name="l00373"></a>00373 {
<a name="l00374"></a>00374     d_dataset = <a class="code" href="namespacelibdap.html#a376f9593431111a80ef78c98b8f4a0e2">www2id</a>(ds, <span class="stringliteral">&quot;%&quot;</span>, <span class="stringliteral">&quot;%20&quot;</span>);
<a name="l00375"></a>00375 }
<a name="l00376"></a>00376 
<a name="l00380"></a>00380 <span class="keywordtype">string</span>
<a name="l00381"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a6563ae634c261dda52bc2d96090c9530">00381</a> DODSFilter::get_URL()<span class="keyword"> const</span>
<a name="l00382"></a>00382 <span class="keyword"></span>{
<a name="l00383"></a>00383     <span class="keywordflow">return</span> d_url;
<a name="l00384"></a>00384 }
<a name="l00385"></a>00385 
<a name="l00388"></a>00388 <span class="keywordtype">void</span>
<a name="l00389"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a6c1b6941a1a6421607eadd675d341077">00389</a> DODSFilter::set_URL(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;url)
<a name="l00390"></a>00390 {
<a name="l00391"></a>00391     <span class="keywordflow">if</span> (url.find(<span class="charliteral">&#39;?&#39;</span>) != url.npos)
<a name="l00392"></a>00392         print_usage();  <span class="comment">// Throws Error</span>
<a name="l00393"></a>00393 
<a name="l00394"></a>00394     d_url = url;
<a name="l00395"></a>00395 }
<a name="l00396"></a>00396 
<a name="l00404"></a>00404 <span class="keywordtype">string</span>
<a name="l00405"></a><a class="code" href="classlibdap_1_1DODSFilter.html#ad97a446900d0bf79e740d407a97ca2f5">00405</a> DODSFilter::get_dataset_version()<span class="keyword"> const</span>
<a name="l00406"></a>00406 <span class="keyword"></span>{
<a name="l00407"></a>00407     <span class="keywordflow">return</span> <span class="stringliteral">&quot;&quot;</span>;
<a name="l00408"></a>00408 }
<a name="l00409"></a>00409 
<a name="l00416"></a><a class="code" href="classlibdap_1_1DODSFilter.html#acdf3c3346d326a252d17f5dc346aed5c">00416</a> <span class="keywordtype">void</span> DODSFilter::set_response(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;r)
<a name="l00417"></a>00417 {
<a name="l00418"></a>00418     <span class="keywordflow">if</span> (r == <span class="stringliteral">&quot;DAS&quot;</span> || r == <span class="stringliteral">&quot;das&quot;</span>) {
<a name="l00419"></a>00419         d_response = DAS_Response;
<a name="l00420"></a>00420         d_action = <span class="stringliteral">&quot;das&quot;</span> ;
<a name="l00421"></a>00421     }
<a name="l00422"></a>00422     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (r == <span class="stringliteral">&quot;DDS&quot;</span> || r == <span class="stringliteral">&quot;dds&quot;</span>) {
<a name="l00423"></a>00423         d_response = DDS_Response;
<a name="l00424"></a>00424         d_action = <span class="stringliteral">&quot;dds&quot;</span> ;
<a name="l00425"></a>00425     }
<a name="l00426"></a>00426     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (r == <span class="stringliteral">&quot;DataDDS&quot;</span> || r == <span class="stringliteral">&quot;dods&quot;</span>) {
<a name="l00427"></a>00427         d_response = DataDDS_Response;
<a name="l00428"></a>00428         d_action = <span class="stringliteral">&quot;dods&quot;</span> ;
<a name="l00429"></a>00429     }
<a name="l00430"></a>00430     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (r == <span class="stringliteral">&quot;DDX&quot;</span> || r == <span class="stringliteral">&quot;ddx&quot;</span>) {
<a name="l00431"></a>00431         d_response = DDX_Response;
<a name="l00432"></a>00432         d_action = <span class="stringliteral">&quot;ddx&quot;</span> ;
<a name="l00433"></a>00433     }
<a name="l00434"></a>00434     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (r == <span class="stringliteral">&quot;DataDDX&quot;</span> || r == <span class="stringliteral">&quot;dataddx&quot;</span>) {
<a name="l00435"></a>00435         d_response = DataDDX_Response;
<a name="l00436"></a>00436         d_action = <span class="stringliteral">&quot;dataddx&quot;</span> ;
<a name="l00437"></a>00437     }
<a name="l00438"></a>00438     <span class="keywordflow">else</span> <span class="keywordflow">if</span> (r == <span class="stringliteral">&quot;Version&quot;</span>) {
<a name="l00439"></a>00439         d_response = Version_Response;
<a name="l00440"></a>00440         d_action = <span class="stringliteral">&quot;version&quot;</span> ;
<a name="l00441"></a>00441     }
<a name="l00442"></a>00442     <span class="keywordflow">else</span>
<a name="l00443"></a>00443         print_usage();   <span class="comment">// Throws Error</span>
<a name="l00444"></a>00444 }
<a name="l00445"></a>00445 
<a name="l00447"></a>00447 <a class="code" href="classlibdap_1_1DODSFilter.html#a908589f76cb20a5acdbc1eee0707fe9c">DODSFilter::Response</a>
<a name="l00448"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a463bb84c66a67099039a60462fa8aca8">00448</a> DODSFilter::get_response()<span class="keyword"> const</span>
<a name="l00449"></a>00449 <span class="keyword"></span>{
<a name="l00450"></a>00450     <span class="keywordflow">return</span> d_response;
<a name="l00451"></a>00451 }
<a name="l00452"></a>00452 
<a name="l00454"></a><a class="code" href="classlibdap_1_1DODSFilter.html#aa21f7ce7a1c4b940e9f7abf40d6e7a96">00454</a> <span class="keywordtype">string</span> DODSFilter::get_action()<span class="keyword"> const</span>
<a name="l00455"></a>00455 <span class="keyword"></span>{
<a name="l00456"></a>00456     <span class="keywordflow">return</span> d_action;
<a name="l00457"></a>00457 }
<a name="l00458"></a>00458 
<a name="l00479"></a>00479 time_t
<a name="l00480"></a><a class="code" href="classlibdap_1_1DODSFilter.html#ae8c0264353f460c217baf41d128fd2e8">00480</a> DODSFilter::get_dataset_last_modified_time()<span class="keyword"> const</span>
<a name="l00481"></a>00481 <span class="keyword"></span>{
<a name="l00482"></a>00482     <span class="keywordflow">return</span> <a class="code" href="namespacelibdap.html#a394c0b1380a16e886f96bf4a9081ed3a">last_modified_time</a>(d_dataset);
<a name="l00483"></a>00483 }
<a name="l00484"></a>00484 
<a name="l00494"></a>00494 time_t
<a name="l00495"></a><a class="code" href="classlibdap_1_1DODSFilter.html#ab55744c3af88ff8f07f0222677b7b4c7">00495</a> DODSFilter::get_das_last_modified_time(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;anc_location)<span class="keyword"> const</span>
<a name="l00496"></a>00496 <span class="keyword"></span>{
<a name="l00497"></a>00497     <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;DODSFilter::get_das_last_modified_time(anc_location=&quot;</span>
<a name="l00498"></a>00498         &lt;&lt; anc_location &lt;&lt; <span class="stringliteral">&quot;call faf(das) d_dataset=&quot;</span> &lt;&lt; d_dataset
<a name="l00499"></a>00499         &lt;&lt; <span class="stringliteral">&quot; d_anc_file=&quot;</span> &lt;&lt; d_anc_file &lt;&lt; endl);
<a name="l00500"></a>00500 
<a name="l00501"></a>00501     <span class="keywordtype">string</span> name
<a name="l00502"></a>00502     = Ancillary::find_ancillary_file(d_dataset, <span class="stringliteral">&quot;das&quot;</span>,
<a name="l00503"></a>00503                           (anc_location == <span class="stringliteral">&quot;&quot;</span>) ? d_anc_dir : anc_location,
<a name="l00504"></a>00504                           d_anc_file);
<a name="l00505"></a>00505 
<a name="l00506"></a>00506     <span class="keywordflow">return</span> max((name != <span class="stringliteral">&quot;&quot;</span>) ? <a class="code" href="namespacelibdap.html#a394c0b1380a16e886f96bf4a9081ed3a">last_modified_time</a>(name) : 0,
<a name="l00507"></a>00507                get_dataset_last_modified_time());
<a name="l00508"></a>00508 }
<a name="l00509"></a>00509 
<a name="l00517"></a>00517 time_t
<a name="l00518"></a><a class="code" href="classlibdap_1_1DODSFilter.html#ae572e243caf43e6c24a0b85a504fccca">00518</a> DODSFilter::get_dds_last_modified_time(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;anc_location)<span class="keyword"> const</span>
<a name="l00519"></a>00519 <span class="keyword"></span>{
<a name="l00520"></a>00520     <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;DODSFilter::get_das_last_modified_time(anc_location=&quot;</span>
<a name="l00521"></a>00521         &lt;&lt; anc_location &lt;&lt; <span class="stringliteral">&quot;call faf(dds) d_dataset=&quot;</span> &lt;&lt; d_dataset
<a name="l00522"></a>00522         &lt;&lt; <span class="stringliteral">&quot; d_anc_file=&quot;</span> &lt;&lt; d_anc_file &lt;&lt; endl);
<a name="l00523"></a>00523 
<a name="l00524"></a>00524     <span class="keywordtype">string</span> name
<a name="l00525"></a>00525     = Ancillary::find_ancillary_file(d_dataset, <span class="stringliteral">&quot;dds&quot;</span>,
<a name="l00526"></a>00526                           (anc_location == <span class="stringliteral">&quot;&quot;</span>) ? d_anc_dir : anc_location,
<a name="l00527"></a>00527                           d_anc_file);
<a name="l00528"></a>00528 
<a name="l00529"></a>00529     <span class="keywordflow">return</span> max((name != <span class="stringliteral">&quot;&quot;</span>) ? <a class="code" href="namespacelibdap.html#a394c0b1380a16e886f96bf4a9081ed3a">last_modified_time</a>(name) : 0,
<a name="l00530"></a>00530                get_dataset_last_modified_time());
<a name="l00531"></a>00531 }
<a name="l00532"></a>00532 
<a name="l00546"></a>00546 time_t
<a name="l00547"></a><a class="code" href="classlibdap_1_1DODSFilter.html#aa5fc0e0c30a428025907de4a0585f5d9">00547</a> DODSFilter::get_data_last_modified_time(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;anc_location)<span class="keyword"> const</span>
<a name="l00548"></a>00548 <span class="keyword"></span>{
<a name="l00549"></a>00549     <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;DODSFilter::get_das_last_modified_time(anc_location=&quot;</span>
<a name="l00550"></a>00550         &lt;&lt; anc_location &lt;&lt; <span class="stringliteral">&quot;call faf(both) d_dataset=&quot;</span> &lt;&lt; d_dataset
<a name="l00551"></a>00551         &lt;&lt; <span class="stringliteral">&quot; d_anc_file=&quot;</span> &lt;&lt; d_anc_file &lt;&lt; endl);
<a name="l00552"></a>00552 
<a name="l00553"></a>00553     <span class="keywordtype">string</span> dds_name
<a name="l00554"></a>00554     = Ancillary::find_ancillary_file(d_dataset, <span class="stringliteral">&quot;dds&quot;</span>,
<a name="l00555"></a>00555                           (anc_location == <span class="stringliteral">&quot;&quot;</span>) ? d_anc_dir : anc_location,
<a name="l00556"></a>00556                           d_anc_file);
<a name="l00557"></a>00557     <span class="keywordtype">string</span> das_name
<a name="l00558"></a>00558     = Ancillary::find_ancillary_file(d_dataset, <span class="stringliteral">&quot;das&quot;</span>,
<a name="l00559"></a>00559                           (anc_location == <span class="stringliteral">&quot;&quot;</span>) ? d_anc_dir : anc_location,
<a name="l00560"></a>00560                           d_anc_file);
<a name="l00561"></a>00561 
<a name="l00562"></a>00562     time_t m = max((das_name != <span class="stringliteral">&quot;&quot;</span>) ? <a class="code" href="namespacelibdap.html#a394c0b1380a16e886f96bf4a9081ed3a">last_modified_time</a>(das_name) : (time_t)0,
<a name="l00563"></a>00563                    (dds_name != <span class="stringliteral">&quot;&quot;</span>) ? <a class="code" href="namespacelibdap.html#a394c0b1380a16e886f96bf4a9081ed3a">last_modified_time</a>(dds_name) : (time_t)0);
<a name="l00564"></a>00564     <span class="comment">// Note that this is a call to get_dataset_... not get_data_...</span>
<a name="l00565"></a>00565     time_t n = get_dataset_last_modified_time();
<a name="l00566"></a>00566 
<a name="l00567"></a>00567     <span class="keywordflow">return</span> max(m, n);
<a name="l00568"></a>00568 }
<a name="l00569"></a>00569 
<a name="l00577"></a>00577 time_t
<a name="l00578"></a><a class="code" href="classlibdap_1_1DODSFilter.html#aad6c4d1bd437c7bb8b5c13d81739960f">00578</a> DODSFilter::get_request_if_modified_since()<span class="keyword"> const</span>
<a name="l00579"></a>00579 <span class="keyword"></span>{
<a name="l00580"></a>00580     <span class="keywordflow">return</span> d_if_modified_since;
<a name="l00581"></a>00581 }
<a name="l00582"></a>00582 
<a name="l00589"></a>00589 <span class="keywordtype">string</span>
<a name="l00590"></a><a class="code" href="classlibdap_1_1DODSFilter.html#afe2a7fe4d0aa60091c38da40f73e2f52">00590</a> DODSFilter::get_cache_dir()<span class="keyword"> const</span>
<a name="l00591"></a>00591 <span class="keyword"></span>{
<a name="l00592"></a>00592     <span class="keywordflow">return</span> d_cache_dir;
<a name="l00593"></a>00593 }
<a name="l00594"></a>00594 
<a name="l00599"></a>00599 <span class="keywordtype">void</span>
<a name="l00600"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a8d9a76bd0ef270d86ef40b7cc4dc03ff">00600</a> DODSFilter::set_timeout(<span class="keywordtype">int</span> t)
<a name="l00601"></a>00601 {
<a name="l00602"></a>00602     d_timeout = t;
<a name="l00603"></a>00603 }
<a name="l00604"></a>00604 
<a name="l00606"></a>00606 <span class="keywordtype">int</span>
<a name="l00607"></a><a class="code" href="classlibdap_1_1DODSFilter.html#aa3bbcd151470297d8b34bed9fbe03868">00607</a> DODSFilter::get_timeout()<span class="keyword"> const</span>
<a name="l00608"></a>00608 <span class="keyword"></span>{
<a name="l00609"></a>00609     <span class="keywordflow">return</span> d_timeout;
<a name="l00610"></a>00610 }
<a name="l00611"></a>00611 
<a name="l00612"></a>00612 <span class="preprocessor">#if FILE_METHODS</span>
<a name="l00613"></a>00613 <span class="preprocessor"></span>
<a name="l00624"></a>00624 <span class="keywordtype">void</span>
<a name="l00625"></a><a class="code" href="classlibdap_1_1DODSFilter.html#aa22ce448000822dafde1c227fe3d19ed">00625</a> DODSFilter::establish_timeout(FILE *stream)<span class="keyword"> const</span>
<a name="l00626"></a>00626 <span class="keyword"></span>{
<a name="l00627"></a>00627 <span class="preprocessor">#ifndef WIN32</span>
<a name="l00628"></a>00628 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (d_timeout &gt; 0) {
<a name="l00629"></a>00629         <a class="code" href="classlibdap_1_1SignalHandler.html">SignalHandler</a> *sh = SignalHandler::instance();
<a name="l00630"></a>00630         <a class="code" href="classlibdap_1_1EventHandler.html">EventHandler</a> *old_eh = sh-&gt;<a class="code" href="classlibdap_1_1SignalHandler.html#a1188177d392bdc1db6cf4450132c6d9f">register_handler</a>(SIGALRM, <span class="keyword">new</span> <a class="code" href="classlibdap_1_1AlarmHandler.html">AlarmHandler</a>(stream));
<a name="l00631"></a>00631         <span class="keyword">delete</span> old_eh;
<a name="l00632"></a>00632         alarm(d_timeout);
<a name="l00633"></a>00633     }
<a name="l00634"></a>00634 <span class="preprocessor">#endif</span>
<a name="l00635"></a>00635 <span class="preprocessor"></span>}
<a name="l00636"></a>00636 <span class="preprocessor">#endif</span>
<a name="l00637"></a>00637 <span class="preprocessor"></span>
<a name="l00638"></a>00638 <span class="comment">// FIXME</span>
<a name="l00639"></a>00639 <span class="keywordtype">void</span>
<a name="l00640"></a>00640 DODSFilter::establish_timeout(ostream &amp;stream)<span class="keyword"> const</span>
<a name="l00641"></a>00641 <span class="keyword"></span>{
<a name="l00642"></a>00642 <span class="preprocessor">#ifndef WIN32</span>
<a name="l00643"></a>00643 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (d_timeout &gt; 0) {
<a name="l00644"></a>00644         <a class="code" href="classlibdap_1_1SignalHandler.html">SignalHandler</a> *sh = SignalHandler::instance();
<a name="l00645"></a>00645         <a class="code" href="classlibdap_1_1EventHandler.html">EventHandler</a> *old_eh = sh-&gt;<a class="code" href="classlibdap_1_1SignalHandler.html#a1188177d392bdc1db6cf4450132c6d9f">register_handler</a>(SIGALRM, <span class="keyword">new</span> <a class="code" href="classlibdap_1_1AlarmHandler.html">AlarmHandler</a>(stream));
<a name="l00646"></a>00646         <span class="keyword">delete</span> old_eh;
<a name="l00647"></a>00647         alarm(d_timeout);
<a name="l00648"></a>00648     }
<a name="l00649"></a>00649 <span class="preprocessor">#endif</span>
<a name="l00650"></a>00650 <span class="preprocessor"></span>}
<a name="l00651"></a>00651 
<a name="l00652"></a>00652 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *emessage = <span class="stringliteral">&quot;DODS internal server error; usage error. Please report this to the dataset maintainer, or to the opendap-tech@opendap.org mailing list.&quot;</span>;
<a name="l00653"></a>00653 
<a name="l00663"></a>00663 <span class="keywordtype">void</span>
<a name="l00664"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a73e8b49c5a7927a373e6088ad60a5193">00664</a> DODSFilter::print_usage()<span class="keyword"> const</span>
<a name="l00665"></a>00665 <span class="keyword"></span>{
<a name="l00666"></a>00666     <span class="comment">// Write a message to the WWW server error log file.</span>
<a name="l00667"></a>00667     <a class="code" href="namespacelibdap.html#ac76ab0ba8dd2e6d2db8e4d07175ea266" title="Logs an error message.">ErrMsgT</a>(<a class="code" href="getdap_8cc.html#a9391ac68c9115711e45eb80120891130">usage</a>.c_str());
<a name="l00668"></a>00668 
<a name="l00669"></a>00669     <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<a class="code" href="Error_8h.html#a40b0db75d00d0338a597aa84e71109bf" title="Unknown error.">unknown_error</a>, emessage);
<a name="l00670"></a>00670 }
<a name="l00671"></a>00671 
<a name="l00677"></a>00677 <span class="keywordtype">void</span>
<a name="l00678"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a17243fd4f8bc977f091f125572502bf5">00678</a> DODSFilter::send_version_info()<span class="keyword"> const</span>
<a name="l00679"></a>00679 <span class="keyword"></span>{
<a name="l00680"></a>00680     <a class="code" href="namespacelibdap.html#a7e95f81049cb65e60edcc5ec41d445d7" title="Send a version number.">do_version</a>(d_cgi_ver, get_dataset_version());
<a name="l00681"></a>00681 }
<a name="l00682"></a>00682 
<a name="l00683"></a>00683 <span class="preprocessor">#if FILE_METHODS</span>
<a name="l00684"></a>00684 <span class="preprocessor"></span>
<a name="l00695"></a>00695 <span class="keywordtype">void</span>
<a name="l00696"></a>00696 DODSFilter::send_das(FILE *out, <a class="code" href="classlibdap_1_1DAS.html" title="Hold attribute data for a DAP2 dataset.">DAS</a> &amp;das, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;anc_location,
<a name="l00697"></a>00697                      <span class="keywordtype">bool</span> with_mime_headers)<span class="keyword"> const</span>
<a name="l00698"></a>00698 <span class="keyword"></span>{
<a name="l00699"></a>00699     time_t das_lmt = get_das_last_modified_time(anc_location);
<a name="l00700"></a>00700     <span class="keywordflow">if</span> (is_conditional()
<a name="l00701"></a>00701         &amp;&amp; das_lmt &lt;= get_request_if_modified_since()
<a name="l00702"></a>00702         &amp;&amp; with_mime_headers) {
<a name="l00703"></a>00703         <a class="code" href="namespacelibdap.html#a9ff38622675d29e932726aea56525a40" title="Send a `Not Modified&amp;#39; response.">set_mime_not_modified</a>(out);
<a name="l00704"></a>00704     }
<a name="l00705"></a>00705     <span class="keywordflow">else</span> {
<a name="l00706"></a>00706         <span class="keywordflow">if</span> (with_mime_headers)
<a name="l00707"></a>00707             <a class="code" href="namespacelibdap.html#a7a785b8fcc89e5be01284c06a9dbc97d">set_mime_text</a>(out, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aa02461a6c30af5fa6a789ea22fef8534e">dods_das</a>, d_cgi_ver, <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55ab128dd348d8e64eff653ca8efa0574f4">x_plain</a>, das_lmt);
<a name="l00708"></a>00708         das.<a class="code" href="classlibdap_1_1DAS.html#a8983b961e6fba3a6fd33ffcfd944eaf2">print</a>(out);
<a name="l00709"></a>00709     }
<a name="l00710"></a>00710     fflush(out) ;
<a name="l00711"></a>00711 }
<a name="l00712"></a>00712 <span class="preprocessor">#endif</span>
<a name="l00713"></a>00713 <span class="preprocessor"></span>
<a name="l00725"></a>00725 <span class="keywordtype">void</span>
<a name="l00726"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a18819961cd0413a5535335dae91f8f76">00726</a> DODSFilter::send_das(ostream &amp;out, <a class="code" href="classlibdap_1_1DAS.html" title="Hold attribute data for a DAP2 dataset.">DAS</a> &amp;das, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;anc_location,
<a name="l00727"></a>00727                      <span class="keywordtype">bool</span> with_mime_headers)<span class="keyword"> const</span>
<a name="l00728"></a>00728 <span class="keyword"></span>{
<a name="l00729"></a>00729     time_t das_lmt = get_das_last_modified_time(anc_location);
<a name="l00730"></a>00730     <span class="keywordflow">if</span> (is_conditional()
<a name="l00731"></a>00731         &amp;&amp; das_lmt &lt;= get_request_if_modified_since()
<a name="l00732"></a>00732         &amp;&amp; with_mime_headers) {
<a name="l00733"></a>00733         <a class="code" href="namespacelibdap.html#a9ff38622675d29e932726aea56525a40" title="Send a `Not Modified&amp;#39; response.">set_mime_not_modified</a>(out);
<a name="l00734"></a>00734     }
<a name="l00735"></a>00735     <span class="keywordflow">else</span> {
<a name="l00736"></a>00736         <span class="keywordflow">if</span> (with_mime_headers)
<a name="l00737"></a>00737             <a class="code" href="namespacelibdap.html#a7a785b8fcc89e5be01284c06a9dbc97d">set_mime_text</a>(out, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aa02461a6c30af5fa6a789ea22fef8534e">dods_das</a>, d_cgi_ver, <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55ab128dd348d8e64eff653ca8efa0574f4">x_plain</a>, das_lmt);
<a name="l00738"></a>00738         das.<a class="code" href="classlibdap_1_1DAS.html#a8983b961e6fba3a6fd33ffcfd944eaf2">print</a>(out);
<a name="l00739"></a>00739     }
<a name="l00740"></a>00740     out &lt;&lt; flush ;
<a name="l00741"></a>00741 }
<a name="l00742"></a>00742 
<a name="l00743"></a>00743 <span class="keywordtype">void</span>
<a name="l00744"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a5a8258609efd1f9a5f9aeea50995aee7">00744</a> DODSFilter::send_das(<a class="code" href="classlibdap_1_1DAS.html" title="Hold attribute data for a DAP2 dataset.">DAS</a> &amp;das, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;anc_location,
<a name="l00745"></a>00745                      <span class="keywordtype">bool</span> with_mime_headers)<span class="keyword"> const</span>
<a name="l00746"></a>00746 <span class="keyword"></span>{
<a name="l00747"></a>00747     send_das(cout, das, anc_location, with_mime_headers);
<a name="l00748"></a>00748 }
<a name="l00749"></a>00749 
<a name="l00750"></a>00750 <span class="preprocessor">#if FILE_METHODS</span>
<a name="l00751"></a>00751 <span class="preprocessor"></span>
<a name="l00767"></a>00767 <span class="keywordtype">void</span>
<a name="l00768"></a>00768 DODSFilter::send_dds(FILE *out, <a class="code" href="classlibdap_1_1DDS.html">DDS</a> &amp;dds, <a class="code" href="classlibdap_1_1ConstraintEvaluator.html" title="Evaluate a constraint expression.">ConstraintEvaluator</a> &amp;eval,
<a name="l00769"></a>00769                      <span class="keywordtype">bool</span> constrained,
<a name="l00770"></a>00770                      <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;anc_location,
<a name="l00771"></a>00771                      <span class="keywordtype">bool</span> with_mime_headers)<span class="keyword"> const</span>
<a name="l00772"></a>00772 <span class="keyword"></span>{
<a name="l00773"></a>00773     <span class="comment">// If constrained, parse the constraint. Throws Error or InternalErr.</span>
<a name="l00774"></a>00774     <span class="keywordflow">if</span> (constrained)
<a name="l00775"></a>00775         eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#aaeb4a7662178b992d9e36ff1dc0fc2bc" title="Parse the constraint expression given the current DDS.">parse_constraint</a>(d_ce, dds);
<a name="l00776"></a>00776 
<a name="l00777"></a>00777     <span class="keywordflow">if</span> (eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#add46ce1d9ef36fa26a2913d8d7c51096" title="Does the current constraint expression return a BaseType pointer? This method does not evaluate the c...">functional_expression</a>())
<a name="l00778"></a>00778         <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<span class="stringliteral">&quot;Function calls can only be used with data requests. To see the structure of the underlying data source, reissue the URL without the function.&quot;</span>);
<a name="l00779"></a>00779 
<a name="l00780"></a>00780     time_t dds_lmt = get_dds_last_modified_time(anc_location);
<a name="l00781"></a>00781     <span class="keywordflow">if</span> (is_conditional()
<a name="l00782"></a>00782         &amp;&amp; dds_lmt &lt;= get_request_if_modified_since()
<a name="l00783"></a>00783         &amp;&amp; with_mime_headers) {
<a name="l00784"></a>00784         <a class="code" href="namespacelibdap.html#a9ff38622675d29e932726aea56525a40" title="Send a `Not Modified&amp;#39; response.">set_mime_not_modified</a>(out);
<a name="l00785"></a>00785     }
<a name="l00786"></a>00786     <span class="keywordflow">else</span> {
<a name="l00787"></a>00787         <span class="keywordflow">if</span> (with_mime_headers)
<a name="l00788"></a>00788             <a class="code" href="namespacelibdap.html#a7a785b8fcc89e5be01284c06a9dbc97d">set_mime_text</a>(out, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aae5a70721811fccc5ee73852269b01a01">dods_dds</a>, d_cgi_ver, <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55ab128dd348d8e64eff653ca8efa0574f4">x_plain</a>, dds_lmt);
<a name="l00789"></a>00789         <span class="keywordflow">if</span> (constrained)
<a name="l00790"></a>00790             dds.<a class="code" href="classlibdap_1_1DDS.html#ab2e1cacd542373312d5154565b3c1571" title="Print a constrained DDS to the specified ostream.">print_constrained</a>(out);
<a name="l00791"></a>00791         <span class="keywordflow">else</span>
<a name="l00792"></a>00792             dds.<a class="code" href="classlibdap_1_1DDS.html#a535b5900c31f0038061f4aef5fa1c6c1" title="Print the entire DDS to the specified ostream.">print</a>(out);
<a name="l00793"></a>00793     }
<a name="l00794"></a>00794 
<a name="l00795"></a>00795     fflush(out) ;
<a name="l00796"></a>00796 }
<a name="l00797"></a>00797 <span class="preprocessor">#endif</span>
<a name="l00798"></a>00798 <span class="preprocessor"></span>
<a name="l00815"></a>00815 <span class="keywordtype">void</span>
<a name="l00816"></a><a class="code" href="classlibdap_1_1DODSFilter.html#ace2a4de8462020ceaa32edb69d53b706">00816</a> DODSFilter::send_dds(ostream &amp;out, <a class="code" href="classlibdap_1_1DDS.html">DDS</a> &amp;dds, <a class="code" href="classlibdap_1_1ConstraintEvaluator.html" title="Evaluate a constraint expression.">ConstraintEvaluator</a> &amp;eval,
<a name="l00817"></a>00817                      <span class="keywordtype">bool</span> constrained,
<a name="l00818"></a>00818                      <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;anc_location,
<a name="l00819"></a>00819                      <span class="keywordtype">bool</span> with_mime_headers)<span class="keyword"> const</span>
<a name="l00820"></a>00820 <span class="keyword"></span>{
<a name="l00821"></a>00821     <span class="comment">// If constrained, parse the constraint. Throws Error or InternalErr.</span>
<a name="l00822"></a>00822     <span class="keywordflow">if</span> (constrained)
<a name="l00823"></a>00823         eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#aaeb4a7662178b992d9e36ff1dc0fc2bc" title="Parse the constraint expression given the current DDS.">parse_constraint</a>(d_ce, dds);
<a name="l00824"></a>00824 
<a name="l00825"></a>00825     <span class="keywordflow">if</span> (eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#add46ce1d9ef36fa26a2913d8d7c51096" title="Does the current constraint expression return a BaseType pointer? This method does not evaluate the c...">functional_expression</a>())
<a name="l00826"></a>00826         <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<span class="stringliteral">&quot;Function calls can only be used with data requests. To see the structure of the underlying data source, reissue the URL without the function.&quot;</span>);
<a name="l00827"></a>00827 
<a name="l00828"></a>00828     time_t dds_lmt = get_dds_last_modified_time(anc_location);
<a name="l00829"></a>00829     <span class="keywordflow">if</span> (is_conditional()
<a name="l00830"></a>00830         &amp;&amp; dds_lmt &lt;= get_request_if_modified_since()
<a name="l00831"></a>00831         &amp;&amp; with_mime_headers) {
<a name="l00832"></a>00832         <a class="code" href="namespacelibdap.html#a9ff38622675d29e932726aea56525a40" title="Send a `Not Modified&amp;#39; response.">set_mime_not_modified</a>(out);
<a name="l00833"></a>00833     }
<a name="l00834"></a>00834     <span class="keywordflow">else</span> {
<a name="l00835"></a>00835         <span class="keywordflow">if</span> (with_mime_headers)
<a name="l00836"></a>00836             <a class="code" href="namespacelibdap.html#a7a785b8fcc89e5be01284c06a9dbc97d">set_mime_text</a>(out, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aae5a70721811fccc5ee73852269b01a01">dods_dds</a>, d_cgi_ver, <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55ab128dd348d8e64eff653ca8efa0574f4">x_plain</a>, dds_lmt);
<a name="l00837"></a>00837         <span class="keywordflow">if</span> (constrained)
<a name="l00838"></a>00838             dds.<a class="code" href="classlibdap_1_1DDS.html#ab2e1cacd542373312d5154565b3c1571" title="Print a constrained DDS to the specified ostream.">print_constrained</a>(out);
<a name="l00839"></a>00839         <span class="keywordflow">else</span>
<a name="l00840"></a>00840             dds.<a class="code" href="classlibdap_1_1DDS.html#a535b5900c31f0038061f4aef5fa1c6c1" title="Print the entire DDS to the specified ostream.">print</a>(out);
<a name="l00841"></a>00841     }
<a name="l00842"></a>00842 
<a name="l00843"></a>00843     out &lt;&lt; flush ;
<a name="l00844"></a>00844 }
<a name="l00845"></a>00845 
<a name="l00846"></a>00846 <span class="keywordtype">void</span>
<a name="l00847"></a><a class="code" href="classlibdap_1_1DODSFilter.html#accaa557685fa556753f0a63cbc3b2d60">00847</a> DODSFilter::send_dds(<a class="code" href="classlibdap_1_1DDS.html">DDS</a> &amp;dds, <a class="code" href="classlibdap_1_1ConstraintEvaluator.html" title="Evaluate a constraint expression.">ConstraintEvaluator</a> &amp;eval,
<a name="l00848"></a>00848                      <span class="keywordtype">bool</span> constrained, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;anc_location,
<a name="l00849"></a>00849                      <span class="keywordtype">bool</span> with_mime_headers)<span class="keyword"> const</span>
<a name="l00850"></a>00850 <span class="keyword"></span>{
<a name="l00851"></a>00851     send_dds(cout, dds, eval, constrained, anc_location, with_mime_headers);
<a name="l00852"></a>00852 }
<a name="l00853"></a>00853 
<a name="l00854"></a>00854 <span class="preprocessor">#if FILE_METHODS</span>
<a name="l00855"></a>00855 <span class="preprocessor"></span><span class="comment">// &#39;lmt&#39; unused. Should it be used to supply a LMT or removed from the</span>
<a name="l00856"></a>00856 <span class="comment">// method? jhrg 8/9/05</span>
<a name="l00857"></a>00857 <span class="keywordtype">void</span>
<a name="l00858"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a16dd363c7532a7b590c405151332489a">00858</a> DODSFilter::functional_constraint(<a class="code" href="classlibdap_1_1BaseType.html" title="The basic data type for the DODS DAP types.">BaseType</a> &amp;var, <a class="code" href="classlibdap_1_1DDS.html">DDS</a> &amp;dds,
<a name="l00859"></a>00859                                   <a class="code" href="classlibdap_1_1ConstraintEvaluator.html" title="Evaluate a constraint expression.">ConstraintEvaluator</a> &amp;eval, FILE *out)<span class="keyword"> const</span>
<a name="l00860"></a>00860 <span class="keyword"></span>{
<a name="l00861"></a>00861     fprintf(out, <span class="stringliteral">&quot;Dataset {\n&quot;</span>);
<a name="l00862"></a>00862     var.<a class="code" href="classlibdap_1_1BaseType.html#afd744b0ddeb04e7b173c9e83423ec572" title="Print an ASCII representation of the variable structure.">print_decl</a>(out, <span class="stringliteral">&quot;    &quot;</span>, <span class="keyword">true</span>, <span class="keyword">false</span>, <span class="keyword">true</span>);
<a name="l00863"></a>00863     fprintf(out, <span class="stringliteral">&quot;} function_value;\n&quot;</span>);
<a name="l00864"></a>00864     fprintf(out, <span class="stringliteral">&quot;Data:\n&quot;</span>);
<a name="l00865"></a>00865 
<a name="l00866"></a>00866     fflush(out);
<a name="l00867"></a>00867 
<a name="l00868"></a>00868     <a class="code" href="classlibdap_1_1XDRFileMarshaller.html" title="marshaller that knows how to marshall/serialize dap data objects to a file using XDR">XDRFileMarshaller</a> m( out ) ;
<a name="l00869"></a>00869 
<a name="l00870"></a>00870     <span class="keywordflow">try</span> {
<a name="l00871"></a>00871         <span class="comment">// In the following call to serialize, suppress CE evaluation.</span>
<a name="l00872"></a>00872         var.<a class="code" href="classlibdap_1_1BaseType.html#a1f45893684a69b50b37817b88230de9f" title="Move data to the net.">serialize</a>(eval, dds, m, <span class="keyword">false</span>);
<a name="l00873"></a>00873     }
<a name="l00874"></a>00874     <span class="keywordflow">catch</span> (<a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a> &amp;e) {
<a name="l00875"></a>00875         <span class="keywordflow">throw</span>;
<a name="l00876"></a>00876     }
<a name="l00877"></a>00877 }
<a name="l00878"></a>00878 <span class="preprocessor">#endif</span>
<a name="l00879"></a>00879 <span class="preprocessor"></span>
<a name="l00880"></a>00880 <span class="comment">// &#39;lmt&#39; unused. Should it be used to supply a LMT or removed from the</span>
<a name="l00881"></a>00881 <span class="comment">// method? jhrg 8/9/05</span>
<a name="l00882"></a>00882 <span class="keywordtype">void</span>
<a name="l00883"></a>00883 DODSFilter::functional_constraint(<a class="code" href="classlibdap_1_1BaseType.html" title="The basic data type for the DODS DAP types.">BaseType</a> &amp;var, <a class="code" href="classlibdap_1_1DDS.html">DDS</a> &amp;dds,
<a name="l00884"></a>00884                                   <a class="code" href="classlibdap_1_1ConstraintEvaluator.html" title="Evaluate a constraint expression.">ConstraintEvaluator</a> &amp;eval, ostream &amp;out)<span class="keyword"> const</span>
<a name="l00885"></a>00885 <span class="keyword"></span>{
<a name="l00886"></a>00886     out &lt;&lt; <span class="stringliteral">&quot;Dataset {\n&quot;</span> ;
<a name="l00887"></a>00887     var.<a class="code" href="classlibdap_1_1BaseType.html#afd744b0ddeb04e7b173c9e83423ec572" title="Print an ASCII representation of the variable structure.">print_decl</a>(out, <span class="stringliteral">&quot;    &quot;</span>, <span class="keyword">true</span>, <span class="keyword">false</span>, <span class="keyword">true</span>);
<a name="l00888"></a>00888     out &lt;&lt; <span class="stringliteral">&quot;} function_value;\n&quot;</span> ;
<a name="l00889"></a>00889     out &lt;&lt; <span class="stringliteral">&quot;Data:\n&quot;</span> ;
<a name="l00890"></a>00890 
<a name="l00891"></a>00891     out &lt;&lt; flush ;
<a name="l00892"></a>00892 
<a name="l00893"></a>00893     <span class="comment">// Grab a stream that encodes using XDR.</span>
<a name="l00894"></a>00894     <a class="code" href="classlibdap_1_1XDRStreamMarshaller.html" title="marshaller that knows how to marshal/serialize dap data objects to a C++ iostream using XDR...">XDRStreamMarshaller</a> m( out ) ;
<a name="l00895"></a>00895 
<a name="l00896"></a>00896     <span class="keywordflow">try</span> {
<a name="l00897"></a>00897         <span class="comment">// In the following call to serialize, suppress CE evaluation.</span>
<a name="l00898"></a>00898         var.<a class="code" href="classlibdap_1_1BaseType.html#a1f45893684a69b50b37817b88230de9f" title="Move data to the net.">serialize</a>(eval, dds, m, <span class="keyword">false</span>);
<a name="l00899"></a>00899     }
<a name="l00900"></a>00900     <span class="keywordflow">catch</span> (Error &amp;e) {
<a name="l00901"></a>00901         <span class="keywordflow">throw</span>;
<a name="l00902"></a>00902     }
<a name="l00903"></a>00903 }
<a name="l00904"></a>00904 
<a name="l00905"></a>00905 <span class="preprocessor">#if FILE_METHODS</span>
<a name="l00906"></a>00906 <span class="preprocessor"></span><span class="keywordtype">void</span>
<a name="l00907"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a583e99824e39a20f95c09c9c76caf16c">00907</a> DODSFilter::dataset_constraint(<a class="code" href="classlibdap_1_1DDS.html">DDS</a> &amp; dds, <a class="code" href="classlibdap_1_1ConstraintEvaluator.html" title="Evaluate a constraint expression.">ConstraintEvaluator</a> &amp; eval,
<a name="l00908"></a>00908                                FILE * out, <span class="keywordtype">bool</span> ce_eval)<span class="keyword"> const</span>
<a name="l00909"></a>00909 <span class="keyword"></span>{
<a name="l00910"></a>00910     <span class="comment">// send constrained DDS</span>
<a name="l00911"></a>00911     dds.<a class="code" href="classlibdap_1_1DDS.html#ab2e1cacd542373312d5154565b3c1571" title="Print a constrained DDS to the specified ostream.">print_constrained</a>(out);
<a name="l00912"></a>00912     fprintf(out, <span class="stringliteral">&quot;Data:\n&quot;</span>);
<a name="l00913"></a>00913     fflush(out);
<a name="l00914"></a>00914 
<a name="l00915"></a>00915     <span class="comment">// Grab a stream that encodes using XDR.</span>
<a name="l00916"></a>00916     <a class="code" href="classlibdap_1_1XDRFileMarshaller.html" title="marshaller that knows how to marshall/serialize dap data objects to a file using XDR">XDRFileMarshaller</a> m( out ) ;
<a name="l00917"></a>00917 
<a name="l00918"></a>00918     <span class="keywordflow">try</span> {
<a name="l00919"></a>00919         <span class="comment">// Send all variables in the current projection (send_p())</span>
<a name="l00920"></a>00920         <span class="keywordflow">for</span> (<a class="code" href="classlibdap_1_1DDS.html#a5140f67d8f7eecf0a260d8a5d9fc39c5">DDS::Vars_iter</a> i = dds.<a class="code" href="classlibdap_1_1DDS.html#aac98f248cd5730a8769f9d71af9788d3" title="Return an iterator to the first variable.">var_begin</a>(); i != dds.<a class="code" href="classlibdap_1_1DDS.html#ad204bbd6eed8d440fb996f41bc986058" title="Return an iterator.">var_end</a>(); i++)
<a name="l00921"></a>00921             <span class="keywordflow">if</span> ((*i)-&gt;send_p()) {
<a name="l00922"></a>00922                 <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;Sending &quot;</span> &lt;&lt; (*i)-&gt;name() &lt;&lt; endl);
<a name="l00923"></a>00923                 (*i)-&gt;serialize(eval, dds, m, ce_eval);
<a name="l00924"></a>00924             }
<a name="l00925"></a>00925     }
<a name="l00926"></a>00926     <span class="keywordflow">catch</span> (<a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a> &amp; e) {
<a name="l00927"></a>00927         <span class="keywordflow">throw</span>;
<a name="l00928"></a>00928     }
<a name="l00929"></a>00929 }
<a name="l00930"></a>00930 <span class="preprocessor">#endif</span>
<a name="l00931"></a>00931 <span class="preprocessor"></span>
<a name="l00932"></a>00932 <span class="keywordtype">void</span>
<a name="l00933"></a>00933 DODSFilter::dataset_constraint(<a class="code" href="classlibdap_1_1DDS.html">DDS</a> &amp; dds, <a class="code" href="classlibdap_1_1ConstraintEvaluator.html" title="Evaluate a constraint expression.">ConstraintEvaluator</a> &amp; eval,
<a name="l00934"></a>00934                                ostream &amp;out, <span class="keywordtype">bool</span> ce_eval)<span class="keyword"> const</span>
<a name="l00935"></a>00935 <span class="keyword"></span>{
<a name="l00936"></a>00936     <span class="comment">// send constrained DDS</span>
<a name="l00937"></a>00937     dds.<a class="code" href="classlibdap_1_1DDS.html#ab2e1cacd542373312d5154565b3c1571" title="Print a constrained DDS to the specified ostream.">print_constrained</a>(out);
<a name="l00938"></a>00938     out &lt;&lt; <span class="stringliteral">&quot;Data:\n&quot;</span> ;
<a name="l00939"></a>00939     out &lt;&lt; flush ;
<a name="l00940"></a>00940 
<a name="l00941"></a>00941     <span class="comment">// Grab a stream that encodes using XDR.</span>
<a name="l00942"></a>00942     <a class="code" href="classlibdap_1_1XDRStreamMarshaller.html" title="marshaller that knows how to marshal/serialize dap data objects to a C++ iostream using XDR...">XDRStreamMarshaller</a> m( out ) ;
<a name="l00943"></a>00943 
<a name="l00944"></a>00944     <span class="keywordflow">try</span> {
<a name="l00945"></a>00945         <span class="comment">// Send all variables in the current projection (send_p())</span>
<a name="l00946"></a>00946         <span class="keywordflow">for</span> (<a class="code" href="classlibdap_1_1DDS.html#a5140f67d8f7eecf0a260d8a5d9fc39c5">DDS::Vars_iter</a> i = dds.<a class="code" href="classlibdap_1_1DDS.html#aac98f248cd5730a8769f9d71af9788d3" title="Return an iterator to the first variable.">var_begin</a>(); i != dds.<a class="code" href="classlibdap_1_1DDS.html#ad204bbd6eed8d440fb996f41bc986058" title="Return an iterator.">var_end</a>(); i++)
<a name="l00947"></a>00947             <span class="keywordflow">if</span> ((*i)-&gt;send_p()) {
<a name="l00948"></a>00948                 <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;Sending &quot;</span> &lt;&lt; (*i)-&gt;name() &lt;&lt; endl);
<a name="l00949"></a>00949                 (*i)-&gt;serialize(eval, dds, m, ce_eval);
<a name="l00950"></a>00950             }
<a name="l00951"></a>00951     }
<a name="l00952"></a>00952     <span class="keywordflow">catch</span> (Error &amp; e) {
<a name="l00953"></a>00953         <span class="keywordflow">throw</span>;
<a name="l00954"></a>00954     }
<a name="l00955"></a>00955 }
<a name="l00956"></a>00956 
<a name="l00957"></a>00957 <span class="keywordtype">void</span>
<a name="l00958"></a><a class="code" href="classlibdap_1_1DODSFilter.html#af839215a3954a918196a69830a89605e">00958</a> DODSFilter::dataset_constraint_ddx(<a class="code" href="classlibdap_1_1DDS.html">DDS</a> &amp; dds, <a class="code" href="classlibdap_1_1ConstraintEvaluator.html" title="Evaluate a constraint expression.">ConstraintEvaluator</a> &amp; eval,
<a name="l00959"></a>00959                                ostream &amp;out, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;boundary,
<a name="l00960"></a>00960                                <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;start, <span class="keywordtype">bool</span> ce_eval)<span class="keyword"> const</span>
<a name="l00961"></a>00961 <span class="keyword"></span>{
<a name="l00962"></a>00962     <span class="comment">// Write the MPM headers for the DDX (text/xml) part of the response</span>
<a name="l00963"></a>00963     <a class="code" href="namespacelibdap.html#a387c60d25f7e78d4ced09c7907ad0662">set_mime_ddx_boundary</a>(out, boundary, start, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aa605a335e5665d5f3ac75cacf42a15ae8">dap4_ddx</a>);
<a name="l00964"></a>00964 
<a name="l00965"></a>00965     <span class="comment">// Make cid</span>
<a name="l00966"></a>00966     uuid_t uu;
<a name="l00967"></a>00967     uuid_generate(uu);
<a name="l00968"></a>00968     <span class="keywordtype">char</span> uuid[37];
<a name="l00969"></a>00969     uuid_unparse(uu, &amp;uuid[0]);
<a name="l00970"></a>00970     <span class="keywordtype">char</span> domain[256];
<a name="l00971"></a>00971     <span class="keywordflow">if</span> (getdomainname(domain, 255) != 0 || strlen(domain) == 0)
<a name="l00972"></a>00972         strncpy(domain, <span class="stringliteral">&quot;opendap.org&quot;</span>, 255);
<a name="l00973"></a>00973 
<a name="l00974"></a>00974     <span class="keywordtype">string</span> cid = string(&amp;uuid[0]) + <span class="stringliteral">&quot;@&quot;</span> + string(&amp;domain[0]);
<a name="l00975"></a>00975 
<a name="l00976"></a>00976     <span class="comment">// Send constrained DDX with a data blob reference</span>
<a name="l00977"></a>00977     dds.<a class="code" href="classlibdap_1_1DDS.html#af319354a044d02ea89732160131004dc">print_xml</a>(out, <span class="keyword">true</span>, cid);
<a name="l00978"></a>00978 
<a name="l00979"></a>00979     <span class="comment">// Write the MPM headers for the data part of the response.</span>
<a name="l00980"></a>00980     <a class="code" href="namespacelibdap.html#a02822649dbf10c226e3f6be5c8a89991">set_mime_data_boundary</a>(out, boundary, cid, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aa3024d0ef2b1d655dedba800665b7f513">dap4_data</a>, <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55a0fd591f50f7b35fe2a22a216a49bd654">binary</a>);
<a name="l00981"></a>00981 
<a name="l00982"></a>00982     <span class="comment">// Grab a stream that encodes using XDR.</span>
<a name="l00983"></a>00983     <a class="code" href="classlibdap_1_1XDRStreamMarshaller.html" title="marshaller that knows how to marshal/serialize dap data objects to a C++ iostream using XDR...">XDRStreamMarshaller</a> m( out ) ;
<a name="l00984"></a>00984 
<a name="l00985"></a>00985     <span class="keywordflow">try</span> {
<a name="l00986"></a>00986         <span class="comment">// Send all variables in the current projection (send_p())</span>
<a name="l00987"></a>00987         <span class="keywordflow">for</span> (<a class="code" href="classlibdap_1_1DDS.html#a5140f67d8f7eecf0a260d8a5d9fc39c5">DDS::Vars_iter</a> i = dds.<a class="code" href="classlibdap_1_1DDS.html#aac98f248cd5730a8769f9d71af9788d3" title="Return an iterator to the first variable.">var_begin</a>(); i != dds.<a class="code" href="classlibdap_1_1DDS.html#ad204bbd6eed8d440fb996f41bc986058" title="Return an iterator.">var_end</a>(); i++)
<a name="l00988"></a>00988             <span class="keywordflow">if</span> ((*i)-&gt;send_p()) {
<a name="l00989"></a>00989                 <a class="code" href="debug_8h.html#a32adf79142f0a426b5e782fb7cd4cad3">DBG</a>(cerr &lt;&lt; <span class="stringliteral">&quot;Sending &quot;</span> &lt;&lt; (*i)-&gt;name() &lt;&lt; endl);
<a name="l00990"></a>00990                 (*i)-&gt;serialize(eval, dds, m, ce_eval);
<a name="l00991"></a>00991             }
<a name="l00992"></a>00992     }
<a name="l00993"></a>00993     <span class="keywordflow">catch</span> (<a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a> &amp; e) {
<a name="l00994"></a>00994         <span class="keywordflow">throw</span>;
<a name="l00995"></a>00995     }
<a name="l00996"></a>00996 }
<a name="l00997"></a>00997 
<a name="l00998"></a>00998 <span class="preprocessor">#if FILE_METHODS</span>
<a name="l00999"></a>00999 <span class="preprocessor"></span>
<a name="l01015"></a>01015 <span class="keywordtype">void</span>
<a name="l01016"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a01f7f1509b351472c74493303429e43d">01016</a> DODSFilter::send_data(<a class="code" href="classlibdap_1_1DDS.html">DDS</a> &amp; dds, <a class="code" href="classlibdap_1_1ConstraintEvaluator.html" title="Evaluate a constraint expression.">ConstraintEvaluator</a> &amp; eval,
<a name="l01017"></a>01017                       FILE * data_stream, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp; anc_location,
<a name="l01018"></a>01018                       <span class="keywordtype">bool</span> with_mime_headers)<span class="keyword"> const</span>
<a name="l01019"></a>01019 <span class="keyword"></span>{
<a name="l01020"></a>01020     <span class="comment">// If this is a conditional request and the server should send a 304</span>
<a name="l01021"></a>01021     <span class="comment">// response, do that and exit. Otherwise, continue on and send the full</span>
<a name="l01022"></a>01022     <span class="comment">// response.</span>
<a name="l01023"></a>01023     time_t data_lmt = get_data_last_modified_time(anc_location);
<a name="l01024"></a>01024     <span class="keywordflow">if</span> (is_conditional()
<a name="l01025"></a>01025         &amp;&amp; data_lmt &lt;= get_request_if_modified_since()
<a name="l01026"></a>01026         &amp;&amp; with_mime_headers) {
<a name="l01027"></a>01027         <a class="code" href="namespacelibdap.html#a9ff38622675d29e932726aea56525a40" title="Send a `Not Modified&amp;#39; response.">set_mime_not_modified</a>(data_stream);
<a name="l01028"></a>01028         <span class="keywordflow">return</span>;
<a name="l01029"></a>01029     }
<a name="l01030"></a>01030     <span class="comment">// Set up the alarm.</span>
<a name="l01031"></a>01031     establish_timeout(data_stream);
<a name="l01032"></a>01032     dds.<a class="code" href="classlibdap_1_1DDS.html#ac97d9bc59c742b46614779f9381baf6a">set_timeout</a>(d_timeout);
<a name="l01033"></a>01033 
<a name="l01034"></a>01034     eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#aaeb4a7662178b992d9e36ff1dc0fc2bc" title="Parse the constraint expression given the current DDS.">parse_constraint</a>(d_ce, dds);   <span class="comment">// Throws Error if the ce doesn&#39;t</span>
<a name="l01035"></a>01035                                         <span class="comment">// parse.</span>
<a name="l01036"></a>01036 
<a name="l01037"></a>01037     dds.<a class="code" href="classlibdap_1_1DDS.html#a9d4421c2ccfdbc5ebd4a7d963ab53795" title="Traverse DDS, set Sequence leaf nodes.">tag_nested_sequences</a>(); <span class="comment">// Tag Sequences as Parent or Leaf node.</span>
<a name="l01038"></a>01038 
<a name="l01039"></a>01039     <span class="comment">// Start sending the response...</span>
<a name="l01040"></a>01040 
<a name="l01041"></a>01041     <span class="comment">// Handle *functional* constraint expressions specially</span>
<a name="l01042"></a>01042 <span class="preprocessor">#if 0</span>
<a name="l01043"></a>01043 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#add46ce1d9ef36fa26a2913d8d7c51096" title="Does the current constraint expression return a BaseType pointer? This method does not evaluate the c...">functional_expression</a>()) {
<a name="l01044"></a>01044         <span class="comment">// Get the result and then start sending the headers. This provides a</span>
<a name="l01045"></a>01045         <span class="comment">// way to send errors back to the client w/o colliding with the</span>
<a name="l01046"></a>01046         <span class="comment">// normal response headers. There&#39;s some duplication of code with this</span>
<a name="l01047"></a>01047         <span class="comment">// and the else-clause.</span>
<a name="l01048"></a>01048         <a class="code" href="classlibdap_1_1BaseType.html" title="The basic data type for the DODS DAP types.">BaseType</a> *var = eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#a3d433bb6769cc95fb299249b5e5d74c4" title="Evaluate a function-valued constraint expression.">eval_function</a>(dds, d_dataset);
<a name="l01049"></a>01049         <span class="keywordflow">if</span> (!var)
<a name="l01050"></a>01050             <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<a class="code" href="Error_8h.html#a40b0db75d00d0338a597aa84e71109bf" title="Unknown error.">unknown_error</a>, <span class="stringliteral">&quot;Error calling the CE function.&quot;</span>);
<a name="l01051"></a>01051 
<a name="l01052"></a>01052 <span class="preprocessor">#if COMPRESSION_FOR_SERVER3</span>
<a name="l01053"></a>01053 <span class="preprocessor"></span>        <span class="keywordflow">if</span> (with_mime_headers)
<a name="l01054"></a>01054             <a class="code" href="namespacelibdap.html#ae55c70a6b2073269d49dd7654d625710">set_mime_binary</a>(data_stream, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aa81aaa5f03d4278cb44a2148d13384710">dods_data</a>, d_cgi_ver,
<a name="l01055"></a>01055                             (compress) ? <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55a3b0e7efd18178acc018030f0e69565a5">deflate</a> : <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55ab128dd348d8e64eff653ca8efa0574f4">x_plain</a>, data_lmt);
<a name="l01056"></a>01056         fflush(data_stream);
<a name="l01057"></a>01057 
<a name="l01058"></a>01058         <span class="keywordtype">int</span> childpid;
<a name="l01059"></a>01059         <span class="keywordflow">if</span> (compress)
<a name="l01060"></a>01060             data_stream = <a class="code" href="namespacelibdap.html#acd1d919406377c736eb8ad51933c2cd0">compressor</a>(data_stream, childpid);
<a name="l01061"></a>01061 <span class="preprocessor">#endif</span>
<a name="l01062"></a>01062 <span class="preprocessor"></span>        <span class="keywordflow">if</span> (with_mime_headers)
<a name="l01063"></a>01063             <a class="code" href="namespacelibdap.html#ae55c70a6b2073269d49dd7654d625710">set_mime_binary</a>(data_stream, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aa81aaa5f03d4278cb44a2148d13384710">dods_data</a>, d_cgi_ver, x_plain, data_lmt);
<a name="l01064"></a>01064 
<a name="l01065"></a>01065         fflush(data_stream);
<a name="l01066"></a>01066 
<a name="l01067"></a>01067         functional_constraint(*var, dds, eval, data_stream);
<a name="l01068"></a>01068         <span class="keyword">delete</span> var;
<a name="l01069"></a>01069         var = 0;
<a name="l01070"></a>01070     }
<a name="l01071"></a>01071 <span class="preprocessor">#endif</span>
<a name="l01072"></a>01072 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#a9985c6a30247ced32a4b6e764deebf45" title="Does the current constraint expression return a DDS pointer?">function_clauses</a>()) {
<a name="l01073"></a>01073         <a class="code" href="classlibdap_1_1DDS.html">DDS</a> *fdds = eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#ab0dba1657e9aadd85b3ce713c6a4036a" title="Evaluate a function-valued constraint expression that contains several function calls.">eval_function_clauses</a>(dds);
<a name="l01074"></a>01074 
<a name="l01075"></a>01075         <span class="keywordflow">if</span> (with_mime_headers)
<a name="l01076"></a>01076             <a class="code" href="namespacelibdap.html#ae55c70a6b2073269d49dd7654d625710">set_mime_binary</a>(data_stream, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aa81aaa5f03d4278cb44a2148d13384710">dods_data</a>, d_cgi_ver, <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55ab128dd348d8e64eff653ca8efa0574f4">x_plain</a>, data_lmt);
<a name="l01077"></a>01077 
<a name="l01078"></a>01078         dataset_constraint(*fdds, eval, data_stream, <span class="keyword">false</span>);
<a name="l01079"></a>01079         <span class="keyword">delete</span> fdds;
<a name="l01080"></a>01080     }
<a name="l01081"></a>01081     <span class="keywordflow">else</span> {
<a name="l01082"></a>01082         <span class="keywordflow">if</span> (with_mime_headers)
<a name="l01083"></a>01083             <a class="code" href="namespacelibdap.html#ae55c70a6b2073269d49dd7654d625710">set_mime_binary</a>(data_stream, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aa81aaa5f03d4278cb44a2148d13384710">dods_data</a>, d_cgi_ver, <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55ab128dd348d8e64eff653ca8efa0574f4">x_plain</a>, data_lmt);
<a name="l01084"></a>01084 
<a name="l01085"></a>01085         dataset_constraint(dds, eval, data_stream);
<a name="l01086"></a>01086     }
<a name="l01087"></a>01087 
<a name="l01088"></a>01088     fflush(data_stream);
<a name="l01089"></a>01089 }
<a name="l01090"></a>01090 <span class="preprocessor">#endif</span>
<a name="l01091"></a>01091 <span class="preprocessor"></span>
<a name="l01108"></a>01108 <span class="keywordtype">void</span>
<a name="l01109"></a>01109 DODSFilter::send_data(<a class="code" href="classlibdap_1_1DDS.html">DDS</a> &amp; dds, <a class="code" href="classlibdap_1_1ConstraintEvaluator.html" title="Evaluate a constraint expression.">ConstraintEvaluator</a> &amp; eval,
<a name="l01110"></a>01110                       ostream &amp; data_stream, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp; anc_location,
<a name="l01111"></a>01111                       <span class="keywordtype">bool</span> with_mime_headers)<span class="keyword"> const</span>
<a name="l01112"></a>01112 <span class="keyword"></span>{
<a name="l01113"></a>01113     <span class="comment">// If this is a conditional request and the server should send a 304</span>
<a name="l01114"></a>01114     <span class="comment">// response, do that and exit. Otherwise, continue on and send the full</span>
<a name="l01115"></a>01115     <span class="comment">// response.</span>
<a name="l01116"></a>01116     time_t data_lmt = get_data_last_modified_time(anc_location);
<a name="l01117"></a>01117     <span class="keywordflow">if</span> (is_conditional()
<a name="l01118"></a>01118         &amp;&amp; data_lmt &lt;= get_request_if_modified_since()
<a name="l01119"></a>01119         &amp;&amp; with_mime_headers) {
<a name="l01120"></a>01120         <a class="code" href="namespacelibdap.html#a9ff38622675d29e932726aea56525a40" title="Send a `Not Modified&amp;#39; response.">set_mime_not_modified</a>(data_stream);
<a name="l01121"></a>01121         <span class="keywordflow">return</span>;
<a name="l01122"></a>01122     }
<a name="l01123"></a>01123     <span class="comment">// Set up the alarm.</span>
<a name="l01124"></a>01124     establish_timeout(data_stream);
<a name="l01125"></a>01125     dds.<a class="code" href="classlibdap_1_1DDS.html#ac97d9bc59c742b46614779f9381baf6a">set_timeout</a>(d_timeout);
<a name="l01126"></a>01126 
<a name="l01127"></a>01127     eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#aaeb4a7662178b992d9e36ff1dc0fc2bc" title="Parse the constraint expression given the current DDS.">parse_constraint</a>(d_ce, dds);   <span class="comment">// Throws Error if the ce doesn&#39;t</span>
<a name="l01128"></a>01128                                         <span class="comment">// parse.</span>
<a name="l01129"></a>01129 
<a name="l01130"></a>01130     dds.<a class="code" href="classlibdap_1_1DDS.html#a9d4421c2ccfdbc5ebd4a7d963ab53795" title="Traverse DDS, set Sequence leaf nodes.">tag_nested_sequences</a>(); <span class="comment">// Tag Sequences as Parent or Leaf node.</span>
<a name="l01131"></a>01131 
<a name="l01132"></a>01132     <span class="comment">// Start sending the response...</span>
<a name="l01133"></a>01133 
<a name="l01134"></a>01134     <span class="comment">// Handle *functional* constraint expressions specially</span>
<a name="l01135"></a>01135 <span class="preprocessor">#if 0</span>
<a name="l01136"></a>01136 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#add46ce1d9ef36fa26a2913d8d7c51096" title="Does the current constraint expression return a BaseType pointer? This method does not evaluate the c...">functional_expression</a>()) {
<a name="l01137"></a>01137         <span class="comment">// Get the result and then start sending the headers. This provides a</span>
<a name="l01138"></a>01138         <span class="comment">// way to send errors back to the client w/o colliding with the</span>
<a name="l01139"></a>01139         <span class="comment">// normal response headers. There&#39;s some duplication of code with this</span>
<a name="l01140"></a>01140         <span class="comment">// and the else-clause.</span>
<a name="l01141"></a>01141         BaseType *var = eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#a3d433bb6769cc95fb299249b5e5d74c4" title="Evaluate a function-valued constraint expression.">eval_function</a>(dds, d_dataset);
<a name="l01142"></a>01142         <span class="keywordflow">if</span> (!var)
<a name="l01143"></a>01143             <span class="keywordflow">throw</span> Error(<a class="code" href="Error_8h.html#a40b0db75d00d0338a597aa84e71109bf" title="Unknown error.">unknown_error</a>, <span class="stringliteral">&quot;Error calling the CE function.&quot;</span>);
<a name="l01144"></a>01144 
<a name="l01145"></a>01145        <span class="keywordflow">if</span> (with_mime_headers)
<a name="l01146"></a>01146             <a class="code" href="namespacelibdap.html#ae55c70a6b2073269d49dd7654d625710">set_mime_binary</a>(data_stream, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aa81aaa5f03d4278cb44a2148d13384710">dods_data</a>, d_cgi_ver, <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55ab128dd348d8e64eff653ca8efa0574f4">x_plain</a>, data_lmt);
<a name="l01147"></a>01147 
<a name="l01148"></a>01148         data_stream &lt;&lt; flush ;
<a name="l01149"></a>01149 
<a name="l01150"></a>01150         functional_constraint(*var, dds, eval, data_stream);
<a name="l01151"></a>01151         <span class="keyword">delete</span> var;
<a name="l01152"></a>01152         var = 0;
<a name="l01153"></a>01153     }
<a name="l01154"></a>01154 <span class="preprocessor">#endif</span>
<a name="l01155"></a>01155 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#a9985c6a30247ced32a4b6e764deebf45" title="Does the current constraint expression return a DDS pointer?">function_clauses</a>()) {
<a name="l01156"></a>01156         DDS *fdds = eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#ab0dba1657e9aadd85b3ce713c6a4036a" title="Evaluate a function-valued constraint expression that contains several function calls.">eval_function_clauses</a>(dds);
<a name="l01157"></a>01157         <span class="keywordflow">if</span> (with_mime_headers)
<a name="l01158"></a>01158             <a class="code" href="namespacelibdap.html#ae55c70a6b2073269d49dd7654d625710">set_mime_binary</a>(data_stream, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aa81aaa5f03d4278cb44a2148d13384710">dods_data</a>, d_cgi_ver, <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55ab128dd348d8e64eff653ca8efa0574f4">x_plain</a>, data_lmt);
<a name="l01159"></a>01159 
<a name="l01160"></a>01160         dataset_constraint(*fdds, eval, data_stream, <span class="keyword">false</span>);
<a name="l01161"></a>01161         <span class="keyword">delete</span> fdds;
<a name="l01162"></a>01162     }
<a name="l01163"></a>01163     <span class="keywordflow">else</span> {
<a name="l01164"></a>01164         <span class="keywordflow">if</span> (with_mime_headers)
<a name="l01165"></a>01165             <a class="code" href="namespacelibdap.html#ae55c70a6b2073269d49dd7654d625710">set_mime_binary</a>(data_stream, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aa81aaa5f03d4278cb44a2148d13384710">dods_data</a>, d_cgi_ver, <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55ab128dd348d8e64eff653ca8efa0574f4">x_plain</a>, data_lmt);
<a name="l01166"></a>01166 
<a name="l01167"></a>01167         dataset_constraint(dds, eval, data_stream);
<a name="l01168"></a>01168     }
<a name="l01169"></a>01169 
<a name="l01170"></a>01170     data_stream &lt;&lt; flush ;
<a name="l01171"></a>01171 }
<a name="l01172"></a>01172 
<a name="l01173"></a>01173 <span class="preprocessor">#if FILE_METHODS</span>
<a name="l01174"></a>01174 <span class="preprocessor"></span>
<a name="l01184"></a>01184 <span class="keywordtype">void</span>
<a name="l01185"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a7326c5e9c62affd221c0e99cf6f9fdd1">01185</a> DODSFilter::send_ddx(<a class="code" href="classlibdap_1_1DDS.html">DDS</a> &amp;dds, <a class="code" href="classlibdap_1_1ConstraintEvaluator.html" title="Evaluate a constraint expression.">ConstraintEvaluator</a> &amp;eval, FILE *out,
<a name="l01186"></a>01186                      <span class="keywordtype">bool</span> with_mime_headers)<span class="keyword"> const</span>
<a name="l01187"></a>01187 <span class="keyword"></span>{
<a name="l01188"></a>01188     <span class="comment">// If constrained, parse the constraint. Throws Error or InternalErr.</span>
<a name="l01189"></a>01189     <span class="keywordflow">if</span> (!d_ce.empty())
<a name="l01190"></a>01190         eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#aaeb4a7662178b992d9e36ff1dc0fc2bc" title="Parse the constraint expression given the current DDS.">parse_constraint</a>(d_ce, dds);
<a name="l01191"></a>01191 
<a name="l01192"></a>01192     <span class="keywordflow">if</span> (eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#add46ce1d9ef36fa26a2913d8d7c51096" title="Does the current constraint expression return a BaseType pointer? This method does not evaluate the c...">functional_expression</a>())
<a name="l01193"></a>01193         <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<span class="stringliteral">&quot;Function calls can only be used with data requests. To see the structure of the underlying data source, reissue the URL without the function.&quot;</span>);
<a name="l01194"></a>01194 
<a name="l01195"></a>01195     time_t dds_lmt = get_dds_last_modified_time(d_anc_dir);
<a name="l01196"></a>01196 
<a name="l01197"></a>01197     <span class="comment">// If this is a conditional request and the server should send a 304</span>
<a name="l01198"></a>01198     <span class="comment">// response, do that and exit. Otherwise, continue on and send the full</span>
<a name="l01199"></a>01199     <span class="comment">// response.</span>
<a name="l01200"></a>01200     <span class="keywordflow">if</span> (is_conditional() &amp;&amp; dds_lmt &lt;= get_request_if_modified_since()
<a name="l01201"></a>01201         &amp;&amp; with_mime_headers) {
<a name="l01202"></a>01202         <a class="code" href="namespacelibdap.html#a9ff38622675d29e932726aea56525a40" title="Send a `Not Modified&amp;#39; response.">set_mime_not_modified</a>(out);
<a name="l01203"></a>01203         <span class="keywordflow">return</span>;
<a name="l01204"></a>01204     }
<a name="l01205"></a>01205     <span class="keywordflow">else</span> {
<a name="l01206"></a>01206         <span class="keywordflow">if</span> (with_mime_headers)
<a name="l01207"></a>01207             <a class="code" href="namespacelibdap.html#a7a785b8fcc89e5be01284c06a9dbc97d">set_mime_text</a>(out, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aa605a335e5665d5f3ac75cacf42a15ae8">dap4_ddx</a>, d_cgi_ver, <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55ab128dd348d8e64eff653ca8efa0574f4">x_plain</a>, dds_lmt);
<a name="l01208"></a>01208         dds.<a class="code" href="classlibdap_1_1DDS.html#af319354a044d02ea89732160131004dc">print_xml</a>(out, !d_ce.empty(), <span class="stringliteral">&quot;&quot;</span>);
<a name="l01209"></a>01209     }
<a name="l01210"></a>01210 }
<a name="l01211"></a>01211 <span class="preprocessor">#endif</span>
<a name="l01212"></a>01212 <span class="preprocessor"></span>
<a name="l01223"></a>01223 <span class="keywordtype">void</span>
<a name="l01224"></a>01224 DODSFilter::send_ddx(<a class="code" href="classlibdap_1_1DDS.html">DDS</a> &amp;dds, <a class="code" href="classlibdap_1_1ConstraintEvaluator.html" title="Evaluate a constraint expression.">ConstraintEvaluator</a> &amp;eval, ostream &amp;out,
<a name="l01225"></a>01225                      <span class="keywordtype">bool</span> with_mime_headers)<span class="keyword"> const</span>
<a name="l01226"></a>01226 <span class="keyword"></span>{
<a name="l01227"></a>01227     <span class="comment">// If constrained, parse the constraint. Throws Error or InternalErr.</span>
<a name="l01228"></a>01228     <span class="keywordflow">if</span> (!d_ce.empty())
<a name="l01229"></a>01229         eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#aaeb4a7662178b992d9e36ff1dc0fc2bc" title="Parse the constraint expression given the current DDS.">parse_constraint</a>(d_ce, dds);
<a name="l01230"></a>01230 
<a name="l01231"></a>01231     <span class="keywordflow">if</span> (eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#add46ce1d9ef36fa26a2913d8d7c51096" title="Does the current constraint expression return a BaseType pointer? This method does not evaluate the c...">functional_expression</a>())
<a name="l01232"></a>01232         <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<span class="stringliteral">&quot;Function calls can only be used with data requests. To see the structure of the underlying data source, reissue the URL without the function.&quot;</span>);
<a name="l01233"></a>01233 
<a name="l01234"></a>01234     time_t dds_lmt = get_dds_last_modified_time(d_anc_dir);
<a name="l01235"></a>01235 
<a name="l01236"></a>01236     <span class="comment">// If this is a conditional request and the server should send a 304</span>
<a name="l01237"></a>01237     <span class="comment">// response, do that and exit. Otherwise, continue on and send the full</span>
<a name="l01238"></a>01238     <span class="comment">// response.</span>
<a name="l01239"></a>01239     <span class="keywordflow">if</span> (is_conditional() &amp;&amp; dds_lmt &lt;= get_request_if_modified_since()
<a name="l01240"></a>01240         &amp;&amp; with_mime_headers) {
<a name="l01241"></a>01241         <a class="code" href="namespacelibdap.html#a9ff38622675d29e932726aea56525a40" title="Send a `Not Modified&amp;#39; response.">set_mime_not_modified</a>(out);
<a name="l01242"></a>01242         <span class="keywordflow">return</span>;
<a name="l01243"></a>01243     }
<a name="l01244"></a>01244     <span class="keywordflow">else</span> {
<a name="l01245"></a>01245         <span class="keywordflow">if</span> (with_mime_headers)
<a name="l01246"></a>01246             <a class="code" href="namespacelibdap.html#a7a785b8fcc89e5be01284c06a9dbc97d">set_mime_text</a>(out, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aa605a335e5665d5f3ac75cacf42a15ae8">dap4_ddx</a>, d_cgi_ver, <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55ab128dd348d8e64eff653ca8efa0574f4">x_plain</a>, dds_lmt);
<a name="l01247"></a>01247         dds.<a class="code" href="classlibdap_1_1DDS.html#af319354a044d02ea89732160131004dc">print_xml</a>(out, !d_ce.empty(), <span class="stringliteral">&quot;&quot;</span>);
<a name="l01248"></a>01248     }
<a name="l01249"></a>01249 }
<a name="l01250"></a>01250 
<a name="l01267"></a>01267 <span class="keywordtype">void</span>
<a name="l01268"></a><a class="code" href="classlibdap_1_1DODSFilter.html#a6e65bf845deb5cac859790b4e632a1f8">01268</a> DODSFilter::send_data_ddx(<a class="code" href="classlibdap_1_1DDS.html">DDS</a> &amp; dds, <a class="code" href="classlibdap_1_1ConstraintEvaluator.html" title="Evaluate a constraint expression.">ConstraintEvaluator</a> &amp; eval,
<a name="l01269"></a>01269                       ostream &amp; data_stream, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;start,
<a name="l01270"></a>01270                       <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;boundary, <span class="keyword">const</span> <span class="keywordtype">string</span> &amp; anc_location,
<a name="l01271"></a>01271                       <span class="keywordtype">bool</span> with_mime_headers)<span class="keyword"> const</span>
<a name="l01272"></a>01272 <span class="keyword"></span>{
<a name="l01273"></a>01273     <span class="comment">// If this is a conditional request and the server should send a 304</span>
<a name="l01274"></a>01274     <span class="comment">// response, do that and exit. Otherwise, continue on and send the full</span>
<a name="l01275"></a>01275     <span class="comment">// response.</span>
<a name="l01276"></a>01276     time_t data_lmt = get_data_last_modified_time(anc_location);
<a name="l01277"></a>01277     <span class="keywordflow">if</span> (is_conditional()
<a name="l01278"></a>01278         &amp;&amp; data_lmt &lt;= get_request_if_modified_since()
<a name="l01279"></a>01279         &amp;&amp; with_mime_headers) {
<a name="l01280"></a>01280         <a class="code" href="namespacelibdap.html#a9ff38622675d29e932726aea56525a40" title="Send a `Not Modified&amp;#39; response.">set_mime_not_modified</a>(data_stream);
<a name="l01281"></a>01281         <span class="keywordflow">return</span>;
<a name="l01282"></a>01282     }
<a name="l01283"></a>01283     <span class="comment">// Set up the alarm.</span>
<a name="l01284"></a>01284     establish_timeout(data_stream);
<a name="l01285"></a>01285     dds.<a class="code" href="classlibdap_1_1DDS.html#ac97d9bc59c742b46614779f9381baf6a">set_timeout</a>(d_timeout);
<a name="l01286"></a>01286 
<a name="l01287"></a>01287     eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#aaeb4a7662178b992d9e36ff1dc0fc2bc" title="Parse the constraint expression given the current DDS.">parse_constraint</a>(d_ce, dds);   <span class="comment">// Throws Error if the ce doesn&#39;t</span>
<a name="l01288"></a>01288                                         <span class="comment">// parse.</span>
<a name="l01289"></a>01289 
<a name="l01290"></a>01290     dds.<a class="code" href="classlibdap_1_1DDS.html#a9d4421c2ccfdbc5ebd4a7d963ab53795" title="Traverse DDS, set Sequence leaf nodes.">tag_nested_sequences</a>(); <span class="comment">// Tag Sequences as Parent or Leaf node.</span>
<a name="l01291"></a>01291 
<a name="l01292"></a>01292     <span class="comment">// Start sending the response...</span>
<a name="l01293"></a>01293 
<a name="l01294"></a>01294     <span class="comment">// Handle *functional* constraint expressions specially</span>
<a name="l01295"></a>01295 <span class="preprocessor">#if 0</span>
<a name="l01296"></a>01296 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#add46ce1d9ef36fa26a2913d8d7c51096" title="Does the current constraint expression return a BaseType pointer? This method does not evaluate the c...">functional_expression</a>()) {
<a name="l01297"></a>01297         <a class="code" href="classlibdap_1_1BaseType.html" title="The basic data type for the DODS DAP types.">BaseType</a> *var = eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#a3d433bb6769cc95fb299249b5e5d74c4" title="Evaluate a function-valued constraint expression.">eval_function</a>(dds, d_dataset);
<a name="l01298"></a>01298         <span class="keywordflow">if</span> (!var)
<a name="l01299"></a>01299             <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<a class="code" href="Error_8h.html#a40b0db75d00d0338a597aa84e71109bf" title="Unknown error.">unknown_error</a>, <span class="stringliteral">&quot;Error calling the CE function.&quot;</span>);
<a name="l01300"></a>01300 
<a name="l01301"></a>01301         <span class="keywordflow">if</span> (with_mime_headers)
<a name="l01302"></a>01302             <a class="code" href="namespacelibdap.html#a8e8484bd3d54c09c120cb7afcde19d1f">set_mime_multipart</a>(data_stream, boundary, start, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aae2070a684067288a7ad65cb671c73a26">dap4_data_ddx</a>,
<a name="l01303"></a>01303                 d_cgi_ver, <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55ab128dd348d8e64eff653ca8efa0574f4">x_plain</a>, data_lmt);
<a name="l01304"></a>01304         data_stream &lt;&lt; flush ;
<a name="l01305"></a>01305         <a class="code" href="classlibdap_1_1BaseTypeFactory.html">BaseTypeFactory</a> btf;
<a name="l01306"></a>01306         <a class="code" href="classlibdap_1_1DDS.html">DDS</a> var_dds(&amp;btf, var-&gt;<a class="code" href="classlibdap_1_1BaseType.html#a0a0c6b5d57813607dc06255b8e0b9bdc" title="Returns the name of the class instance.">name</a>());
<a name="l01307"></a>01307         var-&gt;<a class="code" href="classlibdap_1_1BaseType.html#aba7b27635c95b74536de18393133628e">set_send_p</a>(<span class="keyword">true</span>);
<a name="l01308"></a>01308         var_dds.add_var(var);
<a name="l01309"></a>01309         dataset_constraint_ddx(var_dds, eval, data_stream, boundary, start);
<a name="l01310"></a>01310 
<a name="l01311"></a>01311         <span class="comment">// functional_constraint_ddx(*var, dds, eval, data_stream, boundary);</span>
<a name="l01312"></a>01312         <span class="keyword">delete</span> var;
<a name="l01313"></a>01313         var = 0;
<a name="l01314"></a>01314     }
<a name="l01315"></a>01315 <span class="preprocessor">#endif</span>
<a name="l01316"></a>01316 <span class="preprocessor"></span>    <span class="keywordflow">if</span> (eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#a9985c6a30247ced32a4b6e764deebf45" title="Does the current constraint expression return a DDS pointer?">function_clauses</a>()) {
<a name="l01317"></a>01317         <a class="code" href="classlibdap_1_1DDS.html">DDS</a> *fdds = eval.<a class="code" href="classlibdap_1_1ConstraintEvaluator.html#ab0dba1657e9aadd85b3ce713c6a4036a" title="Evaluate a function-valued constraint expression that contains several function calls.">eval_function_clauses</a>(dds);
<a name="l01318"></a>01318         <span class="keywordflow">if</span> (with_mime_headers)
<a name="l01319"></a>01319             <a class="code" href="namespacelibdap.html#a8e8484bd3d54c09c120cb7afcde19d1f">set_mime_multipart</a>(data_stream, boundary, start, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aae2070a684067288a7ad65cb671c73a26">dap4_data_ddx</a>,
<a name="l01320"></a>01320                     d_cgi_ver, <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55ab128dd348d8e64eff653ca8efa0574f4">x_plain</a>, data_lmt);
<a name="l01321"></a>01321         data_stream &lt;&lt; flush ;
<a name="l01322"></a>01322         dataset_constraint(*fdds, eval, data_stream, <span class="keyword">false</span>);
<a name="l01323"></a>01323         <span class="keyword">delete</span> fdds;
<a name="l01324"></a>01324     }
<a name="l01325"></a>01325     <span class="keywordflow">else</span> {
<a name="l01326"></a>01326         <span class="keywordflow">if</span> (with_mime_headers)
<a name="l01327"></a>01327             <a class="code" href="namespacelibdap.html#a8e8484bd3d54c09c120cb7afcde19d1f">set_mime_multipart</a>(data_stream, boundary, start, <a class="code" href="namespacelibdap.html#ae7466ed8496f06654ec276eac907c06aae2070a684067288a7ad65cb671c73a26">dap4_data_ddx</a>,
<a name="l01328"></a>01328                     d_cgi_ver, <a class="code" href="namespacelibdap.html#aada86e90b40fc8068dbfe9be79f09e55ab128dd348d8e64eff653ca8efa0574f4">x_plain</a>, data_lmt);
<a name="l01329"></a>01329         data_stream &lt;&lt; flush ;
<a name="l01330"></a>01330         dataset_constraint_ddx(dds, eval, data_stream, boundary, start);
<a name="l01331"></a>01331     }
<a name="l01332"></a>01332 
<a name="l01333"></a>01333     data_stream &lt;&lt; flush ;
<a name="l01334"></a>01334 
<a name="l01335"></a>01335     <span class="keywordflow">if</span> (with_mime_headers)
<a name="l01336"></a>01336         data_stream &lt;&lt; <a class="code" href="DODSFilter_8cc.html#a6cb23a858b0a21bdaa644b9181dc415f">CRLF</a> &lt;&lt; <span class="stringliteral">&quot;--&quot;</span> &lt;&lt; boundary &lt;&lt; <span class="stringliteral">&quot;--&quot;</span> &lt;&lt; <a class="code" href="DODSFilter_8cc.html#a6cb23a858b0a21bdaa644b9181dc415f">CRLF</a>;
<a name="l01337"></a>01337 }
<a name="l01338"></a>01338 
<a name="l01339"></a>01339 } <span class="comment">// namespace libdap</span>
<a name="l01340"></a>01340 
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="DODSFilter_8cc.html">DODSFilter.cc</a>      </li>
      <li class="footer">Generated on Tue Feb 8 2011 for libdap++ by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
    </ul>
  </div>

</body>
</html>