<!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++: libdap::Ancillary Class Reference</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 Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespacelibdap.html">libdap</a>::<a class="el" href="classlibdap_1_1Ancillary.html">Ancillary</a> </div> </div> <div class="contents"> <h1>libdap::Ancillary Class Reference</h1><!-- doxytag: class="libdap::Ancillary" --><code>#include <<a class="el" href="Ancillary_8h_source.html">Ancillary.h</a>></code> <p> <p> <a href="classlibdap_1_1Ancillary-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static string </td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1Ancillary.html#b1bcf7b1c9c9dc3d981db69aa58f24c1">find_ancillary_file</a> (const string &pathname, const string &ext, const string &dir, const string &file)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Find a file with ancillary data. <a href="#b1bcf7b1c9c9dc3d981db69aa58f24c1"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static string </td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1Ancillary.html#2732498600d700e6fb806db2ba39d024">find_group_ancillary_file</a> (const string &pathname, const string &ext)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1Ancillary.html#7644210f5b5e49103dbf7109e7bcb278">read_ancillary_das</a> (<a class="el" href="classlibdap_1_1DAS.html">DAS</a> &das, const string &pathname, const string &dir="", const string &file="")</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlibdap_1_1Ancillary.html#a1f64793537ff7bf93629c9c8a6be8ea">read_ancillary_dds</a> (<a class="el" href="classlibdap_1_1DDS.html">DDS</a> &dds, const string &pathname, const string &dir="", const string &file="")</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> <p>Definition at line <a class="el" href="Ancillary_8h_source.html#l00048">48</a> of file <a class="el" href="Ancillary_8h_source.html">Ancillary.h</a>.</p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="b1bcf7b1c9c9dc3d981db69aa58f24c1"></a><!-- doxytag: member="libdap::Ancillary::find_ancillary_file" ref="b1bcf7b1c9c9dc3d981db69aa58f24c1" args="(const string &pathname, const string &ext, const string &dir, const string &file)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string libdap::Ancillary::find_ancillary_file </td> <td>(</td> <td class="paramtype">const string & </td> <td class="paramname"> <em>pathname</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>ext</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>dir</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>file</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> This function accepts a dataset path name, and searches for a matching ancillary data file name with a very specific set of search rules, given here:<p> <pre> directory filename extension same same `.'given given same `.'given same given `.'given given given `.'given </pre><p> Where ``same'' refers to the input dataset pathname, and ``given'' refers to the function arguments.<p> For example, If you call this function with a dataset name of <code>/a/data</code>, an extension of <code>das</code>, a directory of <code>b</code>, and a filename of <code>ralph</code>, the function will look (in order) for the following files:<p> <pre> /a/data.das /b/data.das /a/ralph.das /b/ralph.das </pre><p> The function will return a string containing the name of the first file in the list that exists, if any.<p> <dl class="note" compact><dt><b>Note:</b></dt><dd>This code now checks for <code>pathname.ext</code> 3/17/99 jhrg</dd></dl> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pathname</em> </td><td>The input pathname of a dataset. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ext</em> </td><td>The input extension the desired file is to have. </td></tr> <tr><td valign="top"></td><td valign="top"><em>dir</em> </td><td>The input directory in which the desired file may be found. </td></tr> <tr><td valign="top"></td><td valign="top"><em>file</em> </td><td>The input filename the desired file may have. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>A string containing the pathname of the file found by searching with the given components. If no file was found, the null string is returned. </dd></dl> <p>Definition at line <a class="el" href="Ancillary_8cc_source.html#l00066">66</a> of file <a class="el" href="Ancillary_8cc_source.html">Ancillary.cc</a>.</p> <p>References <a class="el" href="debug_8h_source.html#l00058">DBG</a>.</p> <p>Referenced by <a class="el" href="DODSFilter_8cc_source.html#l00492">libdap::DODSFilter::get_das_last_modified_time()</a>, <a class="el" href="DODSFilter_8cc_source.html#l00544">libdap::DODSFilter::get_data_last_modified_time()</a>, <a class="el" href="DODSFilter_8cc_source.html#l00515">libdap::DODSFilter::get_dds_last_modified_time()</a>, <a class="el" href="Ancillary_8cc_source.html#l00193">read_ancillary_das()</a>, and <a class="el" href="Ancillary_8cc_source.html#l00210">read_ancillary_dds()</a>.</p> </div> </div><p> <a class="anchor" name="2732498600d700e6fb806db2ba39d024"></a><!-- doxytag: member="libdap::Ancillary::find_group_ancillary_file" ref="2732498600d700e6fb806db2ba39d024" args="(const string &pathname, const string &ext)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string libdap::Ancillary::find_group_ancillary_file </td> <td>(</td> <td class="paramtype">const string & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>ext</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Assume that <code>name</code> refers to a file that is one of a group of files which share a common `base' name and differ only by some prefix or suffix digits (e.g. <code>00base</code>, <code>01base</code>, ... or <code>base00</code>, ... have the base name <code>base</code>). This function looks for a file <code>base.ext</code>.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>The name (full or relative) to one member of a group of files. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ext</em> </td><td>The extension of the group's ancillary file. Note that <code>ext</code> should include a period (.) if that needs to separate the base name from the extension. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The pathname to the group's ancillary file if found, otherwise the empty string (""). </dd></dl> <p>Definition at line <a class="el" href="Ancillary_8cc_source.html#l00135">135</a> of file <a class="el" href="Ancillary_8cc_source.html">Ancillary.cc</a>.</p> <p>References <a class="el" href="debug_8h_source.html#l00058">DBG</a>.</p> <p>Referenced by <a class="el" href="cgi__util_8cc_source.html#l00752">libdap::get_user_supplied_docs()</a>.</p> </div> </div><p> <a class="anchor" name="7644210f5b5e49103dbf7109e7bcb278"></a><!-- doxytag: member="libdap::Ancillary::read_ancillary_das" ref="7644210f5b5e49103dbf7109e7bcb278" args="(DAS &das, const string &pathname, const string &dir="", const string &file="")" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void libdap::Ancillary::read_ancillary_das </td> <td>(</td> <td class="paramtype"><a class="el" href="classlibdap_1_1DAS.html">DAS</a> & </td> <td class="paramname"> <em>das</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>pathname</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>dir</em> = <code>""</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>file</em> = <code>""</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="Ancillary_8cc_source.html#l00193">193</a> of file <a class="el" href="Ancillary_8cc_source.html">Ancillary.cc</a>.</p> <p>References <a class="el" href="debug_8h_source.html#l00058">DBG</a>, <a class="el" href="Ancillary_8cc_source.html#l00066">find_ancillary_file()</a>, and <a class="el" href="DAS_8cc_source.html#l00277">libdap::DAS::parse()</a>.</p> <p> <div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> <p><center><img src="classlibdap_1_1Ancillary_7644210f5b5e49103dbf7109e7bcb278_cgraph.png" border="0" usemap="#classlibdap_1_1Ancillary_7644210f5b5e49103dbf7109e7bcb278_cgraph_map" alt=""></center> <map name="classlibdap_1_1Ancillary_7644210f5b5e49103dbf7109e7bcb278_cgraph_map"> <area shape="rect" id="node3" href="classlibdap_1_1Ancillary.html#b1bcf7b1c9c9dc3d981db69aa58f24c1" title="Find a file with ancillary data." alt="" coords="447,5,847,32"><area shape="rect" id="node5" href="classlibdap_1_1DAS.html#a84ac295a96a12f9f083a8210732f5a8" title="Reads a DAS from the named file." alt="" coords="547,56,747,83"></map> </div> </div> </div><p> <a class="anchor" name="a1f64793537ff7bf93629c9c8a6be8ea"></a><!-- doxytag: member="libdap::Ancillary::read_ancillary_dds" ref="a1f64793537ff7bf93629c9c8a6be8ea" args="(DDS &dds, const string &pathname, const string &dir="", const string &file="")" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void libdap::Ancillary::read_ancillary_dds </td> <td>(</td> <td class="paramtype"><a class="el" href="classlibdap_1_1DDS.html">DDS</a> & </td> <td class="paramname"> <em>dds</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>pathname</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>dir</em> = <code>""</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>file</em> = <code>""</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="Ancillary_8cc_source.html#l00210">210</a> of file <a class="el" href="Ancillary_8cc_source.html">Ancillary.cc</a>.</p> <p>References <a class="el" href="debug_8h_source.html#l00058">DBG</a>, <a class="el" href="Ancillary_8cc_source.html#l00066">find_ancillary_file()</a>, and <a class="el" href="DDS_8cc_source.html#l00807">libdap::DDS::parse()</a>.</p> <p> <div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> <p><center><img src="classlibdap_1_1Ancillary_a1f64793537ff7bf93629c9c8a6be8ea_cgraph.png" border="0" usemap="#classlibdap_1_1Ancillary_a1f64793537ff7bf93629c9c8a6be8ea_cgraph_map" alt=""></center> <map name="classlibdap_1_1Ancillary_a1f64793537ff7bf93629c9c8a6be8ea_cgraph_map"> <area shape="rect" id="node3" href="classlibdap_1_1Ancillary.html#b1bcf7b1c9c9dc3d981db69aa58f24c1" title="Find a file with ancillary data." alt="" coords="447,5,847,32"><area shape="rect" id="node5" href="classlibdap_1_1DDS.html#733c8e49ed42ab47d74afe68056340e6" title="Parse a DDS from a file with the given name." alt="" coords="547,56,747,83"></map> </div> </div> </div><p> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="Ancillary_8h_source.html">Ancillary.h</a><li><a class="el" href="Ancillary_8cc_source.html">Ancillary.cc</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Oct 7 19:58:42 2009 for libdap++ by <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>