LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom - KeyframeAnimationOptionsBinding.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 52 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 15 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* THIS FILE IS AUTOGENERATED FROM KeyframeAnimationOptions.webidl BY Codegen.py - DO NOT EDIT */
       2             : 
       3             : #ifndef mozilla_dom_KeyframeAnimationOptionsBinding_h
       4             : #define mozilla_dom_KeyframeAnimationOptionsBinding_h
       5             : 
       6             : #include "AnimatableBinding.h"
       7             : #include "js/RootingAPI.h"
       8             : #include "jspubtd.h"
       9             : #include "mozilla/ErrorResult.h"
      10             : #include "mozilla/dom/BindingDeclarations.h"
      11             : #include "mozilla/dom/FakeString.h"
      12             : #include "mozilla/dom/Nullable.h"
      13             : #include "mozilla/dom/UnionMember.h"
      14             : 
      15             : namespace mozilla {
      16             : namespace dom {
      17             : 
      18             : struct NativePropertyHooks;
      19             : class ProtoAndIfaceCache;
      20             : 
      21             : } // namespace dom
      22             : } // namespace mozilla
      23             : 
      24             : namespace mozilla {
      25             : namespace dom {
      26             : 
      27             : class UnrestrictedDoubleOrKeyframeAnimationOptions
      28             : {
      29             :   friend class UnrestrictedDoubleOrKeyframeAnimationOptionsArgument;
      30             :   enum Type
      31             :   {
      32             :     eUninitialized,
      33             :     eUnrestrictedDouble,
      34             :     eKeyframeAnimationOptions
      35             :   };
      36             : 
      37           0 :   union Value
      38             :   {
      39             :     UnionMember<double > mUnrestrictedDouble;
      40             :     UnionMember<binding_detail::FastKeyframeAnimationOptions > mKeyframeAnimationOptions;
      41             : 
      42             :   };
      43             : 
      44             :   Type mType;
      45             :   Value mValue;
      46             : 
      47             :   UnrestrictedDoubleOrKeyframeAnimationOptions(const UnrestrictedDoubleOrKeyframeAnimationOptions&) = delete;
      48             :   UnrestrictedDoubleOrKeyframeAnimationOptions& operator=(const UnrestrictedDoubleOrKeyframeAnimationOptions&) = delete;
      49             : public:
      50           0 :   explicit inline UnrestrictedDoubleOrKeyframeAnimationOptions()
      51           0 :     : mType(eUninitialized)
      52             :   {
      53           0 :   }
      54             : 
      55           0 :   inline ~UnrestrictedDoubleOrKeyframeAnimationOptions()
      56           0 :   {
      57           0 :     Uninit();
      58           0 :   }
      59             : 
      60             :   inline double&
      61             :   RawSetAsUnrestrictedDouble()
      62             :   {
      63             :     if (mType == eUnrestrictedDouble) {
      64             :       return mValue.mUnrestrictedDouble.Value();
      65             :     }
      66             :     MOZ_ASSERT(mType == eUninitialized);
      67             :     mType = eUnrestrictedDouble;
      68             :     return mValue.mUnrestrictedDouble.SetValue();
      69             :   }
      70             : 
      71             :   inline double&
      72             :   SetAsUnrestrictedDouble()
      73             :   {
      74             :     if (mType == eUnrestrictedDouble) {
      75             :       return mValue.mUnrestrictedDouble.Value();
      76             :     }
      77             :     Uninit();
      78             :     mType = eUnrestrictedDouble;
      79             :     return mValue.mUnrestrictedDouble.SetValue();
      80             :   }
      81             : 
      82             :   inline bool
      83           0 :   IsUnrestrictedDouble() const
      84             :   {
      85           0 :     return mType == eUnrestrictedDouble;
      86             :   }
      87             : 
      88             :   inline double&
      89             :   GetAsUnrestrictedDouble()
      90             :   {
      91             :     MOZ_ASSERT(IsUnrestrictedDouble(), "Wrong type!");
      92             :     return mValue.mUnrestrictedDouble.Value();
      93             :   }
      94             : 
      95             :   inline double
      96           0 :   GetAsUnrestrictedDouble() const
      97             :   {
      98           0 :     MOZ_ASSERT(IsUnrestrictedDouble(), "Wrong type!");
      99           0 :     return mValue.mUnrestrictedDouble.Value();
     100             :   }
     101             : 
     102             :   inline binding_detail::FastKeyframeAnimationOptions&
     103           0 :   RawSetAsKeyframeAnimationOptions()
     104             :   {
     105           0 :     if (mType == eKeyframeAnimationOptions) {
     106           0 :       return mValue.mKeyframeAnimationOptions.Value();
     107             :     }
     108           0 :     MOZ_ASSERT(mType == eUninitialized);
     109           0 :     mType = eKeyframeAnimationOptions;
     110           0 :     return mValue.mKeyframeAnimationOptions.SetValue();
     111             :   }
     112             : 
     113             :   inline binding_detail::FastKeyframeAnimationOptions&
     114             :   SetAsKeyframeAnimationOptions()
     115             :   {
     116             :     if (mType == eKeyframeAnimationOptions) {
     117             :       return mValue.mKeyframeAnimationOptions.Value();
     118             :     }
     119             :     Uninit();
     120             :     mType = eKeyframeAnimationOptions;
     121             :     return mValue.mKeyframeAnimationOptions.SetValue();
     122             :   }
     123             : 
     124             :   inline bool
     125           0 :   IsKeyframeAnimationOptions() const
     126             :   {
     127           0 :     return mType == eKeyframeAnimationOptions;
     128             :   }
     129             : 
     130             :   inline binding_detail::FastKeyframeAnimationOptions&
     131             :   GetAsKeyframeAnimationOptions()
     132             :   {
     133             :     MOZ_ASSERT(IsKeyframeAnimationOptions(), "Wrong type!");
     134             :     return mValue.mKeyframeAnimationOptions.Value();
     135             :   }
     136             : 
     137             :   inline const KeyframeAnimationOptions&
     138           0 :   GetAsKeyframeAnimationOptions() const
     139             :   {
     140           0 :     MOZ_ASSERT(IsKeyframeAnimationOptions(), "Wrong type!");
     141           0 :     return mValue.mKeyframeAnimationOptions.Value();
     142             :   }
     143             : 
     144             :   inline void
     145           0 :   Uninit()
     146             :   {
     147           0 :     switch (mType) {
     148             :       case eUninitialized: {
     149           0 :         break;
     150             :       }
     151             :       case eUnrestrictedDouble: {
     152           0 :         DestroyUnrestrictedDouble();
     153           0 :         break;
     154             :       }
     155             :       case eKeyframeAnimationOptions: {
     156           0 :         DestroyKeyframeAnimationOptions();
     157           0 :         break;
     158             :       }
     159             :     }
     160           0 :   }
     161             : 
     162             :   bool
     163             :   ToJSVal(JSContext* cx, JS::Handle<JSObject*> scopeObj, JS::MutableHandle<JS::Value> rval) const;
     164             : 
     165             : private:
     166             :   inline void
     167           0 :   DestroyUnrestrictedDouble()
     168             :   {
     169           0 :     MOZ_ASSERT(IsUnrestrictedDouble(), "Wrong type!");
     170           0 :     mValue.mUnrestrictedDouble.Destroy();
     171           0 :     mType = eUninitialized;
     172           0 :   }
     173             : 
     174             :   inline void
     175           0 :   DestroyKeyframeAnimationOptions()
     176             :   {
     177           0 :     MOZ_ASSERT(IsKeyframeAnimationOptions(), "Wrong type!");
     178           0 :     mValue.mKeyframeAnimationOptions.Destroy();
     179           0 :     mType = eUninitialized;
     180           0 :   }
     181             : };
     182             : 
     183             : 
     184             : class OwningUnrestrictedDoubleOrKeyframeAnimationOptions : public AllOwningUnionBase
     185             : {
     186             :   friend void ImplCycleCollectionUnlink(OwningUnrestrictedDoubleOrKeyframeAnimationOptions& aUnion);
     187             :   enum Type
     188             :   {
     189             :     eUninitialized,
     190             :     eUnrestrictedDouble,
     191             :     eKeyframeAnimationOptions
     192             :   };
     193             : 
     194             :   union Value
     195             :   {
     196             :     UnionMember<double > mUnrestrictedDouble;
     197             :     UnionMember<KeyframeAnimationOptions > mKeyframeAnimationOptions;
     198             : 
     199             :   };
     200             : 
     201             :   Type mType;
     202             :   Value mValue;
     203             : 
     204             : public:
     205             :   explicit inline OwningUnrestrictedDoubleOrKeyframeAnimationOptions()
     206             :     : mType(eUninitialized)
     207             :   {
     208             :   }
     209             : 
     210             :   explicit inline OwningUnrestrictedDoubleOrKeyframeAnimationOptions(const OwningUnrestrictedDoubleOrKeyframeAnimationOptions& aOther)
     211             :     : mType(eUninitialized)
     212             :   {
     213             :     *this = aOther;
     214             :   }
     215             : 
     216             :   inline ~OwningUnrestrictedDoubleOrKeyframeAnimationOptions()
     217             :   {
     218             :     Uninit();
     219             :   }
     220             : 
     221             :   double&
     222             :   RawSetAsUnrestrictedDouble();
     223             : 
     224             :   double&
     225             :   SetAsUnrestrictedDouble();
     226             : 
     227             :   bool
     228             :   TrySetToUnrestrictedDouble(JSContext* cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
     229             : 
     230             :   inline bool
     231           0 :   IsUnrestrictedDouble() const
     232             :   {
     233           0 :     return mType == eUnrestrictedDouble;
     234             :   }
     235             : 
     236             :   inline double&
     237             :   GetAsUnrestrictedDouble()
     238             :   {
     239             :     MOZ_ASSERT(IsUnrestrictedDouble(), "Wrong type!");
     240             :     return mValue.mUnrestrictedDouble.Value();
     241             :   }
     242             : 
     243             :   inline double const &
     244           0 :   GetAsUnrestrictedDouble() const
     245             :   {
     246           0 :     MOZ_ASSERT(IsUnrestrictedDouble(), "Wrong type!");
     247           0 :     return mValue.mUnrestrictedDouble.Value();
     248             :   }
     249             : 
     250             :   KeyframeAnimationOptions&
     251             :   RawSetAsKeyframeAnimationOptions();
     252             : 
     253             :   KeyframeAnimationOptions&
     254             :   SetAsKeyframeAnimationOptions();
     255             : 
     256             :   bool
     257             :   TrySetToKeyframeAnimationOptions(JSContext* cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
     258             : 
     259             :   inline bool
     260           0 :   IsKeyframeAnimationOptions() const
     261             :   {
     262           0 :     return mType == eKeyframeAnimationOptions;
     263             :   }
     264             : 
     265             :   inline KeyframeAnimationOptions&
     266             :   GetAsKeyframeAnimationOptions()
     267             :   {
     268             :     MOZ_ASSERT(IsKeyframeAnimationOptions(), "Wrong type!");
     269             :     return mValue.mKeyframeAnimationOptions.Value();
     270             :   }
     271             : 
     272             :   inline KeyframeAnimationOptions const &
     273           0 :   GetAsKeyframeAnimationOptions() const
     274             :   {
     275           0 :     MOZ_ASSERT(IsKeyframeAnimationOptions(), "Wrong type!");
     276           0 :     return mValue.mKeyframeAnimationOptions.Value();
     277             :   }
     278             : 
     279             :   void
     280             :   Uninit();
     281             : 
     282             :   bool
     283             :   ToJSVal(JSContext* cx, JS::Handle<JSObject*> scopeObj, JS::MutableHandle<JS::Value> rval) const;
     284             : 
     285             :   void
     286             :   TraceUnion(JSTracer* trc);
     287             : 
     288             :   OwningUnrestrictedDoubleOrKeyframeAnimationOptions&
     289             :   operator=(const OwningUnrestrictedDoubleOrKeyframeAnimationOptions& aOther);
     290             : 
     291             : private:
     292             :   void
     293             :   DestroyUnrestrictedDouble();
     294             : 
     295             :   void
     296             :   DestroyKeyframeAnimationOptions();
     297             : };
     298             : 
     299             : 
     300             : } // namespace dom
     301             : } // namespace mozilla
     302             : 
     303             : #endif // mozilla_dom_KeyframeAnimationOptionsBinding_h

Generated by: LCOV version 1.13