Generate Element casting helper functions
[WebKit.git] / Source / WebCore / svg / SVGLineElement.h
index ad60a95..53fead6 100644 (file)
 #ifndef SVGLineElement_h
 #define SVGLineElement_h
 
-#if ENABLE(SVG)
 #include "SVGAnimatedBoolean.h"
 #include "SVGAnimatedLength.h"
 #include "SVGExternalResourcesRequired.h"
-#include "SVGLangSpace.h"
-#include "SVGStyledTransformableElement.h"
-#include "SVGTests.h"
+#include "SVGGraphicsElement.h"
 
 namespace WebCore {
 
-class SVGLineElement : public SVGStyledTransformableElement,
-                       public SVGTests,
-                       public SVGLangSpace,
-                       public SVGExternalResourcesRequired {
+class SVGLineElement final : public SVGGraphicsElement,
+                             public SVGExternalResourcesRequired {
 public:
-    static PassRefPtr<SVGLineElement> create(const QualifiedName&, Document*);
+    static PassRefPtr<SVGLineElement> create(const QualifiedName&, Document&);
 
 private:
-    SVGLineElement(const QualifiedName&, Document*);
+    SVGLineElement(const QualifiedName&, Document&);
     
-    virtual bool isValid() const { return SVGTests::isValid(); }
+    virtual bool isValid() const override { return SVGTests::isValid(); }
 
-    virtual void parseMappedAttribute(Attribute*);
-    virtual void svgAttributeChanged(const QualifiedName&);
-    virtual void synchronizeProperty(const QualifiedName&);
+    bool isSupportedAttribute(const QualifiedName&);
+    virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
+    virtual void svgAttributeChanged(const QualifiedName&) override;
 
-    virtual void toPathData(Path&) const;
+    virtual bool supportsMarkers() const override { return true; }
 
-    virtual bool supportsMarkers() const { return true; }
+    virtual bool selfHasRelativeLengths() const override;
 
-    virtual bool selfHasRelativeLengths() const;
-
-    // Animated property declarations
-    DECLARE_ANIMATED_LENGTH(X1, x1)
-    DECLARE_ANIMATED_LENGTH(Y1, y1)
-    DECLARE_ANIMATED_LENGTH(X2, x2)
-    DECLARE_ANIMATED_LENGTH(Y2, y2)
-
-    // SVGExternalResourcesRequired
-    DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired)
+    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGLineElement)
+        DECLARE_ANIMATED_LENGTH(X1, x1)
+        DECLARE_ANIMATED_LENGTH(Y1, y1)
+        DECLARE_ANIMATED_LENGTH(X2, x2)
+        DECLARE_ANIMATED_LENGTH(Y2, y2)
+        DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired)
+    END_DECLARE_ANIMATED_PROPERTIES
 };
 
 } // namespace WebCore
 
-#endif // ENABLE(SVG)
 #endif