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 DOM_SMIL_SMILBOOLTYPE_H_
8 #define DOM_SMIL_SMILBOOLTYPE_H_
10 #include "mozilla/Attributes.h"
11 #include "mozilla/SMILType.h"
15 class SMILBoolType
: public SMILType
{
17 // Singleton for SMILValue objects to hold onto.
18 static SMILBoolType
* Singleton() {
19 static SMILBoolType sSingleton
;
25 // -------------------
26 void Init(SMILValue
& aValue
) const override
;
27 void Destroy(SMILValue
& aValue
) const override
;
28 nsresult
Assign(SMILValue
& aDest
, const SMILValue
& aSrc
) const override
;
29 nsresult
Add(SMILValue
& aDest
, const SMILValue
& aValueToAdd
,
30 uint32_t aCount
) const override
;
31 bool IsEqual(const SMILValue
& aLeft
, const SMILValue
& aRight
) const override
;
32 nsresult
ComputeDistance(const SMILValue
& aFrom
, const SMILValue
& aTo
,
33 double& aDistance
) const override
;
34 nsresult
Interpolate(const SMILValue
& aStartVal
, const SMILValue
& aEndVal
,
35 double aUnitDistance
, SMILValue
& aResult
) const override
;
38 // Private constructor: prevent instances beyond my singleton.
39 constexpr SMILBoolType() = default;
42 } // namespace mozilla
44 #endif // DOM_SMIL_SMILBOOLTYPE_H_