|
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/. */ |
|
5 |
|
6 #ifndef MOZILLA_SMILINTEGERTYPE_H_ |
|
7 #define MOZILLA_SMILINTEGERTYPE_H_ |
|
8 |
|
9 #include "mozilla/Attributes.h" |
|
10 #include "nsISMILType.h" |
|
11 |
|
12 namespace mozilla { |
|
13 |
|
14 class SMILIntegerType : public nsISMILType |
|
15 { |
|
16 public: |
|
17 virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE; |
|
18 virtual void Destroy(nsSMILValue&) const; |
|
19 virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE; |
|
20 virtual bool IsEqual(const nsSMILValue& aLeft, |
|
21 const nsSMILValue& aRight) const MOZ_OVERRIDE; |
|
22 virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd, |
|
23 uint32_t aCount) const MOZ_OVERRIDE; |
|
24 virtual nsresult ComputeDistance(const nsSMILValue& aFrom, |
|
25 const nsSMILValue& aTo, |
|
26 double& aDistance) const MOZ_OVERRIDE; |
|
27 virtual nsresult Interpolate(const nsSMILValue& aStartVal, |
|
28 const nsSMILValue& aEndVal, |
|
29 double aUnitDistance, |
|
30 nsSMILValue& aResult) const MOZ_OVERRIDE; |
|
31 |
|
32 static SMILIntegerType* |
|
33 Singleton() |
|
34 { |
|
35 static SMILIntegerType sSingleton; |
|
36 return &sSingleton; |
|
37 } |
|
38 |
|
39 private: |
|
40 MOZ_CONSTEXPR SMILIntegerType() {} |
|
41 }; |
|
42 |
|
43 } // namespace mozilla |
|
44 |
|
45 #endif // MOZILLA_SMILINTEGERTYPE_H_ |