Bug 1523562 [wpt PR 15079] - Pass the full path to the flake8 config files, a=testonly
[gecko.git] / dom / smil / SMILEnumType.h
blobc906620334ccbd317e438635d8bdf4b2a35f9ebf
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/. */
7 #ifndef mozilla_SMILEnumType_h
8 #define mozilla_SMILEnumType_h
10 #include "mozilla/Attributes.h"
11 #include "mozilla/SMILType.h"
13 namespace mozilla {
15 class SMILEnumType : public SMILType {
16 public:
17 // Singleton for SMILValue objects to hold onto.
18 static SMILEnumType* Singleton() {
19 static SMILEnumType sSingleton;
20 return &sSingleton;
23 protected:
24 // SMILType Methods
25 // -------------------
26 virtual void Init(SMILValue& aValue) const override;
27 virtual void Destroy(SMILValue& aValue) const override;
28 virtual nsresult Assign(SMILValue& aDest,
29 const SMILValue& aSrc) const override;
30 virtual bool IsEqual(const SMILValue& aLeft,
31 const SMILValue& aRight) const override;
32 virtual nsresult Add(SMILValue& aDest, const SMILValue& aValueToAdd,
33 uint32_t aCount) const override;
34 virtual nsresult ComputeDistance(const SMILValue& aFrom, const SMILValue& aTo,
35 double& aDistance) const override;
36 virtual nsresult Interpolate(const SMILValue& aStartVal,
37 const SMILValue& aEndVal, double aUnitDistance,
38 SMILValue& aResult) const override;
40 private:
41 // Private constructor: prevent instances beyond my singleton.
42 constexpr SMILEnumType() {}
45 } // namespace mozilla
47 #endif // mozilla_SMILEnumType_h