KHTML
SVGException.h
Go to the documentation of this file.
00001 /* 00002 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 00003 * Copyright (C) 2006 Apple Computer, Inc. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Library General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Library General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Library General Public License 00016 * along with this library; see the file COPYING.LIB. If not, write to 00017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 * Boston, MA 02110-1301, USA. 00019 * 00020 */ 00021 00022 #ifndef SVGException_h 00023 #define SVGException_h 00024 00025 #if ENABLE(SVG) 00026 00027 /*#include "ExceptionBase.h"*/ 00028 #include "wtf/RefCounted.h" 00029 00030 namespace DOM { 00031 00032 class SVGException : public RefCounted<SVGException> /*: public ExceptionBase*/ { 00033 public: 00034 /*SVGException(const ExceptionCodeDescription& description) 00035 : ExceptionBase(description) 00036 { 00037 }*/ 00038 00039 static const int SVGExceptionOffset = 300; 00040 static const int SVGExceptionMax = 399; 00041 00042 enum SVGExceptionCode { 00043 SVG_WRONG_TYPE_ERR = SVGExceptionOffset, 00044 SVG_INVALID_VALUE_ERR = SVGExceptionOffset + 1, 00045 SVG_MATRIX_NOT_INVERTABLE = SVGExceptionOffset + 2 00046 }; 00047 00048 // KHTML compatibility code 00049 public: 00050 unsigned short code() const { return m_code; } 00051 DOM::DOMString name() const { return m_name; } 00052 DOM::DOMString message() const { return m_message; } 00053 00054 DOM::DOMString toString() const { 00055 // FIXME not implemented 00056 return DOMString(); 00057 } 00058 00059 private: 00060 unsigned short m_code; 00061 DOM::DOMString m_name; 00062 DOM::DOMString m_message; 00063 }; 00064 } 00065 00066 namespace WebCore { 00067 typedef DOM::SVGException SVGException; 00068 } // namespace WebCore 00069 00070 #endif // ENABLE(SVG) 00071 00072 #endif // SVGException_h
KDE 4.6 API Reference