This machine mirrors various open-source projects.
20 Gbit/s uplink.
If there are any issues or you want another project mirrored, please contact
mirror-service -=AT=- netcologne DOT de !
00001 /*===========================================================================*/ 00002 /* 00003 * This file is part of libogg++ - a c++ library for the Ogg transport format 00004 * 00005 * Copyright (C) 2006, 2007, 2008 Elaine Tsiang YueLien 00006 * 00007 * libogg++ is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 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 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the 00019 * Free Software Foundation, Inc. 00020 * 51 Franklin Street, Fifth Floor 00021 * Boston, MA 02110-1301, USA 00022 * 00023 *===========================================================================*/ 00028 /*===========================================================================*/ 00029 #ifndef OggException 00030 #define OggException 00031 00032 #ifdef __GNUG__ 00033 #pragma interface 00034 #endif 00035 00036 #include <exception> 00037 #include <string> 00038 #include <sstream> 00039 00040 00041 namespace Ogg 00042 { 00043 using std::exception; 00044 using std::string; 00045 using std::ostringstream; 00046 00050 class Exception : public exception, public ostringstream 00051 { 00052 public: 00053 Exception( 00054 const char * nm 00055 ) throw() 00056 ; 00057 00059 Exception( 00060 const Exception & ex 00061 ) throw() 00062 : exception() 00063 { 00064 str() = ex.str(); 00065 } 00066 00067 virtual 00068 ~Exception() throw() 00069 {} 00070 00071 virtual 00072 const char* what() const throw() 00073 { 00074 return(str().c_str()); 00075 } 00076 } 00077 ; 00078 00079 00083 class Error 00084 { 00085 private: 00086 Error & 00087 operator=(const Error &); 00088 00089 public: 00090 enum ErrorNo 00091 { 00092 None 00093 ,BeyondCurrentVersion 00094 ,SomeStreamsIgnored 00095 ,PacketNonContinuation 00096 ,PacketContinuation 00097 ,NonContinuity 00098 ,BadGranulePosition 00099 ,StreamBegin 00100 ,StreamEnd 00101 ,PrematureEnd 00102 }; 00103 00104 Error & 00105 operator |=(ErrorNo); 00106 00107 Error & 00108 operator |=(Error &); 00109 00110 bool 00111 operator [](ErrorNo); 00112 00113 const char * 00114 operator ()(ErrorNo); 00115 00116 } 00117 ; 00118 } 00119 #endif