Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ibinarystream.hpp

00001 /************************************************************************************
00002  *    This file is part of the MynahSA streaming and archiving toolkit              *
00003  *    Copyright (C) 2006 Mynah-Software Ltd. All Rights Reserved.                   *
00004  *                                                                                  *
00005  *    This program is free software; you can redistribute it and/or modify          *
00006  *    it under the terms of the GNU General Public License, version 2               *
00007  *    as published by the Free Software Foundation.                                 *
00008  *                                                                                  *
00009  *    This program is distributed in the hope that it will be useful,               *
00010  *    but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00011  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                 *
00012  *    GNU General Public License for more details.                                  *
00013  *                                                                                  *
00014  *    You should have received a copy of the GNU General Public License along       *
00015  *    with this program; if not, write to the Free Software Foundation, Inc.,       *
00016  *    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                   *
00017  *                                                                                  *
00018  ************************************************************************************/
00019 
00020 #ifndef __i_binary_stream_hpp
00021 #define __i_binary_stream_hpp
00022 
00023 #include <iostream>
00024 
00025 #include "istreambase.hpp"
00026 
00027 namespace MynahSA { 
00028 
00035   class IBinaryStream : public IStreamBase { 
00036   public:
00038     IBinaryStream(std::istream& is);
00039     
00041     IBinaryStream(const IBinaryStream& is);
00042     
00044     virtual ~IBinaryStream();
00045     
00047     virtual IStreamBase& operator>>(char&);
00048     
00050     virtual IStreamBase& operator>>(unsigned char&);
00051     
00053     virtual IStreamBase& operator>>(short&);
00054     
00056     virtual IStreamBase& operator>>(unsigned short&);
00057     
00059     virtual IStreamBase& operator>>(bool&);
00060     
00062     virtual IStreamBase& operator>>(int&);
00063     
00065     virtual IStreamBase& operator>>(unsigned int&);
00066     
00068     virtual IStreamBase& operator>>(long long&);
00069     
00071     virtual IStreamBase& operator>>(unsigned long long&);
00072     
00074     virtual IStreamBase& operator>>(double&);
00076     virtual IStreamBase& operator>>(float&);
00077   
00079     virtual void get(char& c);
00080     
00081     // use base class implementations
00082     using IStreamBase::operator>>;
00083   
00084   private:
00086     std::istream& _is;
00087   };
00088 };
00089 
00090 #endif