LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - MemoryReportTypes.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 118 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 19 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //
       2             : // Automatically generated by ipdlc.
       3             : // Edit at your own risk
       4             : //
       5             : 
       6             : 
       7             : #include "mozilla/dom/MemoryReportTypes.h"
       8             : 
       9             : 
      10             : //-----------------------------------------------------------------------------
      11             : // Method definitions for the IPDL type |struct MemoryReport|
      12             : //
      13             : namespace mozilla {
      14             : namespace dom {
      15           0 : MOZ_IMPLICIT MemoryReport::MemoryReport() :
      16             :     process_(),
      17             :     path_(),
      18             :     kind_(),
      19             :     units_(),
      20             :     amount_(),
      21             :     generation_(),
      22           0 :     desc_()
      23             : {
      24           0 :     Init();
      25           0 : }
      26             : 
      27           0 : MemoryReport::~MemoryReport()
      28             : {
      29           0 : }
      30             : 
      31           0 : auto MemoryReport::operator==(const MemoryReport& _o) const -> bool
      32             : {
      33           0 :     if ((!((process()) == ((_o).process())))) {
      34           0 :         return false;
      35             :     }
      36           0 :     if ((!((path()) == ((_o).path())))) {
      37           0 :         return false;
      38             :     }
      39           0 :     if ((!((kind()) == ((_o).kind())))) {
      40           0 :         return false;
      41             :     }
      42           0 :     if ((!((units()) == ((_o).units())))) {
      43           0 :         return false;
      44             :     }
      45           0 :     if ((!((amount()) == ((_o).amount())))) {
      46           0 :         return false;
      47             :     }
      48           0 :     if ((!((generation()) == ((_o).generation())))) {
      49           0 :         return false;
      50             :     }
      51           0 :     if ((!((desc()) == ((_o).desc())))) {
      52           0 :         return false;
      53             :     }
      54           0 :     return true;
      55             : }
      56             : 
      57           0 : auto MemoryReport::operator!=(const MemoryReport& _o) const -> bool
      58             : {
      59           0 :     return (!(operator==(_o)));
      60             : }
      61             : 
      62           0 : auto MemoryReport::Init() -> void
      63             : {
      64           0 : }
      65             : 
      66           0 : auto MemoryReport::Assign(
      67             :         const nsCString& _process,
      68             :         const nsCString& _path,
      69             :         const int32_t& _kind,
      70             :         const int32_t& _units,
      71             :         const int64_t& _amount,
      72             :         const uint32_t& _generation,
      73             :         const nsCString& _desc) -> void
      74             : {
      75           0 :     process_ = _process;
      76           0 :     path_ = _path;
      77           0 :     kind_ = _kind;
      78           0 :     units_ = _units;
      79           0 :     amount_ = _amount;
      80           0 :     generation_ = _generation;
      81           0 :     desc_ = _desc;
      82           0 : }
      83             : 
      84             : } // namespace dom
      85             : } // namespace mozilla
      86             : 
      87             : //-----------------------------------------------------------------------------
      88             : // Method definitions for the IPDL type |union MaybeFileDesc|
      89             : //
      90             : namespace mozilla {
      91             : namespace dom {
      92           0 : auto MaybeFileDesc::MaybeDestroy(Type aNewType) -> bool
      93             : {
      94           0 :     if ((mType) == (T__None)) {
      95           0 :         return true;
      96             :     }
      97           0 :     if ((mType) == (aNewType)) {
      98           0 :         return false;
      99             :     }
     100           0 :     switch (mType) {
     101             :     case TFileDescriptor:
     102             :         {
     103           0 :             (ptr_FileDescriptor())->~FileDescriptor__tdef();
     104           0 :             break;
     105             :         }
     106             :     case Tvoid_t:
     107             :         {
     108           0 :             (ptr_void_t())->~void_t__tdef();
     109           0 :             break;
     110             :         }
     111             :     default:
     112             :         {
     113           0 :             mozilla::ipc::LogicError("not reached");
     114           0 :             break;
     115             :         }
     116             :     }
     117           0 :     return true;
     118             : }
     119             : 
     120           0 : MOZ_IMPLICIT MaybeFileDesc::MaybeFileDesc(const FileDescriptor& aOther)
     121             : {
     122           0 :     new (mozilla::KnownNotNull, ptr_FileDescriptor()) FileDescriptor(aOther);
     123           0 :     mType = TFileDescriptor;
     124           0 : }
     125             : 
     126           0 : MOZ_IMPLICIT MaybeFileDesc::MaybeFileDesc(const void_t& aOther)
     127             : {
     128           0 :     new (mozilla::KnownNotNull, ptr_void_t()) void_t(aOther);
     129           0 :     mType = Tvoid_t;
     130           0 : }
     131             : 
     132           0 : MOZ_IMPLICIT MaybeFileDesc::MaybeFileDesc(const MaybeFileDesc& aOther)
     133             : {
     134           0 :     (aOther).AssertSanity();
     135           0 :     switch ((aOther).type()) {
     136             :     case TFileDescriptor:
     137             :         {
     138           0 :             new (mozilla::KnownNotNull, ptr_FileDescriptor()) FileDescriptor((aOther).get_FileDescriptor());
     139           0 :             break;
     140             :         }
     141             :     case Tvoid_t:
     142             :         {
     143           0 :             new (mozilla::KnownNotNull, ptr_void_t()) void_t((aOther).get_void_t());
     144           0 :             break;
     145             :         }
     146             :     case T__None:
     147             :         {
     148           0 :             break;
     149             :         }
     150             :     default:
     151             :         {
     152           0 :             mozilla::ipc::LogicError("unreached");
     153           0 :             return;
     154             :         }
     155             :     }
     156           0 :     mType = (aOther).type();
     157             : }
     158             : 
     159           0 : MaybeFileDesc::~MaybeFileDesc()
     160             : {
     161           0 :     static_cast<void>(MaybeDestroy(T__None));
     162           0 : }
     163             : 
     164           0 : auto MaybeFileDesc::operator=(const FileDescriptor& aRhs) -> MaybeFileDesc&
     165             : {
     166           0 :     if (MaybeDestroy(TFileDescriptor)) {
     167           0 :         new (mozilla::KnownNotNull, ptr_FileDescriptor()) FileDescriptor;
     168             :     }
     169           0 :     (*(ptr_FileDescriptor())) = aRhs;
     170           0 :     mType = TFileDescriptor;
     171           0 :     return (*(this));
     172             : }
     173             : 
     174           0 : auto MaybeFileDesc::operator=(const void_t& aRhs) -> MaybeFileDesc&
     175             : {
     176           0 :     if (MaybeDestroy(Tvoid_t)) {
     177           0 :         new (mozilla::KnownNotNull, ptr_void_t()) void_t;
     178             :     }
     179           0 :     (*(ptr_void_t())) = aRhs;
     180           0 :     mType = Tvoid_t;
     181           0 :     return (*(this));
     182             : }
     183             : 
     184           0 : auto MaybeFileDesc::operator=(const MaybeFileDesc& aRhs) -> MaybeFileDesc&
     185             : {
     186           0 :     (aRhs).AssertSanity();
     187           0 :     Type t = (aRhs).type();
     188           0 :     switch (t) {
     189             :     case TFileDescriptor:
     190             :         {
     191           0 :             if (MaybeDestroy(t)) {
     192           0 :                 new (mozilla::KnownNotNull, ptr_FileDescriptor()) FileDescriptor;
     193             :             }
     194           0 :             (*(ptr_FileDescriptor())) = (aRhs).get_FileDescriptor();
     195           0 :             break;
     196             :         }
     197             :     case Tvoid_t:
     198             :         {
     199           0 :             if (MaybeDestroy(t)) {
     200           0 :                 new (mozilla::KnownNotNull, ptr_void_t()) void_t;
     201             :             }
     202           0 :             (*(ptr_void_t())) = (aRhs).get_void_t();
     203           0 :             break;
     204             :         }
     205             :     case T__None:
     206             :         {
     207           0 :             static_cast<void>(MaybeDestroy(t));
     208           0 :             break;
     209             :         }
     210             :     default:
     211             :         {
     212           0 :             mozilla::ipc::LogicError("unreached");
     213           0 :             break;
     214             :         }
     215             :     }
     216           0 :     mType = t;
     217           0 :     return (*(this));
     218             : }
     219             : 
     220           0 : auto MaybeFileDesc::operator==(const FileDescriptor& aRhs) const -> bool
     221             : {
     222           0 :     return (get_FileDescriptor()) == (aRhs);
     223             : }
     224             : 
     225           0 : auto MaybeFileDesc::operator==(const void_t& aRhs) const -> bool
     226             : {
     227           0 :     return (get_void_t()) == (aRhs);
     228             : }
     229             : 
     230           0 : auto MaybeFileDesc::operator==(const MaybeFileDesc& aRhs) const -> bool
     231             : {
     232           0 :     if ((type()) != ((aRhs).type())) {
     233           0 :         return false;
     234             :     }
     235             : 
     236           0 :     switch (type()) {
     237             :     case TFileDescriptor:
     238             :         {
     239           0 :             return (get_FileDescriptor()) == ((aRhs).get_FileDescriptor());
     240             :         }
     241             :     case Tvoid_t:
     242             :         {
     243           0 :             return (get_void_t()) == ((aRhs).get_void_t());
     244             :         }
     245             :     default:
     246             :         {
     247           0 :             mozilla::ipc::LogicError("unreached");
     248           0 :             return false;
     249             :         }
     250             :     }
     251             : }
     252             : 
     253           0 : auto MaybeFileDesc::get(FileDescriptor* aOutValue) const -> void
     254             : {
     255           0 :     (*(aOutValue)) = get_FileDescriptor();
     256           0 : }
     257             : 
     258           0 : auto MaybeFileDesc::get(void_t* aOutValue) const -> void
     259             : {
     260           0 :     (*(aOutValue)) = get_void_t();
     261           0 : }
     262             : 
     263             : } // namespace dom
     264             : } // namespace mozilla

Generated by: LCOV version 1.13