LCOV - code coverage report
Current view: top level - dom/smil - nsSMILNullType.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 6 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          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 NS_SMILNULLTYPE_H_
       8             : #define NS_SMILNULLTYPE_H_
       9             : 
      10             : #include "mozilla/Attributes.h"
      11             : #include "nsISMILType.h"
      12             : 
      13             : class nsSMILNullType : public nsISMILType
      14             : {
      15             : public:
      16             :   // Singleton for nsSMILValue objects to hold onto.
      17             :   static nsSMILNullType*
      18           0 :   Singleton()
      19             :   {
      20           0 :     static nsSMILNullType sSingleton;
      21           0 :     return &sSingleton;
      22             :   }
      23             : 
      24             : protected:
      25             :   // nsISMILType Methods
      26             :   // -------------------
      27           0 :   virtual void Init(nsSMILValue& aValue) const override {}
      28           0 :   virtual void Destroy(nsSMILValue& aValue) const override {}
      29             :   virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const override;
      30             : 
      31             :   // The remaining methods should never be called, so although they're very
      32             :   // simple they don't need to be inline.
      33             :   virtual bool     IsEqual(const nsSMILValue& aLeft,
      34             :                            const nsSMILValue& aRight) const override;
      35             :   virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
      36             :                        uint32_t aCount) const override;
      37             :   virtual nsresult ComputeDistance(const nsSMILValue& aFrom,
      38             :                                    const nsSMILValue& aTo,
      39             :                                    double& aDistance) const override;
      40             :   virtual nsresult Interpolate(const nsSMILValue& aStartVal,
      41             :                                const nsSMILValue& aEndVal,
      42             :                                double aUnitDistance,
      43             :                                nsSMILValue& aResult) const override;
      44             : 
      45             : private:
      46             :   // Private constructor: prevent instances beyond my singleton.
      47           0 :   constexpr nsSMILNullType() {}
      48             : };
      49             : 
      50             : #endif // NS_SMILNULLTYPE_H_

Generated by: LCOV version 1.13