1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef MOZILLA_SVGINTEGERPAIRSMILTYPE_H_
7 #define MOZILLA_SVGINTEGERPAIRSMILTYPE_H_
9 #include "mozilla/Attributes.h"
10 #include "nsISMILType.h"
16 class SVGIntegerPairSMILType
: public nsISMILType
19 // Singleton for nsSMILValue objects to hold onto.
20 static SVGIntegerPairSMILType
*
23 static SVGIntegerPairSMILType sSingleton
;
28 // nsISMILType Methods
29 // -------------------
30 virtual void Init(nsSMILValue
& aValue
) const MOZ_OVERRIDE
;
31 virtual void Destroy(nsSMILValue
&) const MOZ_OVERRIDE
;
32 virtual nsresult
Assign(nsSMILValue
& aDest
, const nsSMILValue
& aSrc
) const MOZ_OVERRIDE
;
33 virtual bool IsEqual(const nsSMILValue
& aLeft
,
34 const nsSMILValue
& aRight
) const MOZ_OVERRIDE
;
35 virtual nsresult
Add(nsSMILValue
& aDest
, const nsSMILValue
& aValueToAdd
,
36 uint32_t aCount
) const MOZ_OVERRIDE
;
37 virtual nsresult
ComputeDistance(const nsSMILValue
& aFrom
,
38 const nsSMILValue
& aTo
,
39 double& aDistance
) const MOZ_OVERRIDE
;
40 virtual nsresult
Interpolate(const nsSMILValue
& aStartVal
,
41 const nsSMILValue
& aEndVal
,
43 nsSMILValue
& aResult
) const MOZ_OVERRIDE
;
46 // Private constructor: prevent instances beyond my singleton.
47 MOZ_CONSTEXPR
SVGIntegerPairSMILType() {}
50 } // namespace mozilla
52 #endif // MOZILLA_SVGINTEGERPAIRSMILTYPE_H_