Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > f149f58f4a75af135bdb24f5dfe94165 > files > 122

libdap-doc-3.9.3-3mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>libdap++: DAS.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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 class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>DAS.h</h1><a href="DAS_8h.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 1994-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">// Using the DASVHMap class, build a parser for the DAS and add functions</span>
<a name="l00033"></a>00033 <span class="comment">// that provide access to the variables, their attributes and values.</span>
<a name="l00034"></a>00034 <span class="comment">//</span>
<a name="l00035"></a>00035 <span class="comment">// jhrg 7/25/94</span>
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 <span class="preprocessor">#ifndef _das_h</span>
<a name="l00038"></a><a class="code" href="DAS_8h.html#49296a3339f4e722a3730d2a53c830c3">00038</a> <span class="preprocessor"></span><span class="preprocessor">#define _das_h 1</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span>
<a name="l00040"></a>00040 
<a name="l00041"></a>00041 <span class="preprocessor">#include &lt;cstdio&gt;</span>
<a name="l00042"></a>00042 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00043"></a>00043 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="comment">//#include "Pix.h"</span>
<a name="l00046"></a>00046 
<a name="l00047"></a>00047 <span class="preprocessor">#ifndef _attrtable_h</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="AttrTable_8h.html">AttrTable.h</a>"</span>
<a name="l00049"></a>00049 <span class="preprocessor">#endif</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span>
<a name="l00051"></a>00051 <span class="keyword">using</span> std::cout;
<a name="l00052"></a>00052 
<a name="l00053"></a>00053 <span class="keyword">namespace </span>libdap
<a name="l00054"></a>00054 {
<a name="l00055"></a>00055 
<a name="l00123"></a><a class="code" href="classlibdap_1_1DAS.html">00123</a> <span class="keyword">class </span><a class="code" href="classlibdap_1_1DAS.html" title="Hold attribute data for a DAP2 dataset.">DAS</a> : <span class="keyword">public</span> <a class="code" href="classlibdap_1_1DapObj.html" title="libdap base object for common functionality of libdap objects">DapObj</a>
<a name="l00124"></a>00124 {
<a name="l00125"></a>00125 <span class="keyword">private</span>:
<a name="l00126"></a>00126     <a class="code" href="classlibdap_1_1AttrTable.html" title="Contains the attributes for a dataset.">AttrTable</a> *d_container ;
<a name="l00127"></a>00127     <span class="keywordtype">string</span> _container_name ;
<a name="l00128"></a>00128     <a class="code" href="classlibdap_1_1AttrTable.html" title="Contains the attributes for a dataset.">AttrTable</a> d_attrs ;
<a name="l00129"></a>00129 
<a name="l00130"></a>00130 <span class="keyword">protected</span>:
<a name="l00131"></a>00131     <span class="comment">//AttrTable *das_find(string name);</span>
<a name="l00132"></a>00132 
<a name="l00133"></a>00133 <span class="keyword">public</span>:
<a name="l00134"></a>00134     <a class="code" href="classlibdap_1_1DAS.html#89fa25390938a00076584ff7edbc85cf">DAS</a>();
<a name="l00135"></a>00135     <span class="comment">//DAS(AttrTable *attr_table, string name);</span>
<a name="l00136"></a>00136 
<a name="l00137"></a>00137     <span class="keyword">virtual</span> <a class="code" href="classlibdap_1_1DAS.html#0d66e7fe4bfef36b5fe424bccea637a3" title="This deletes the pointers to AttrTables allocated during the parse (and at other...">~DAS</a>();
<a name="l00138"></a>00138 
<a name="l00139"></a>00139     <span class="keyword">virtual</span> <span class="keywordtype">string</span> <a class="code" href="classlibdap_1_1DAS.html#051d5af6203403192edbcd1a3812992e" title="Returns the name of the current attribute container when multiple files used to build...">container_name</a>() ;
<a name="l00140"></a>00140     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classlibdap_1_1DAS.html#051d5af6203403192edbcd1a3812992e" title="Returns the name of the current attribute container when multiple files used to build...">container_name</a>( <span class="keyword">const</span> <span class="keywordtype">string</span> &amp;cn ) ;
<a name="l00141"></a>00141     <span class="keyword">virtual</span> <a class="code" href="classlibdap_1_1AttrTable.html" title="Contains the attributes for a dataset.">AttrTable</a> *<a class="code" href="classlibdap_1_1DAS.html#9aa7ad923a3b0be71b4c01fc1e822747" title="Returns the current attribute container when multiple files used to build this DAS...">container</a>() ;
<a name="l00142"></a>00142 
<a name="l00149"></a><a class="code" href="classlibdap_1_1DAS.html#3bce04e836fabf8b0303e6a2dfd8664b">00149</a>     <span class="keyword">virtual</span> <a class="code" href="classlibdap_1_1AttrTable.html" title="Contains the attributes for a dataset.">AttrTable</a> *<a class="code" href="classlibdap_1_1DAS.html#3bce04e836fabf8b0303e6a2dfd8664b" title="Returns the top most set of attributes.">get_top_level_attributes</a>()
<a name="l00150"></a>00150     {
<a name="l00151"></a>00151         <span class="keywordflow">if</span>( d_container ) <span class="keywordflow">return</span> d_container ;
<a name="l00152"></a>00152         <span class="keywordflow">return</span> &amp;d_attrs ;
<a name="l00153"></a>00153     }
<a name="l00154"></a>00154 
<a name="l00155"></a>00155     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classlibdap_1_1DAS.html#ee2b84645cf0825b20e0e68cca07bd2f" title="erase all attributes in this DAS">erase</a>() ;
<a name="l00156"></a>00156 
<a name="l00157"></a>00157     <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibdap_1_1DAS.html#8a5f524429cf5c3838f187d9651da80e" title="Returns the number of attributes in the current attribute table.">get_size</a>() <span class="keyword">const</span> ;
<a name="l00158"></a>00158 
<a name="l00159"></a>00159     <a class="code" href="classlibdap_1_1AttrTable.html#3647edf8906b672bad7a8c5ffc81d62a">AttrTable::Attr_iter</a> <a class="code" href="classlibdap_1_1DAS.html#0f2d73b7f882231e2ff452cb4e89c113" title="Returns a reference to the attribute table for the first variable.">var_begin</a>() ;
<a name="l00160"></a>00160     <a class="code" href="classlibdap_1_1AttrTable.html#3647edf8906b672bad7a8c5ffc81d62a">AttrTable::Attr_iter</a> <a class="code" href="classlibdap_1_1DAS.html#9a9c295e437408d7c91641f8d8dd23f7">var_end</a>() ;
<a name="l00161"></a>00161 
<a name="l00162"></a>00162     <span class="keywordtype">string</span> <a class="code" href="classlibdap_1_1DAS.html#f4463849acea7b327626fc6f5f58da28" title="Returns the name of the referenced variable attribute table.">get_name</a>(<a class="code" href="classlibdap_1_1AttrTable.html#3647edf8906b672bad7a8c5ffc81d62a">AttrTable::Attr_iter</a> &amp;i);
<a name="l00163"></a>00163     <a class="code" href="classlibdap_1_1AttrTable.html" title="Contains the attributes for a dataset.">AttrTable</a> *<a class="code" href="classlibdap_1_1DAS.html#c0cd00dbb4425986999832275ce84303" title="Returns the referenced variable attribute table.">get_table</a>(<a class="code" href="classlibdap_1_1AttrTable.html#3647edf8906b672bad7a8c5ffc81d62a">AttrTable::Attr_iter</a> &amp;i);
<a name="l00164"></a>00164 
<a name="l00165"></a>00165     <span class="keyword">virtual</span> <a class="code" href="classlibdap_1_1AttrTable.html" title="Contains the attributes for a dataset.">AttrTable</a> *<a class="code" href="classlibdap_1_1DAS.html#c0cd00dbb4425986999832275ce84303" title="Returns the referenced variable attribute table.">get_table</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;name);
<a name="l00166"></a>00166 
<a name="l00167"></a>00167     <span class="keyword">virtual</span> <a class="code" href="classlibdap_1_1AttrTable.html" title="Contains the attributes for a dataset.">AttrTable</a> *<a class="code" href="classlibdap_1_1DAS.html#77e38a71ab41ab58fd098603e1cd9cb8" title="Adds a variable attribute table to the DAS or the current dataset container attribute...">add_table</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp;name, <a class="code" href="classlibdap_1_1AttrTable.html" title="Contains the attributes for a dataset.">AttrTable</a> *at);
<a name="l00168"></a>00168 
<a name="l00170"></a>00170     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classlibdap_1_1DAS.html#a84ac295a96a12f9f083a8210732f5a8" title="Reads a DAS from the named file.">parse</a>(<span class="keywordtype">string</span> fname);
<a name="l00171"></a>00171     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classlibdap_1_1DAS.html#a84ac295a96a12f9f083a8210732f5a8" title="Reads a DAS from the named file.">parse</a>(<span class="keywordtype">int</span> fd);
<a name="l00172"></a>00172     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classlibdap_1_1DAS.html#a84ac295a96a12f9f083a8210732f5a8" title="Reads a DAS from the named file.">parse</a>(FILE *in = stdin);
<a name="l00173"></a>00173 
<a name="l00175"></a>00175     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classlibdap_1_1DAS.html#8983b961e6fba3a6fd33ffcfd944eaf2">print</a>(FILE *out, <span class="keywordtype">bool</span> dereference = <span class="keyword">false</span>);
<a name="l00176"></a>00176     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classlibdap_1_1DAS.html#8983b961e6fba3a6fd33ffcfd944eaf2">print</a>(ostream &amp;out, <span class="keywordtype">bool</span> dereference = <span class="keyword">false</span>);
<a name="l00177"></a>00177 
<a name="l00178"></a>00178     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classlibdap_1_1DAS.html#7acd3373e34b8776f08c2a8e49f6fa01" title="dumps information about this object">dump</a>(ostream &amp;strm) <span class="keyword">const</span> ;
<a name="l00179"></a>00179 };
<a name="l00180"></a>00180 
<a name="l00181"></a>00181 } <span class="comment">// namespace libdap</span>
<a name="l00182"></a>00182 
<a name="l00183"></a>00183 <span class="preprocessor">#endif // _das_h</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Oct 7 19:57:07 2009 for libdap++ by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>