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

ostreambase.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 __o_stream_base_hpp
00021 #define __o_stream_base_hpp
00022 
00023 #include <list>
00024 #include <map>
00025 #include <string>
00026 #include <vector>
00027 
00028 #include <stdexcept>
00029 
00030 #include <mynahsa/exceptionbase.hpp>
00031 
00032 namespace MynahSA { 
00033 
00036   class OStreamWriteError : public ExceptionBase { 
00037   public:
00039     OStreamWriteError(const std::string& c);
00041     ~OStreamWriteError() throw();
00042   };
00043   
00044   
00049   class OStreamBase {
00050   public:
00052     OStreamBase();
00053     
00055     virtual ~OStreamBase();
00056     
00058     virtual OStreamBase& operator<<(const char) = 0;
00060     virtual OStreamBase& operator<<(const unsigned char) = 0;
00062     virtual OStreamBase& operator<<(const short) = 0;
00064     virtual OStreamBase& operator<<(const unsigned short) = 0;
00066     virtual OStreamBase& operator<<(const int) = 0;
00068     virtual OStreamBase& operator<<(const unsigned int) = 0;
00070     virtual OStreamBase& operator<<(const bool) = 0;
00072     virtual OStreamBase& operator<<(const long long) = 0;
00074     virtual OStreamBase& operator<<(const unsigned long long) = 0;
00076     virtual OStreamBase& operator<<(const double) = 0;
00078     virtual OStreamBase& operator<<(const float) = 0;
00079     
00081     virtual OStreamBase& operator<<(const std::string&);
00082   
00083   };
00084 };
00085 
00086 #endif