SMILIntegerType.h (1397B)
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 DOM_SMIL_SMILINTEGERTYPE_H_ 8 #define DOM_SMIL_SMILINTEGERTYPE_H_ 9 10 #include "mozilla/SMILType.h" 11 12 namespace mozilla { 13 14 class SMILIntegerType : public SMILType { 15 public: 16 void InitValue(SMILValue& aValue) const override; 17 void DestroyValue(SMILValue& aValue) const override; 18 nsresult Assign(SMILValue& aDest, const SMILValue& aSrc) const override; 19 bool IsEqual(const SMILValue& aLeft, const SMILValue& aRight) const override; 20 nsresult Add(SMILValue& aDest, const SMILValue& aValueToAdd, 21 uint32_t aCount) const override; 22 nsresult ComputeDistance(const SMILValue& aFrom, const SMILValue& aTo, 23 double& aDistance) const override; 24 nsresult Interpolate(const SMILValue& aStartVal, const SMILValue& aEndVal, 25 double aUnitDistance, SMILValue& aResult) const override; 26 27 static SMILIntegerType* Singleton() { 28 static SMILIntegerType sSingleton; 29 return &sSingleton; 30 } 31 32 private: 33 constexpr SMILIntegerType() = default; 34 }; 35 36 } // namespace mozilla 37 38 #endif // DOM_SMIL_SMILINTEGERTYPE_H_