libdap++ Updated for version 3.8.2

XDRFileMarshaller.h

Go to the documentation of this file.
00001 // XDRFileMarshaller.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 I_XDRFileMarshaller_h
00034 #define I_XDRFileMarshaller_h 1
00035 
00036 #include "Marshaller.h"
00037 #include "XDRUtils.h"
00038 
00039 namespace libdap
00040 {
00041 
00045 class XDRFileMarshaller : public Marshaller
00046 {
00047 private:
00048     XDR *                       _sink ;
00049                                 XDRFileMarshaller() ;
00050                                 XDRFileMarshaller( const XDRFileMarshaller &m ) ;
00051     XDRFileMarshaller &         operator=( const XDRFileMarshaller & ) ;
00052 public:
00053                                 XDRFileMarshaller( FILE *out ) ;
00054     virtual                     ~XDRFileMarshaller() ;
00055 
00056     virtual void                put_byte( dods_byte val ) ;
00057 
00058     virtual void                put_int16( dods_int16 val ) ;
00059     virtual void                put_int32( dods_int32 val ) ;
00060 
00061     virtual void                put_float32( dods_float32 val ) ;
00062     virtual void                put_float64( dods_float64 val ) ;
00063 
00064     virtual void                put_uint16( dods_uint16 val ) ;
00065     virtual void                put_uint32( dods_uint32 val ) ;
00066 
00067     virtual void                put_str( const string &val ) ;
00068     virtual void                put_url( const string &val ) ;
00069 
00070     virtual void                put_opaque( char *val, unsigned int len ) ;
00071     virtual void                put_int( int val ) ;
00072 
00073     virtual void                put_vector( char *val, int num,
00074                                             Vector &vec ) ;
00075     virtual void                put_vector( char *val, int num, int width,
00076                                             Vector &vec ) ;
00077     virtual void                dump(ostream &strm) const ;
00078 } ;
00079 
00080 } // namespace libdap
00081 
00082 #endif // I_XDRFileMarshaller_h
00083