Bumping gaia.json for 3 gaia revision(s) a=gaia-bump
[gecko.git] / dom / svg / SVGIntegerPairSMILType.h
blobfbc24dba3a27a4fd15e8af419062b9d3e3698060
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"
12 class nsSMILValue;
14 namespace mozilla {
16 class SVGIntegerPairSMILType : public nsISMILType
18 public:
19 // Singleton for nsSMILValue objects to hold onto.
20 static SVGIntegerPairSMILType*
21 Singleton()
23 static SVGIntegerPairSMILType sSingleton;
24 return &sSingleton;
27 protected:
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,
42 double aUnitDistance,
43 nsSMILValue& aResult) const MOZ_OVERRIDE;
45 private:
46 // Private constructor: prevent instances beyond my singleton.
47 MOZ_CONSTEXPR SVGIntegerPairSMILType() {}
50 } // namespace mozilla
52 #endif // MOZILLA_SVGINTEGERPAIRSMILTYPE_H_