libdap
Updated for version 3.17.0
|
00001 // Marshaller.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 A_Marshaller_h 00034 #define A_Marshaller_h 1 00035 00036 #include <string> 00037 #include <vector> 00038 00039 #include "DapObj.h" 00040 #include "Type.h" 00041 #include "dods-datatypes.h" 00042 #include "InternalErr.h" 00043 00044 namespace libdap { 00045 00046 class Vector; 00047 00050 class Marshaller: public DapObj { 00051 public: 00052 virtual void put_byte(dods_byte val) = 0; 00053 00054 virtual void put_int16(dods_int16 val) = 0; 00055 virtual void put_int32(dods_int32 val) = 0; 00056 00057 virtual void put_float32(dods_float32 val) = 0; 00058 virtual void put_float64(dods_float64 val) = 0; 00059 00060 virtual void put_uint16(dods_uint16 val) = 0; 00061 virtual void put_uint32(dods_uint32 val) = 0; 00062 00063 virtual void put_str(const std::string &val) = 0; 00064 virtual void put_url(const std::string &val) = 0; 00065 00066 virtual void put_opaque(char *val, unsigned int len) = 0; 00067 virtual void put_int(int val) = 0; 00068 00069 virtual void put_vector(char *val, int num, Vector &vec) = 0; 00070 virtual void put_vector(char *val, int num, int width, Vector &vec) = 0; 00071 00079 virtual void put_vector_start(int /*num*/) { 00080 throw InternalErr(__FILE__, __LINE__, "Not Implemented yet"); 00081 }// = 0; 00082 00091 virtual void put_vector_part(char */*val*/, unsigned int /*num*/, int /*width*/, Type /*type*/) { 00092 throw InternalErr(__FILE__, __LINE__, "Not Implemented yet"); 00093 }// = 0; 00094 00098 virtual void put_vector_end() { 00099 throw InternalErr(__FILE__, __LINE__, "Not Implemented yet"); 00100 }// = 0; 00101 00102 virtual void dump(std::ostream &strm) const = 0; 00103 }; 00104 00105 } // namespace libdap 00106 00107 #endif // A_Marshaller_h 00108