libdap++ Updated for version 3.8.2

XDRUtils.h

Go to the documentation of this file.
00001 // XDRUtils.h
00002 
00003 // -*- mode: c++; c-basic-offset:4 -*-
00004 
00005 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
00006 // Access Protocol.
00007 
00008 // Copyright (c) 2002,2003 OPeNDAP, Inc.
00009 // Author: Patrick West <pwest@ucar.edu>
00010 //
00011 // This library is free software; you can redistribute it and/or
00012 // modify it under the terms of the GNU Lesser General Public
00013 // License as published by the Free Software Foundation; either
00014 // version 2.1 of the License, or (at your option) any later version.
00015 //
00016 // This library is distributed in the hope that it will be useful,
00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019 // Lesser General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU Lesser General Public
00022 // License along with this library; if not, write to the Free Software
00023 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 //
00025 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
00026 
00027 // (c) COPYRIGHT URI/MIT 1994-1999
00028 // Please read the full copyright statement in the file COPYRIGHT_URI.
00029 //
00030 // Authors:
00031 //      pwest       Patrick West <pwest@ucar.edu>
00032 
00033 #ifndef S_XDRUtils_h
00034 #define S_XDRUtils_h 1
00035 
00036 #include <cstdio>
00037 #include "xdr-datatypes.h"
00038 #include "BaseType.h"
00039 
00040 #define xdr_proc_t int *
00041 
00042 //  These func's moved to xdrutil_ppc.* under the PPC as explained there
00043 #ifdef __POWERPC__
00044 extern "C" XDR *new_xdrstdio(FILE *stream, enum xdr_op xop);
00045 extern "C" XDR *set_xdrstdio(XDR *xdr, FILE *stream, enum xdr_op xop);
00046 extern "C" void delete_xdrstdio(XDR *xdr);
00047 #else
00048 XDR *new_xdrstdio(FILE *stream, enum xdr_op xop);
00049 XDR *set_xdrstdio(XDR *xdr, FILE *stream, enum xdr_op xop);
00050 void delete_xdrstdio(XDR *xdr);
00051 #endif
00052 
00053 extern "C" bool_t xdr_str(XDR *xdrs, string &buf);
00054 
00055 namespace libdap
00056 {
00057 
00058 class XDRUtils
00059 {
00060 private:                        XDRUtils() {}
00061 public:
00062     // xdr_coder is used as an argument to xdr procedures that encode groups
00063     // of things (e.g., xdr_array()). Each leaf class's constructor must set
00064     // this.
00065     static xdrproc_t            xdr_coder( const Type &t ) ;
00066 } ;
00067 
00068 } // namespace libdap
00069 
00070 #endif // S_XDRUtils_h
00071