KHtml

SVGException.h
1 /*
2  * Copyright (C) 2006 Samuel Weinig <[email protected]>
3  * Copyright (C) 2006 Apple Computer, Inc.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  *
20  */
21 
22 #ifndef SVGException_h
23 #define SVGException_h
24 
25 #if ENABLE(SVG)
26 
27 /*#include "ExceptionBase.h"*/
28 #include "wtf/RefCounted.h"
29 
30 namespace DOM
31 {
32 
33 class SVGException : public RefCounted<SVGException> /*: public ExceptionBase*/
34 {
35 public:
36  /*SVGException(const ExceptionCodeDescription& description)
37  : ExceptionBase(description)
38  {
39  }*/
40 
41  static const int SVGExceptionOffset = 300;
42  static const int SVGExceptionMax = 399;
43 
44  enum SVGExceptionCode {
45  SVG_WRONG_TYPE_ERR = SVGExceptionOffset,
46  SVG_INVALID_VALUE_ERR = SVGExceptionOffset + 1,
47  SVG_MATRIX_NOT_INVERTABLE = SVGExceptionOffset + 2
48  };
49 
50  // KHTML compatibility code
51 public:
52  unsigned short code() const
53  {
54  return m_code;
55  }
56  DOM::DOMString name() const
57  {
58  return m_name;
59  }
60  DOM::DOMString message() const
61  {
62  return m_message;
63  }
64 
65  DOM::DOMString toString() const
66  {
67  // FIXME not implemented
68  return DOMString();
69  }
70 
71 private:
72  unsigned short m_code;
73  DOM::DOMString m_name;
74  DOM::DOMString m_message;
75 };
76 }
77 
78 namespace WebCore
79 {
80 typedef DOM::SVGException SVGException;
81 } // namespace WebCore
82 
83 #endif // ENABLE(SVG)
84 
85 #endif // SVGException_h
KCOREADDONS_EXPORT void message(KMessage::MessageType messageType, const QString &text, const QString &caption=QString())
QString name(const QVariant &location)
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
This library provides a full-featured HTML parser and widget.
char * toString(const T &value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Oct 26 2021 22:48:09 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.