Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef MOZILLA_SMILINTEGERTYPE_H_
8 : #define MOZILLA_SMILINTEGERTYPE_H_
9 :
10 : #include "mozilla/Attributes.h"
11 : #include "nsISMILType.h"
12 :
13 : namespace mozilla {
14 :
15 : class SMILIntegerType : public nsISMILType
16 : {
17 : public:
18 : virtual void Init(nsSMILValue& aValue) const override;
19 : virtual void Destroy(nsSMILValue& aValue) const override;
20 : virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const override;
21 : virtual bool IsEqual(const nsSMILValue& aLeft,
22 : const nsSMILValue& aRight) const override;
23 : virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
24 : uint32_t aCount) const override;
25 : virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
26 : const nsSMILValue& aTo,
27 : double& aDistance) const override;
28 : virtual nsresult Interpolate(const nsSMILValue& aStartVal,
29 : const nsSMILValue& aEndVal,
30 : double aUnitDistance,
31 : nsSMILValue& aResult) const override;
32 :
33 : static SMILIntegerType*
34 0 : Singleton()
35 : {
36 0 : static SMILIntegerType sSingleton;
37 0 : return &sSingleton;
38 : }
39 :
40 : private:
41 0 : constexpr SMILIntegerType() {}
42 : };
43 :
44 : } // namespace mozilla
45 :
46 : #endif // MOZILLA_SMILINTEGERTYPE_H_
|