00001 /* 00002 * iostream.h 00003 * This file is part of dbPager Classes Library (DCL) 00004 * 00005 * Copyright (c) 2008 Dennis Prochko <wolfsoft@mail.ru> 00006 * 00007 * DCL is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation version 3. 00010 * 00011 * DCL is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with DCL; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, 00019 * Boston, MA 02110-1301 USA 00020 */ 00021 00022 #ifndef _IOSTREAM_H_ 00023 #define _IOSTREAM_H_ 00024 00025 #include <string> 00026 #include <istream> 00027 #include <ostream> 00028 00029 #include <dcl/exception.h> 00030 #include <dcl/url.h> 00031 00032 namespace dbp { 00033 00035 00039 class iostream_exception: public exception { 00040 public: 00042 iostream_exception(const std::string &msg): exception(msg) { } 00043 }; 00044 00046 00050 class iostream: public std::istream, public std::ostream { 00051 public: 00053 iostream(const url &url): _url(url) { } 00054 private: 00055 const url &_url; 00056 }; 00057 00058 } 00059 00060 #endif /*_IOSTREAM_H_*/ 00061