<!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++: XDRFileUnMarshaller.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++ <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 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><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 List</span></a></li> <li><a href="globals.html"><span>File 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('XDRFileUnMarshaller_8cc.html',''); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <h1>XDRFileUnMarshaller.cc</h1> </div> </div> <div class="contents"> <a href="XDRFileUnMarshaller_8cc.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// XDRFileUnMarshaller.cc</span> <a name="l00002"></a>00002 <a name="l00003"></a>00003 <span class="comment">// -*- mode: c++; c-basic-offset:4 -*-</span> <a name="l00004"></a>00004 <a name="l00005"></a>00005 <span class="comment">// This file is part of libdap, A C++ implementation of the OPeNDAP Data</span> <a name="l00006"></a>00006 <span class="comment">// Access Protocol.</span> <a name="l00007"></a>00007 <a name="l00008"></a>00008 <span class="comment">// Copyright (c) 2002,2003 OPeNDAP, Inc.</span> <a name="l00009"></a>00009 <span class="comment">// Author: Patrick West <pwest@ucar.edu></span> <a name="l00010"></a>00010 <span class="comment">//</span> <a name="l00011"></a>00011 <span class="comment">// This library is free software; you can redistribute it and/or</span> <a name="l00012"></a>00012 <span class="comment">// modify it under the terms of the GNU Lesser General Public</span> <a name="l00013"></a>00013 <span class="comment">// License as published by the Free Software Foundation; either</span> <a name="l00014"></a>00014 <span class="comment">// version 2.1 of the License, or (at your option) any later version.</span> <a name="l00015"></a>00015 <span class="comment">//</span> <a name="l00016"></a>00016 <span class="comment">// This library is distributed in the hope that it will be useful,</span> <a name="l00017"></a>00017 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00018"></a>00018 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00019"></a>00019 <span class="comment">// Lesser General Public License for more details.</span> <a name="l00020"></a>00020 <span class="comment">//</span> <a name="l00021"></a>00021 <span class="comment">// You should have received a copy of the GNU Lesser General Public</span> <a name="l00022"></a>00022 <span class="comment">// License along with this library; if not, write to the Free Software</span> <a name="l00023"></a>00023 <span class="comment">// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span> <a name="l00024"></a>00024 <span class="comment">//</span> <a name="l00025"></a>00025 <span class="comment">// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.</span> <a name="l00026"></a>00026 <a name="l00027"></a>00027 <span class="comment">// (c) COPYRIGHT URI/MIT 1994-1999</span> <a name="l00028"></a>00028 <span class="comment">// Please read the full copyright statement in the file COPYRIGHT_URI.</span> <a name="l00029"></a>00029 <span class="comment">//</span> <a name="l00030"></a>00030 <span class="comment">// Authors:</span> <a name="l00031"></a>00031 <span class="comment">// pwest Patrick West <pwest@ucar.edu></span> <a name="l00032"></a>00032 <a name="l00033"></a>00033 <span class="preprocessor">#include "<a class="code" href="XDRFileUnMarshaller_8h.html">XDRFileUnMarshaller.h</a>"</span> <a name="l00034"></a>00034 <a name="l00035"></a>00035 <span class="preprocessor">#include "<a class="code" href="Byte_8h.html">Byte.h</a>"</span> <a name="l00036"></a>00036 <span class="preprocessor">#include "<a class="code" href="Int16_8h.html">Int16.h</a>"</span> <a name="l00037"></a>00037 <span class="preprocessor">#include "<a class="code" href="UInt16_8h.html">UInt16.h</a>"</span> <a name="l00038"></a>00038 <span class="preprocessor">#include "<a class="code" href="Int32_8h.html">Int32.h</a>"</span> <a name="l00039"></a>00039 <span class="preprocessor">#include "<a class="code" href="UInt32_8h.html">UInt32.h</a>"</span> <a name="l00040"></a>00040 <span class="preprocessor">#include "<a class="code" href="Float32_8h.html">Float32.h</a>"</span> <a name="l00041"></a>00041 <span class="preprocessor">#include "<a class="code" href="Float64_8h.html">Float64.h</a>"</span> <a name="l00042"></a>00042 <span class="preprocessor">#include "<a class="code" href="Str_8h.html">Str.h</a>"</span> <a name="l00043"></a>00043 <span class="preprocessor">#include "<a class="code" href="Url_8h.html">Url.h</a>"</span> <a name="l00044"></a>00044 <span class="preprocessor">#include "<a class="code" href="Array_8h.html">Array.h</a>"</span> <a name="l00045"></a>00045 <span class="preprocessor">#include "<a class="code" href="Structure_8h.html">Structure.h</a>"</span> <a name="l00046"></a>00046 <span class="preprocessor">#include "<a class="code" href="Sequence_8h.html">Sequence.h</a>"</span> <a name="l00047"></a>00047 <span class="preprocessor">#include "<a class="code" href="Grid_8h.html">Grid.h</a>"</span> <a name="l00048"></a>00048 <span class="preprocessor">#if 0</span> <a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="Vector_8h.html">Vector.h</a>"</span> <a name="l00050"></a>00050 <span class="preprocessor">#endif</span> <a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="util_8h.html">util.h</a>"</span> <a name="l00052"></a>00052 <span class="preprocessor">#include "<a class="code" href="InternalErr_8h.html">InternalErr.h</a>"</span> <a name="l00053"></a>00053 <a name="l00054"></a>00054 <span class="keyword">namespace </span>libdap { <a name="l00055"></a>00055 <a name="l00056"></a>00056 XDRFileUnMarshaller::XDRFileUnMarshaller( FILE *out ) <a name="l00057"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#aea077a1a41fdfe877a410f37fc414067">00057</a> : _source( 0 ) <a name="l00058"></a>00058 { <a name="l00059"></a>00059 _source = <a class="code" href="XDRUtils_8cc.html#a91ac75a1d242fbf5bbced463513f9942">new_xdrstdio</a>( out, XDR_DECODE ) ; <a name="l00060"></a>00060 } <a name="l00061"></a>00061 <a name="l00062"></a>00062 XDRFileUnMarshaller::XDRFileUnMarshaller() <a name="l00063"></a>00063 : <a class="code" href="classlibdap_1_1UnMarshaller.html" title="abstract base class used to unmarshall/deserialize dap data objects">UnMarshaller</a>(), <a name="l00064"></a>00064 _source( 0 ) <a name="l00065"></a>00065 { <a name="l00066"></a>00066 <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1InternalErr.html" title="A class for software fault reporting.">InternalErr</a>( __FILE__, __LINE__, <span class="stringliteral">"Default constructor not implemented."</span> ) ; <a name="l00067"></a>00067 } <a name="l00068"></a>00068 <a name="l00069"></a>00069 XDRFileUnMarshaller::XDRFileUnMarshaller( <span class="keyword">const</span> XDRFileUnMarshaller &um ) <a name="l00070"></a>00070 : UnMarshaller( um ), <a name="l00071"></a>00071 _source( 0 ) <a name="l00072"></a>00072 { <a name="l00073"></a>00073 <span class="keywordflow">throw</span> InternalErr( __FILE__, __LINE__, <span class="stringliteral">"Copy constructor not implemented."</span> ) ; <a name="l00074"></a>00074 } <a name="l00075"></a>00075 <a name="l00076"></a>00076 XDRFileUnMarshaller & <a name="l00077"></a>00077 XDRFileUnMarshaller::operator=( <span class="keyword">const</span> XDRFileUnMarshaller & ) <a name="l00078"></a>00078 { <a name="l00079"></a>00079 <span class="keywordflow">throw</span> InternalErr( __FILE__, __LINE__, <span class="stringliteral">"Copy operator not implemented."</span> ) ; <a name="l00080"></a>00080 <a name="l00081"></a>00081 <span class="keywordflow">return</span> *this ; <a name="l00082"></a>00082 } <a name="l00083"></a>00083 <a name="l00084"></a>00084 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a655034ba162aa33888fb0fde2565fe46">XDRFileUnMarshaller::~XDRFileUnMarshaller</a>( ) <a name="l00085"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a655034ba162aa33888fb0fde2565fe46">00085</a> { <a name="l00086"></a>00086 <a class="code" href="XDRUtils_8cc.html#acd1ce82fd29bbb21c05044ecbfc1c8a6">delete_xdrstdio</a>( _source ) ; <a name="l00087"></a>00087 } <a name="l00088"></a>00088 <a name="l00089"></a>00089 <span class="keywordtype">void</span> <a name="l00090"></a>00090 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a93670ac3bf26e9ae1fda68670afd0094">XDRFileUnMarshaller::get_byte</a>( <a class="code" href="namespacelibdap.html#ad431f107665452c7fe52e360b38f2828">dods_byte</a> &val ) <a name="l00091"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a93670ac3bf26e9ae1fda68670afd0094">00091</a> { <a name="l00092"></a>00092 <span class="keywordflow">if</span>( !xdr_char( _source, (<span class="keywordtype">char</span> *)&val ) ) <a name="l00093"></a>00093 <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<span class="stringliteral">"Network I/O Error. Could not read byte data. This may be due to a\nbug in DODS or a problem with the network connection."</span>); <a name="l00094"></a>00094 } <a name="l00095"></a>00095 <a name="l00096"></a>00096 <span class="keywordtype">void</span> <a name="l00097"></a>00097 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#afbbcc6a95207b4f2eced695d31b89ccd">XDRFileUnMarshaller::get_int16</a>( <a class="code" href="namespacelibdap.html#ae7f3429a8f8962d271e43ece6968d91d">dods_int16</a> &val ) <a name="l00098"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#afbbcc6a95207b4f2eced695d31b89ccd">00098</a> { <a name="l00099"></a>00099 <span class="keywordflow">if</span>( !<a class="code" href="config_8h.html#a24654f59366e8cc041ba72d75f6308f9">XDR_INT16</a>( _source, &val ) ) <a name="l00100"></a>00100 <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<span class="stringliteral">"Network I/O Error. Could not read int 16 data. This may be due to a\nbug in libdap or a problem with the network connection."</span>); <a name="l00101"></a>00101 } <a name="l00102"></a>00102 <a name="l00103"></a>00103 <span class="keywordtype">void</span> <a name="l00104"></a>00104 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a19156324e5936f82b378c412994e79b2">XDRFileUnMarshaller::get_int32</a>( <a class="code" href="namespacelibdap.html#ae759bb5209e20f49935f93743022b8bc">dods_int32</a> &val ) <a name="l00105"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a19156324e5936f82b378c412994e79b2">00105</a> { <a name="l00106"></a>00106 <span class="keywordflow">if</span>( !<a class="code" href="config_8h.html#a3e24e0d58a6330f2d3dcb3df5f66e59f">XDR_INT32</a>( _source, &val ) ) <a name="l00107"></a>00107 <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<span class="stringliteral">"Network I/O Error. Could not read int 32 data. This may be due to a\nbug in libdap or a problem with the network connection."</span>); <a name="l00108"></a>00108 } <a name="l00109"></a>00109 <a name="l00110"></a>00110 <span class="keywordtype">void</span> <a name="l00111"></a>00111 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a51f8aebded24bd4a5fcb246aded341c1">XDRFileUnMarshaller::get_float32</a>( <a class="code" href="namespacelibdap.html#a40163a7391daa28f0e3063a2054a16a2">dods_float32</a> &val ) <a name="l00112"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a51f8aebded24bd4a5fcb246aded341c1">00112</a> { <a name="l00113"></a>00113 <span class="keywordflow">if</span>( !xdr_float( _source, &val ) ) <a name="l00114"></a>00114 <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<span class="stringliteral">"Network I/O Error. Could not read float 32 data. This may be due to a\nbug in libdap or a problem with the network connection."</span>); <a name="l00115"></a>00115 } <a name="l00116"></a>00116 <a name="l00117"></a>00117 <span class="keywordtype">void</span> <a name="l00118"></a>00118 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#af5ecc08a045dc82fa262ff411cf25f08">XDRFileUnMarshaller::get_float64</a>( <a class="code" href="namespacelibdap.html#af677a1bef7552bc36d52ecdcdd2c878f">dods_float64</a> &val ) <a name="l00119"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#af5ecc08a045dc82fa262ff411cf25f08">00119</a> { <a name="l00120"></a>00120 <span class="keywordflow">if</span>( !xdr_double( _source, &val ) ) <a name="l00121"></a>00121 <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<span class="stringliteral">"Network I/O Error. Could not read float 64 data. This may be due to a\nbug in libdap or a problem with the network connection."</span>); <a name="l00122"></a>00122 } <a name="l00123"></a>00123 <a name="l00124"></a>00124 <span class="keywordtype">void</span> <a name="l00125"></a>00125 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a14b3dbbb1bc6bff52f51a3471caf5fc6">XDRFileUnMarshaller::get_uint16</a>( <a class="code" href="namespacelibdap.html#af0edc957e05ac3c9e085c2b4f30b2d18">dods_uint16</a> &val ) <a name="l00126"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a14b3dbbb1bc6bff52f51a3471caf5fc6">00126</a> { <a name="l00127"></a>00127 <span class="keywordflow">if</span>( !<a class="code" href="config_8h.html#a0440bdd8dcee5f8ff49fd6c689278da8">XDR_UINT16</a>( _source, &val ) ) <a name="l00128"></a>00128 <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<span class="stringliteral">"Network I/O Error. Could not read uint 16 data. This may be due to a\nbug in libdap or a problem with the network connection."</span>); <a name="l00129"></a>00129 } <a name="l00130"></a>00130 <a name="l00131"></a>00131 <span class="keywordtype">void</span> <a name="l00132"></a>00132 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a5d22491e5703e481c0f8bb272483f288">XDRFileUnMarshaller::get_uint32</a>( <a class="code" href="namespacelibdap.html#acbbf2cafed9043c5e0cd44df0f75fc6d">dods_uint32</a> &val ) <a name="l00133"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a5d22491e5703e481c0f8bb272483f288">00133</a> { <a name="l00134"></a>00134 <span class="keywordflow">if</span>( !<a class="code" href="config_8h.html#a680769c94a1d529e0b8d81e0f1b7d4b4">XDR_UINT32</a>( _source, &val ) ) <a name="l00135"></a>00135 <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<span class="stringliteral">"Network I/O Error. Could not read uint 32 data. This may be due to a\nbug in libdap or a problem with the network connection."</span>); <a name="l00136"></a>00136 } <a name="l00137"></a>00137 <a name="l00138"></a>00138 <span class="keywordtype">void</span> <a name="l00139"></a>00139 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a81e70905e5187223a987e41f356769c7">XDRFileUnMarshaller::get_str</a>( <span class="keywordtype">string</span> &val ) <a name="l00140"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a81e70905e5187223a987e41f356769c7">00140</a> { <a name="l00141"></a>00141 <span class="keywordtype">char</span> *in_tmp = NULL ; <a name="l00142"></a>00142 <a name="l00143"></a>00143 <span class="keywordflow">if</span>( !xdr_string( _source, &in_tmp, <a class="code" href="namespacelibdap.html#aef2455580bf5deab23e48dd319ae059f">max_str_len</a> ) ) <a name="l00144"></a>00144 <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<span class="stringliteral">"Network I/O Error. Could not read string data.\nThis may be due to a bug in libdap, on the server or a\nproblem with the network connection."</span>); <a name="l00145"></a>00145 <a name="l00146"></a>00146 val = in_tmp ; <a name="l00147"></a>00147 <a name="l00148"></a>00148 free( in_tmp ) ; <a name="l00149"></a>00149 } <a name="l00150"></a>00150 <a name="l00151"></a>00151 <span class="keywordtype">void</span> <a name="l00152"></a>00152 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#af98228fb5d1e56e6a6969c65ec57be04">XDRFileUnMarshaller::get_url</a>( <span class="keywordtype">string</span> &val ) <a name="l00153"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#af98228fb5d1e56e6a6969c65ec57be04">00153</a> { <a name="l00154"></a>00154 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a81e70905e5187223a987e41f356769c7">get_str</a>( val ) ; <a name="l00155"></a>00155 } <a name="l00156"></a>00156 <a name="l00157"></a>00157 <span class="keywordtype">void</span> <a name="l00158"></a>00158 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a243b48a28f702f80455691bbbf403ee5">XDRFileUnMarshaller::get_opaque</a>( <span class="keywordtype">char</span> *val, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> len ) <a name="l00159"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a243b48a28f702f80455691bbbf403ee5">00159</a> { <a name="l00160"></a>00160 xdr_opaque( _source, val, len ) ; <a name="l00161"></a>00161 } <a name="l00162"></a>00162 <a name="l00163"></a>00163 <span class="keywordtype">void</span> <a name="l00164"></a>00164 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a0e23e1a7153099f155746d34d6975782">XDRFileUnMarshaller::get_int</a>( <span class="keywordtype">int</span> &val ) <a name="l00165"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a0e23e1a7153099f155746d34d6975782">00165</a> { <a name="l00166"></a>00166 <span class="keywordflow">if</span>( !xdr_int( _source, &val ) ) <a name="l00167"></a>00167 <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<span class="stringliteral">"Network I/O Error(1). This may be due to a bug in libdap or a\nproblem with the network connection."</span>); <a name="l00168"></a>00168 } <a name="l00169"></a>00169 <a name="l00170"></a>00170 <span class="keywordtype">void</span> <a name="l00171"></a>00171 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a8337fdb7575006038ae324110f9f44ce">XDRFileUnMarshaller::get_vector</a>( <span class="keywordtype">char</span> **val, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &num, <a class="code" href="classlibdap_1_1Vector.html" title="Holds a one-dimensional collection of DAP2 data types.">Vector</a> & ) <a name="l00172"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a8337fdb7575006038ae324110f9f44ce">00172</a> { <a name="l00173"></a>00173 <span class="keywordflow">if</span>( !xdr_bytes( _source, val, &num, <a class="code" href="namespacelibdap.html#a2b66c19fe22ad8616c2e33f94a0a9a49">DODS_MAX_ARRAY</a>) ) <a name="l00174"></a>00174 <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<span class="stringliteral">"Network I/O error. Could not read packed array data.\nThis may be due to a bug in libdap or a problem with\nthe network connection."</span>); <a name="l00175"></a>00175 } <a name="l00176"></a>00176 <a name="l00177"></a>00177 <span class="keywordtype">void</span> <a name="l00178"></a>00178 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a8337fdb7575006038ae324110f9f44ce">XDRFileUnMarshaller::get_vector</a>( <span class="keywordtype">char</span> **val, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &num, <span class="keywordtype">int</span> width, <a class="code" href="classlibdap_1_1Vector.html" title="Holds a one-dimensional collection of DAP2 data types.">Vector</a> &vec ) <a name="l00179"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#a072ecad7d0f66f91454d0afae6276eec">00179</a> { <a name="l00180"></a>00180 <a class="code" href="classlibdap_1_1BaseType.html" title="The basic data type for the DODS DAP types.">BaseType</a> *var = vec.<a class="code" href="classlibdap_1_1Vector.html#aa5ccb30d1f27ae587f35216b859feec7">var</a>() ; <a name="l00181"></a>00181 <a name="l00182"></a>00182 <span class="keywordflow">if</span>( !xdr_array( _source, val, &num, <a class="code" href="namespacelibdap.html#a2b66c19fe22ad8616c2e33f94a0a9a49">DODS_MAX_ARRAY</a>, width, <a name="l00183"></a>00183 <a class="code" href="classlibdap_1_1XDRUtils.html#aaf9f4be9a9e22a10416bfbad841751a3" title="Returns a function used to encode elements of an array.">XDRUtils::xdr_coder</a>( var-><a class="code" href="classlibdap_1_1BaseType.html#abc6b2d7099f00bb5f324ec129bff2a17" title="Returns the type of the class instance.">type</a>() ) ) ) <a name="l00184"></a>00184 { <a name="l00185"></a>00185 <span class="keywordflow">throw</span> <a class="code" href="classlibdap_1_1Error.html" title="A class for error processing.">Error</a>(<span class="stringliteral">"Network I/O error. Could not read packed array data.\nThis may be due to a bug in libdap or a problem with\nthe network connection."</span>); <a name="l00186"></a>00186 } <a name="l00187"></a>00187 } <a name="l00188"></a>00188 <a name="l00189"></a>00189 <span class="keywordtype">void</span> <a name="l00190"></a>00190 <a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#afcd9de045c729321164cba5004746c29" title="dump the contents of this object to the specified ostream">XDRFileUnMarshaller::dump</a>(ostream &strm)<span class="keyword"> const</span> <a name="l00191"></a><a class="code" href="classlibdap_1_1XDRFileUnMarshaller.html#afcd9de045c729321164cba5004746c29">00191</a> <span class="keyword"></span>{ <a name="l00192"></a>00192 strm << <a class="code" href="classlibdap_1_1DapIndent.html#a45ca36e552f70fbdbca0599da4320aab">DapIndent::LMarg</a> << <span class="stringliteral">"XDRFileUnMarshaller::dump - ("</span> <a name="l00193"></a>00193 << (<span class="keywordtype">void</span> *)<span class="keyword">this</span> << <span class="stringliteral">")"</span> << endl ; <a name="l00194"></a>00194 } <a name="l00195"></a>00195 <a name="l00196"></a>00196 } <span class="comment">// namespace libdap</span> <a name="l00197"></a>00197 </pre></div></div> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="XDRFileUnMarshaller_8cc.html">XDRFileUnMarshaller.cc</a> </li> <li class="footer">Generated on Tue Feb 8 2011 for libdap++ by  <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>