00001 /* --------------------------------------------------------------------------- 00002 commonc++ - A C++ Common Class Library 00003 Copyright (C) 2005-2012 Mark A Lindner 00004 00005 This file is part of commonc++. 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public 00018 License along with this library; if not, write to the Free 00019 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00020 --------------------------------------------------------------------------- 00021 */ 00022 00023 #ifndef __ccxx_DataReader_hxx 00024 #define __ccxx_DataReader_hxx 00025 00026 #include <commonc++/Blob.h++> 00027 #include <commonc++/DataEncoder.h++> 00028 #include <commonc++/IOException.h++> 00029 #include <commonc++/String.h++> 00030 00031 namespace ccxx { 00032 00040 class COMMONCPP_API DataReader : public DataEncoder 00041 { 00042 public: 00043 00045 virtual ~DataReader() throw(); 00046 00048 DataReader & operator>>(bool &v) throw(IOException); 00050 DataReader & operator>>(byte_t &v) throw(IOException); 00052 DataReader & operator>>(byte_t *v) throw(IOException); 00054 DataReader & operator>>(char &v) throw(IOException); 00056 DataReader & operator>>(char *v) throw(IOException); 00058 DataReader & operator>>(int16_t &v) throw(IOException); 00060 DataReader & operator>>(int16_t *v) throw(IOException); 00062 DataReader & operator>>(uint16_t &v) throw(IOException); 00064 DataReader & operator>>(uint16_t *v) throw(IOException); 00066 DataReader & operator>>(int32_t &v) throw(IOException); 00068 DataReader & operator>>(int32_t *v) throw(IOException); 00070 DataReader & operator>>(uint32_t &v) throw(IOException); 00072 DataReader & operator>>(uint32_t *v) throw(IOException); 00074 DataReader & operator>>(int64_t &v) throw(IOException); 00076 DataReader & operator>>(int64_t *v) throw(IOException); 00078 DataReader & operator>>(uint64_t &v) throw(IOException); 00080 DataReader & operator>>(uint64_t *v) throw(IOException); 00082 DataReader & operator>>(float &v) throw(IOException); 00084 DataReader & operator>>(float *v) throw(IOException); 00086 DataReader & operator>>(double &v) throw(IOException); 00088 DataReader & operator>>(double *v) throw(IOException); 00090 DataReader & operator>>(Blob &v) throw(IOException); 00092 DataReader & operator>>(String &v) throw(IOException); 00093 00095 DataReader & operator>>(const Manipulator &manip) throw(IOException); 00096 00097 protected: 00098 00100 DataReader() throw(); 00101 00103 virtual size_t read(byte_t *buf, size_t count) throw(IOException) = 0; 00104 00105 private: 00106 00107 CCXX_COPY_DECLS(DataReader); 00108 }; 00109 00110 }; // namespace ccxx 00111 00112 #endif // __ccxx_DataReader_hxx 00113 00114 /* end of header file */
1.6.3