Copy as Markdown
Other Tools
//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/_ipdltest/PTestDataStructuresSubParent.h"
#include "mozilla/_ipdltest/PTestDataStructuresSubChild.h"
#include "mozilla/_foo/PTestDataStructuresCommon.h"
#include "ipc/IPCMessageUtils.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "nsIFile.h"
#include "mozilla/ipc/Endpoint.h"
#include "mozilla/ipc/ProtocolMessageUtils.h"
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/ipc/ShmemMessageUtils.h"
#include "mozilla/ipc/TaintingIPCUtils.h"
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union IntDouble|
//
namespace mozilla {
namespace _foo {
auto IntDouble::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case Tint:
{
(ptr_int())->~int__tdef();
break;
}
case Tdouble:
{
(ptr_double())->~double__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT IntDouble::IntDouble(const int& aOther)
{
new (mozilla::KnownNotNull, ptr_int()) int(aOther);
mType = Tint;
}
MOZ_IMPLICIT IntDouble::IntDouble(int&& aOther)
{
new (mozilla::KnownNotNull, ptr_int()) int(std::move(aOther));
mType = Tint;
}
MOZ_IMPLICIT IntDouble::IntDouble(const double& aOther)
{
new (mozilla::KnownNotNull, ptr_double()) double(aOther);
mType = Tdouble;
}
MOZ_IMPLICIT IntDouble::IntDouble(double&& aOther)
{
new (mozilla::KnownNotNull, ptr_double()) double(std::move(aOther));
mType = Tdouble;
}
MOZ_IMPLICIT IntDouble::IntDouble(const IntDouble& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case Tint:
{
new (mozilla::KnownNotNull, ptr_int()) int((aOther).get_int());
break;
}
case Tdouble:
{
new (mozilla::KnownNotNull, ptr_double()) double((aOther).get_double());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT IntDouble::IntDouble(IntDouble&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case Tint:
{
new (mozilla::KnownNotNull, ptr_int()) int(std::move((aOther).get_int()));
(aOther).MaybeDestroy();
break;
}
case Tdouble:
{
new (mozilla::KnownNotNull, ptr_double()) double(std::move((aOther).get_double()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
IntDouble::~IntDouble()
{
MaybeDestroy();
}
auto IntDouble::operator=(const int& aRhs) -> IntDouble&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(aRhs);
mType = Tint;
return (*(this));
}
auto IntDouble::operator=(int&& aRhs) -> IntDouble&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(std::move(aRhs));
mType = Tint;
return (*(this));
}
auto IntDouble::operator=(const double& aRhs) -> IntDouble&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_double()) double(aRhs);
mType = Tdouble;
return (*(this));
}
auto IntDouble::operator=(double&& aRhs) -> IntDouble&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_double()) double(std::move(aRhs));
mType = Tdouble;
return (*(this));
}
auto IntDouble::operator=(const IntDouble& aRhs) -> IntDouble&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int((aRhs).get_int());
break;
}
case Tdouble:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_double()) double((aRhs).get_double());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto IntDouble::operator=(IntDouble&& aRhs) -> IntDouble&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(std::move((aRhs).get_int()));
(aRhs).MaybeDestroy();
break;
}
case Tdouble:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_double()) double(std::move((aRhs).get_double()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::IntDouble>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::_foo::IntDouble union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'IntDouble'
(aWriter)->WriteSentinel(288359303);
switch (type) {
case union__::Tint:
{
IPC::WriteParam(aWriter, (aVar).get_int());
// Sentinel = 'Tint'
(aWriter)->WriteSentinel(64946592);
return;
}
case union__::Tdouble:
{
IPC::WriteParam(aWriter, (aVar).get_double());
// Sentinel = 'Tdouble'
(aWriter)->WriteSentinel(185402064);
return;
}
default:
{
aWriter->FatalError("unknown variant of union IntDouble");
return;
}
}
}
auto ParamTraits<::mozilla::_foo::IntDouble>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::_foo::IntDouble union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union IntDouble");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'IntDouble'
if ((!((aReader)->ReadSentinel(288359303)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union IntDouble");
return {};
}
switch (type) {
case union__::Tint:
{
auto maybe__tmp = IPC::ReadParam<int>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tint of union IntDouble");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tint'
if ((!((aReader)->ReadSentinel(64946592)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tint of union IntDouble");
return {};
}
return std::move(tmp);
}
case union__::Tdouble:
{
auto maybe__tmp = IPC::ReadParam<double>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tdouble of union IntDouble");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tdouble'
if ((!((aReader)->ReadSentinel(185402064)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tdouble of union IntDouble");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union IntDouble");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SIntDouble|
//
namespace mozilla {
namespace _foo {
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::SIntDouble>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).i());
// Sentinel = 'i'
(aWriter)->WriteSentinel(6946922);
(aWriter)->WriteBytes((&((aVar).d())), 8);
// Sentinel = 'd'
(aWriter)->WriteSentinel(6619237);
}
auto ParamTraits<::mozilla::_foo::SIntDouble>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___i = IPC::ReadParam<int>(aReader);
if (!maybe___i) {
aReader->FatalError("Error deserializing 'i' (int) member of 'SIntDouble'");
return {};
}
auto& _i = *maybe___i;
// Sentinel = 'i'
if ((!((aReader)->ReadSentinel(6946922)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'i' (int) member of 'SIntDouble'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_i),
double{0}};
if ((!((aReader)->ReadBytesInto((&((result__)->d())), 8)))) {
aReader->FatalError("Error bulk reading fields from double");
return {};
}
// Sentinel = 'd'
if ((!((aReader)->ReadSentinel(6619237)))) {
mozilla::ipc::SentinelReadError("Error bulk reading fields from double");
return {};
}
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union IntDoubleArrays|
//
namespace mozilla {
namespace _foo {
auto IntDoubleArrays::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case Tint:
{
(ptr_int())->~int__tdef();
break;
}
case TArrayOfint:
{
(ptr_ArrayOfint())->~ArrayOfint__tdef();
break;
}
case TArrayOfdouble:
{
(ptr_ArrayOfdouble())->~ArrayOfdouble__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT IntDoubleArrays::IntDoubleArrays(const int& aOther)
{
new (mozilla::KnownNotNull, ptr_int()) int(aOther);
mType = Tint;
}
MOZ_IMPLICIT IntDoubleArrays::IntDoubleArrays(int&& aOther)
{
new (mozilla::KnownNotNull, ptr_int()) int(std::move(aOther));
mType = Tint;
}
MOZ_IMPLICIT IntDoubleArrays::IntDoubleArrays(const nsTArray<int>& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>((aOther).Clone());
mType = TArrayOfint;
}
MOZ_IMPLICIT IntDoubleArrays::IntDoubleArrays(nsTArray<int>&& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move(aOther));
mType = TArrayOfint;
}
MOZ_IMPLICIT IntDoubleArrays::IntDoubleArrays(const nsTArray<double>& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfdouble()) nsTArray<double>((aOther).Clone());
mType = TArrayOfdouble;
}
MOZ_IMPLICIT IntDoubleArrays::IntDoubleArrays(nsTArray<double>&& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfdouble()) nsTArray<double>(std::move(aOther));
mType = TArrayOfdouble;
}
MOZ_IMPLICIT IntDoubleArrays::IntDoubleArrays(const IntDoubleArrays& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case Tint:
{
new (mozilla::KnownNotNull, ptr_int()) int((aOther).get_int());
break;
}
case TArrayOfint:
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(((aOther).get_ArrayOfint()).Clone());
break;
}
case TArrayOfdouble:
{
new (mozilla::KnownNotNull, ptr_ArrayOfdouble()) nsTArray<double>(((aOther).get_ArrayOfdouble()).Clone());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT IntDoubleArrays::IntDoubleArrays(IntDoubleArrays&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case Tint:
{
new (mozilla::KnownNotNull, ptr_int()) int(std::move((aOther).get_int()));
(aOther).MaybeDestroy();
break;
}
case TArrayOfint:
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move((aOther).get_ArrayOfint()));
(aOther).MaybeDestroy();
break;
}
case TArrayOfdouble:
{
new (mozilla::KnownNotNull, ptr_ArrayOfdouble()) nsTArray<double>(std::move((aOther).get_ArrayOfdouble()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
IntDoubleArrays::~IntDoubleArrays()
{
MaybeDestroy();
}
auto IntDoubleArrays::operator=(const int& aRhs) -> IntDoubleArrays&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(aRhs);
mType = Tint;
return (*(this));
}
auto IntDoubleArrays::operator=(int&& aRhs) -> IntDoubleArrays&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(std::move(aRhs));
mType = Tint;
return (*(this));
}
auto IntDoubleArrays::operator=(const nsTArray<int>& aRhs) -> IntDoubleArrays&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>((aRhs).Clone());
mType = TArrayOfint;
return (*(this));
}
auto IntDoubleArrays::operator=(nsTArray<int>&& aRhs) -> IntDoubleArrays&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move(aRhs));
mType = TArrayOfint;
return (*(this));
}
auto IntDoubleArrays::operator=(const nsTArray<double>& aRhs) -> IntDoubleArrays&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfdouble()) nsTArray<double>((aRhs).Clone());
mType = TArrayOfdouble;
return (*(this));
}
auto IntDoubleArrays::operator=(nsTArray<double>&& aRhs) -> IntDoubleArrays&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfdouble()) nsTArray<double>(std::move(aRhs));
mType = TArrayOfdouble;
return (*(this));
}
auto IntDoubleArrays::operator=(const IntDoubleArrays& aRhs) -> IntDoubleArrays&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int((aRhs).get_int());
break;
}
case TArrayOfint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(((aRhs).get_ArrayOfint()).Clone());
break;
}
case TArrayOfdouble:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfdouble()) nsTArray<double>(((aRhs).get_ArrayOfdouble()).Clone());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto IntDoubleArrays::operator=(IntDoubleArrays&& aRhs) -> IntDoubleArrays&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(std::move((aRhs).get_int()));
(aRhs).MaybeDestroy();
break;
}
case TArrayOfint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move((aRhs).get_ArrayOfint()));
(aRhs).MaybeDestroy();
break;
}
case TArrayOfdouble:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfdouble()) nsTArray<double>(std::move((aRhs).get_ArrayOfdouble()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::IntDoubleArrays>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::_foo::IntDoubleArrays union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'IntDoubleArrays'
(aWriter)->WriteSentinel(778700281);
switch (type) {
case union__::Tint:
{
IPC::WriteParam(aWriter, (aVar).get_int());
// Sentinel = 'Tint'
(aWriter)->WriteSentinel(64946592);
return;
}
case union__::TArrayOfint:
{
IPC::WriteParam(aWriter, (aVar).get_ArrayOfint());
// Sentinel = 'TArrayOfint'
(aWriter)->WriteSentinel(418251860);
return;
}
case union__::TArrayOfdouble:
{
IPC::WriteParam(aWriter, (aVar).get_ArrayOfdouble());
// Sentinel = 'TArrayOfdouble'
(aWriter)->WriteSentinel(674760068);
return;
}
default:
{
aWriter->FatalError("unknown variant of union IntDoubleArrays");
return;
}
}
}
auto ParamTraits<::mozilla::_foo::IntDoubleArrays>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::_foo::IntDoubleArrays union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union IntDoubleArrays");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'IntDoubleArrays'
if ((!((aReader)->ReadSentinel(778700281)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union IntDoubleArrays");
return {};
}
switch (type) {
case union__::Tint:
{
auto maybe__tmp = IPC::ReadParam<int>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tint of union IntDoubleArrays");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tint'
if ((!((aReader)->ReadSentinel(64946592)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tint of union IntDoubleArrays");
return {};
}
return std::move(tmp);
}
case union__::TArrayOfint:
{
auto maybe__tmp = IPC::ReadParam<nsTArray<int>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TArrayOfint of union IntDoubleArrays");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TArrayOfint'
if ((!((aReader)->ReadSentinel(418251860)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TArrayOfint of union IntDoubleArrays");
return {};
}
return std::move(tmp);
}
case union__::TArrayOfdouble:
{
auto maybe__tmp = IPC::ReadParam<nsTArray<double>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TArrayOfdouble of union IntDoubleArrays");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TArrayOfdouble'
if ((!((aReader)->ReadSentinel(674760068)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TArrayOfdouble of union IntDoubleArrays");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union IntDoubleArrays");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SIntDoubleArrays|
//
namespace mozilla {
namespace _foo {
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::SIntDoubleArrays>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).i());
// Sentinel = 'i'
(aWriter)->WriteSentinel(6946922);
IPC::WriteParam(aWriter, (aVar).ai());
// Sentinel = 'ai'
(aWriter)->WriteSentinel(19726539);
IPC::WriteParam(aWriter, (aVar).ad());
// Sentinel = 'ad'
(aWriter)->WriteSentinel(19398854);
}
auto ParamTraits<::mozilla::_foo::SIntDoubleArrays>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___i = IPC::ReadParam<int>(aReader);
if (!maybe___i) {
aReader->FatalError("Error deserializing 'i' (int) member of 'SIntDoubleArrays'");
return {};
}
auto& _i = *maybe___i;
// Sentinel = 'i'
if ((!((aReader)->ReadSentinel(6946922)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'i' (int) member of 'SIntDoubleArrays'");
return {};
}
auto maybe___ai = IPC::ReadParam<nsTArray<int>>(aReader);
if (!maybe___ai) {
aReader->FatalError("Error deserializing 'ai' (int[]) member of 'SIntDoubleArrays'");
return {};
}
auto& _ai = *maybe___ai;
// Sentinel = 'ai'
if ((!((aReader)->ReadSentinel(19726539)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ai' (int[]) member of 'SIntDoubleArrays'");
return {};
}
auto maybe___ad = IPC::ReadParam<nsTArray<double>>(aReader);
if (!maybe___ad) {
aReader->FatalError("Error deserializing 'ad' (double[]) member of 'SIntDoubleArrays'");
return {};
}
auto& _ad = *maybe___ad;
// Sentinel = 'ad'
if ((!((aReader)->ReadSentinel(19398854)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ad' (double[]) member of 'SIntDoubleArrays'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_i),
std::move(_ai),
std::move(_ad)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct ActorWrapper|
//
namespace mozilla {
namespace _foo {
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::ActorWrapper>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).actor());
// Sentinel = 'actor'
(aWriter)->WriteSentinel(102892058);
}
auto ParamTraits<::mozilla::_foo::ActorWrapper>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___actor = IPC::ReadParam<::mozilla::ipc::SideVariant<::mozilla::_ipdltest::PTestDataStructuresSubParent*, ::mozilla::_ipdltest::PTestDataStructuresSubChild*>>(aReader);
if (!maybe___actor) {
aReader->FatalError("Error deserializing 'actor' (PTestDataStructuresSub) member of 'ActorWrapper'");
return {};
}
auto& _actor = *maybe___actor;
// Sentinel = 'actor'
if ((!((aReader)->ReadSentinel(102892058)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'actor' (PTestDataStructuresSub) member of 'ActorWrapper'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
_actor};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union Actors|
//
namespace mozilla {
namespace _foo {
auto Actors::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case Tint:
{
(ptr_int())->~int__tdef();
break;
}
case TArrayOfint:
{
(ptr_ArrayOfint())->~ArrayOfint__tdef();
break;
}
case TArrayOfPTestDataStructuresSub:
{
(ptr_ArrayOfPTestDataStructuresSub())->~ArrayOfPTestDataStructuresSub__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT Actors::Actors(const int& aOther)
{
new (mozilla::KnownNotNull, ptr_int()) int(aOther);
mType = Tint;
}
MOZ_IMPLICIT Actors::Actors(int&& aOther)
{
new (mozilla::KnownNotNull, ptr_int()) int(std::move(aOther));
mType = Tint;
}
MOZ_IMPLICIT Actors::Actors(const nsTArray<int>& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>((aOther).Clone());
mType = TArrayOfint;
}
MOZ_IMPLICIT Actors::Actors(nsTArray<int>&& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move(aOther));
mType = TArrayOfint;
}
MOZ_IMPLICIT Actors::Actors(const nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>((aOther).Clone());
mType = TArrayOfPTestDataStructuresSub;
}
MOZ_IMPLICIT Actors::Actors(nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>&& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(std::move(aOther));
mType = TArrayOfPTestDataStructuresSub;
}
MOZ_IMPLICIT Actors::Actors(const Actors& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case Tint:
{
new (mozilla::KnownNotNull, ptr_int()) int((aOther).get_int());
break;
}
case TArrayOfint:
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(((aOther).get_ArrayOfint()).Clone());
break;
}
case TArrayOfPTestDataStructuresSub:
{
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(((aOther).get_ArrayOfPTestDataStructuresSub()).Clone());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT Actors::Actors(Actors&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case Tint:
{
new (mozilla::KnownNotNull, ptr_int()) int(std::move((aOther).get_int()));
(aOther).MaybeDestroy();
break;
}
case TArrayOfint:
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move((aOther).get_ArrayOfint()));
(aOther).MaybeDestroy();
break;
}
case TArrayOfPTestDataStructuresSub:
{
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(std::move((aOther).get_ArrayOfPTestDataStructuresSub()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
Actors::~Actors()
{
MaybeDestroy();
}
auto Actors::operator=(const int& aRhs) -> Actors&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(aRhs);
mType = Tint;
return (*(this));
}
auto Actors::operator=(int&& aRhs) -> Actors&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(std::move(aRhs));
mType = Tint;
return (*(this));
}
auto Actors::operator=(const nsTArray<int>& aRhs) -> Actors&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>((aRhs).Clone());
mType = TArrayOfint;
return (*(this));
}
auto Actors::operator=(nsTArray<int>&& aRhs) -> Actors&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move(aRhs));
mType = TArrayOfint;
return (*(this));
}
auto Actors::operator=(const nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>& aRhs) -> Actors&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>((aRhs).Clone());
mType = TArrayOfPTestDataStructuresSub;
return (*(this));
}
auto Actors::operator=(nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>&& aRhs) -> Actors&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(std::move(aRhs));
mType = TArrayOfPTestDataStructuresSub;
return (*(this));
}
auto Actors::operator=(const Actors& aRhs) -> Actors&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int((aRhs).get_int());
break;
}
case TArrayOfint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(((aRhs).get_ArrayOfint()).Clone());
break;
}
case TArrayOfPTestDataStructuresSub:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(((aRhs).get_ArrayOfPTestDataStructuresSub()).Clone());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto Actors::operator=(Actors&& aRhs) -> Actors&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(std::move((aRhs).get_int()));
(aRhs).MaybeDestroy();
break;
}
case TArrayOfint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move((aRhs).get_ArrayOfint()));
(aRhs).MaybeDestroy();
break;
}
case TArrayOfPTestDataStructuresSub:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(std::move((aRhs).get_ArrayOfPTestDataStructuresSub()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::Actors>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::_foo::Actors union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'Actors'
(aWriter)->WriteSentinel(133104237);
switch (type) {
case union__::Tint:
{
IPC::WriteParam(aWriter, (aVar).get_int());
// Sentinel = 'Tint'
(aWriter)->WriteSentinel(64946592);
return;
}
case union__::TArrayOfint:
{
IPC::WriteParam(aWriter, (aVar).get_ArrayOfint());
// Sentinel = 'TArrayOfint'
(aWriter)->WriteSentinel(418251860);
return;
}
case union__::TArrayOfPTestDataStructuresSub:
{
IPC::WriteParam(aWriter, (aVar).get_ArrayOfPTestDataStructuresSub());
// Sentinel = 'TArrayOfPTestDataStructuresSub'
(aWriter)->WriteSentinel(3006794721);
return;
}
default:
{
aWriter->FatalError("unknown variant of union Actors");
return;
}
}
}
auto ParamTraits<::mozilla::_foo::Actors>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::_foo::Actors union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union Actors");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'Actors'
if ((!((aReader)->ReadSentinel(133104237)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union Actors");
return {};
}
switch (type) {
case union__::Tint:
{
auto maybe__tmp = IPC::ReadParam<int>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tint of union Actors");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tint'
if ((!((aReader)->ReadSentinel(64946592)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tint of union Actors");
return {};
}
return std::move(tmp);
}
case union__::TArrayOfint:
{
auto maybe__tmp = IPC::ReadParam<nsTArray<int>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TArrayOfint of union Actors");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TArrayOfint'
if ((!((aReader)->ReadSentinel(418251860)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TArrayOfint of union Actors");
return {};
}
return std::move(tmp);
}
case union__::TArrayOfPTestDataStructuresSub:
{
auto maybe__tmp = IPC::ReadParam<nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<::mozilla::_ipdltest::PTestDataStructuresSubParent*, ::mozilla::_ipdltest::PTestDataStructuresSubChild*>>>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TArrayOfPTestDataStructuresSub of union Actors");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TArrayOfPTestDataStructuresSub'
if ((!((aReader)->ReadSentinel(3006794721)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TArrayOfPTestDataStructuresSub of union Actors");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union Actors");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SActors|
//
namespace mozilla {
namespace _foo {
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::SActors>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).i());
// Sentinel = 'i'
(aWriter)->WriteSentinel(6946922);
IPC::WriteParam(aWriter, (aVar).ai());
// Sentinel = 'ai'
(aWriter)->WriteSentinel(19726539);
IPC::WriteParam(aWriter, (aVar).ap());
// Sentinel = 'ap'
(aWriter)->WriteSentinel(20185298);
}
auto ParamTraits<::mozilla::_foo::SActors>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___i = IPC::ReadParam<int>(aReader);
if (!maybe___i) {
aReader->FatalError("Error deserializing 'i' (int) member of 'SActors'");
return {};
}
auto& _i = *maybe___i;
// Sentinel = 'i'
if ((!((aReader)->ReadSentinel(6946922)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'i' (int) member of 'SActors'");
return {};
}
auto maybe___ai = IPC::ReadParam<nsTArray<int>>(aReader);
if (!maybe___ai) {
aReader->FatalError("Error deserializing 'ai' (int[]) member of 'SActors'");
return {};
}
auto& _ai = *maybe___ai;
// Sentinel = 'ai'
if ((!((aReader)->ReadSentinel(19726539)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ai' (int[]) member of 'SActors'");
return {};
}
auto maybe___ap = IPC::ReadParam<nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<::mozilla::_ipdltest::PTestDataStructuresSubParent*, ::mozilla::_ipdltest::PTestDataStructuresSubChild*>>>>(aReader);
if (!maybe___ap) {
aReader->FatalError("Error deserializing 'ap' (NotNull<PTestDataStructuresSub>[]) member of 'SActors'");
return {};
}
auto& _ap = *maybe___ap;
// Sentinel = 'ap'
if ((!((aReader)->ReadSentinel(20185298)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ap' (NotNull<PTestDataStructuresSub>[]) member of 'SActors'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_i),
std::move(_ai),
std::move(_ap)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union Unions|
//
namespace mozilla {
namespace _foo {
auto Unions::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case Tint:
{
(ptr_int())->~int__tdef();
break;
}
case TArrayOfint:
{
(ptr_ArrayOfint())->~ArrayOfint__tdef();
break;
}
case TArrayOfPTestDataStructuresSub:
{
(ptr_ArrayOfPTestDataStructuresSub())->~ArrayOfPTestDataStructuresSub__tdef();
break;
}
case TArrayOfActors:
{
(ptr_ArrayOfActors())->~ArrayOfActors__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT Unions::Unions(const int& aOther)
{
new (mozilla::KnownNotNull, ptr_int()) int(aOther);
mType = Tint;
}
MOZ_IMPLICIT Unions::Unions(int&& aOther)
{
new (mozilla::KnownNotNull, ptr_int()) int(std::move(aOther));
mType = Tint;
}
MOZ_IMPLICIT Unions::Unions(const nsTArray<int>& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>((aOther).Clone());
mType = TArrayOfint;
}
MOZ_IMPLICIT Unions::Unions(nsTArray<int>&& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move(aOther));
mType = TArrayOfint;
}
MOZ_IMPLICIT Unions::Unions(const nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>((aOther).Clone());
mType = TArrayOfPTestDataStructuresSub;
}
MOZ_IMPLICIT Unions::Unions(nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>&& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(std::move(aOther));
mType = TArrayOfPTestDataStructuresSub;
}
MOZ_IMPLICIT Unions::Unions(const nsTArray<Actors>& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfActors()) nsTArray<Actors>((aOther).Clone());
mType = TArrayOfActors;
}
MOZ_IMPLICIT Unions::Unions(nsTArray<Actors>&& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfActors()) nsTArray<Actors>(std::move(aOther));
mType = TArrayOfActors;
}
MOZ_IMPLICIT Unions::Unions(const Unions& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case Tint:
{
new (mozilla::KnownNotNull, ptr_int()) int((aOther).get_int());
break;
}
case TArrayOfint:
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(((aOther).get_ArrayOfint()).Clone());
break;
}
case TArrayOfPTestDataStructuresSub:
{
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(((aOther).get_ArrayOfPTestDataStructuresSub()).Clone());
break;
}
case TArrayOfActors:
{
new (mozilla::KnownNotNull, ptr_ArrayOfActors()) nsTArray<Actors>(((aOther).get_ArrayOfActors()).Clone());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT Unions::Unions(Unions&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case Tint:
{
new (mozilla::KnownNotNull, ptr_int()) int(std::move((aOther).get_int()));
(aOther).MaybeDestroy();
break;
}
case TArrayOfint:
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move((aOther).get_ArrayOfint()));
(aOther).MaybeDestroy();
break;
}
case TArrayOfPTestDataStructuresSub:
{
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(std::move((aOther).get_ArrayOfPTestDataStructuresSub()));
(aOther).MaybeDestroy();
break;
}
case TArrayOfActors:
{
new (mozilla::KnownNotNull, ptr_ArrayOfActors()) nsTArray<Actors>(std::move((aOther).get_ArrayOfActors()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
Unions::~Unions()
{
MaybeDestroy();
}
auto Unions::operator=(const int& aRhs) -> Unions&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(aRhs);
mType = Tint;
return (*(this));
}
auto Unions::operator=(int&& aRhs) -> Unions&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(std::move(aRhs));
mType = Tint;
return (*(this));
}
auto Unions::operator=(const nsTArray<int>& aRhs) -> Unions&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>((aRhs).Clone());
mType = TArrayOfint;
return (*(this));
}
auto Unions::operator=(nsTArray<int>&& aRhs) -> Unions&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move(aRhs));
mType = TArrayOfint;
return (*(this));
}
auto Unions::operator=(const nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>& aRhs) -> Unions&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>((aRhs).Clone());
mType = TArrayOfPTestDataStructuresSub;
return (*(this));
}
auto Unions::operator=(nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>&& aRhs) -> Unions&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(std::move(aRhs));
mType = TArrayOfPTestDataStructuresSub;
return (*(this));
}
auto Unions::operator=(const nsTArray<Actors>& aRhs) -> Unions&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfActors()) nsTArray<Actors>((aRhs).Clone());
mType = TArrayOfActors;
return (*(this));
}
auto Unions::operator=(nsTArray<Actors>&& aRhs) -> Unions&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfActors()) nsTArray<Actors>(std::move(aRhs));
mType = TArrayOfActors;
return (*(this));
}
auto Unions::operator=(const Unions& aRhs) -> Unions&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int((aRhs).get_int());
break;
}
case TArrayOfint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(((aRhs).get_ArrayOfint()).Clone());
break;
}
case TArrayOfPTestDataStructuresSub:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(((aRhs).get_ArrayOfPTestDataStructuresSub()).Clone());
break;
}
case TArrayOfActors:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfActors()) nsTArray<Actors>(((aRhs).get_ArrayOfActors()).Clone());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto Unions::operator=(Unions&& aRhs) -> Unions&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(std::move((aRhs).get_int()));
(aRhs).MaybeDestroy();
break;
}
case TArrayOfint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move((aRhs).get_ArrayOfint()));
(aRhs).MaybeDestroy();
break;
}
case TArrayOfPTestDataStructuresSub:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(std::move((aRhs).get_ArrayOfPTestDataStructuresSub()));
(aRhs).MaybeDestroy();
break;
}
case TArrayOfActors:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfActors()) nsTArray<Actors>(std::move((aRhs).get_ArrayOfActors()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::Unions>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::_foo::Unions union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'Unions'
(aWriter)->WriteSentinel(141165181);
switch (type) {
case union__::Tint:
{
IPC::WriteParam(aWriter, (aVar).get_int());
// Sentinel = 'Tint'
(aWriter)->WriteSentinel(64946592);
return;
}
case union__::TArrayOfint:
{
IPC::WriteParam(aWriter, (aVar).get_ArrayOfint());
// Sentinel = 'TArrayOfint'
(aWriter)->WriteSentinel(418251860);
return;
}
case union__::TArrayOfPTestDataStructuresSub:
{
IPC::WriteParam(aWriter, (aVar).get_ArrayOfPTestDataStructuresSub());
// Sentinel = 'TArrayOfPTestDataStructuresSub'
(aWriter)->WriteSentinel(3006794721);
return;
}
case union__::TArrayOfActors:
{
IPC::WriteParam(aWriter, (aVar).get_ArrayOfActors());
// Sentinel = 'TArrayOfActors'
(aWriter)->WriteSentinel(661063029);
return;
}
default:
{
aWriter->FatalError("unknown variant of union Unions");
return;
}
}
}
auto ParamTraits<::mozilla::_foo::Unions>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::_foo::Unions union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union Unions");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'Unions'
if ((!((aReader)->ReadSentinel(141165181)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union Unions");
return {};
}
switch (type) {
case union__::Tint:
{
auto maybe__tmp = IPC::ReadParam<int>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tint of union Unions");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tint'
if ((!((aReader)->ReadSentinel(64946592)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tint of union Unions");
return {};
}
return std::move(tmp);
}
case union__::TArrayOfint:
{
auto maybe__tmp = IPC::ReadParam<nsTArray<int>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TArrayOfint of union Unions");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TArrayOfint'
if ((!((aReader)->ReadSentinel(418251860)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TArrayOfint of union Unions");
return {};
}
return std::move(tmp);
}
case union__::TArrayOfPTestDataStructuresSub:
{
auto maybe__tmp = IPC::ReadParam<nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<::mozilla::_ipdltest::PTestDataStructuresSubParent*, ::mozilla::_ipdltest::PTestDataStructuresSubChild*>>>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TArrayOfPTestDataStructuresSub of union Unions");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TArrayOfPTestDataStructuresSub'
if ((!((aReader)->ReadSentinel(3006794721)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TArrayOfPTestDataStructuresSub of union Unions");
return {};
}
return std::move(tmp);
}
case union__::TArrayOfActors:
{
auto maybe__tmp = IPC::ReadParam<nsTArray<::mozilla::_foo::Actors>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TArrayOfActors of union Unions");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TArrayOfActors'
if ((!((aReader)->ReadSentinel(661063029)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TArrayOfActors of union Unions");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union Unions");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct Structs|
//
namespace mozilla {
namespace _foo {
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::Structs>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).i());
// Sentinel = 'i'
(aWriter)->WriteSentinel(6946922);
IPC::WriteParam(aWriter, (aVar).ai());
// Sentinel = 'ai'
(aWriter)->WriteSentinel(19726539);
IPC::WriteParam(aWriter, (aVar).ap());
// Sentinel = 'ap'
(aWriter)->WriteSentinel(20185298);
IPC::WriteParam(aWriter, (aVar).aa());
// Sentinel = 'aa'
(aWriter)->WriteSentinel(19202243);
}
auto ParamTraits<::mozilla::_foo::Structs>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___i = IPC::ReadParam<int>(aReader);
if (!maybe___i) {
aReader->FatalError("Error deserializing 'i' (int) member of 'Structs'");
return {};
}
auto& _i = *maybe___i;
// Sentinel = 'i'
if ((!((aReader)->ReadSentinel(6946922)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'i' (int) member of 'Structs'");
return {};
}
auto maybe___ai = IPC::ReadParam<nsTArray<int>>(aReader);
if (!maybe___ai) {
aReader->FatalError("Error deserializing 'ai' (int[]) member of 'Structs'");
return {};
}
auto& _ai = *maybe___ai;
// Sentinel = 'ai'
if ((!((aReader)->ReadSentinel(19726539)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ai' (int[]) member of 'Structs'");
return {};
}
auto maybe___ap = IPC::ReadParam<nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<::mozilla::_ipdltest::PTestDataStructuresSubParent*, ::mozilla::_ipdltest::PTestDataStructuresSubChild*>>>>(aReader);
if (!maybe___ap) {
aReader->FatalError("Error deserializing 'ap' (NotNull<PTestDataStructuresSub>[]) member of 'Structs'");
return {};
}
auto& _ap = *maybe___ap;
// Sentinel = 'ap'
if ((!((aReader)->ReadSentinel(20185298)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ap' (NotNull<PTestDataStructuresSub>[]) member of 'Structs'");
return {};
}
auto maybe___aa = IPC::ReadParam<nsTArray<::mozilla::_foo::SActors>>(aReader);
if (!maybe___aa) {
aReader->FatalError("Error deserializing 'aa' (SActors[]) member of 'Structs'");
return {};
}
auto& _aa = *maybe___aa;
// Sentinel = 'aa'
if ((!((aReader)->ReadSentinel(19202243)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'aa' (SActors[]) member of 'Structs'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_i),
std::move(_ai),
std::move(_ap),
std::move(_aa)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union WithStructs|
//
namespace mozilla {
namespace _foo {
auto WithStructs::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case Tint:
{
(ptr_int())->~int__tdef();
break;
}
case TArrayOfint:
{
(ptr_ArrayOfint())->~ArrayOfint__tdef();
break;
}
case TArrayOfPTestDataStructuresSub:
{
(ptr_ArrayOfPTestDataStructuresSub())->~ArrayOfPTestDataStructuresSub__tdef();
break;
}
case TArrayOfSActors:
{
(ptr_ArrayOfSActors())->~ArrayOfSActors__tdef();
break;
}
case TArrayOfStructs:
{
(ptr_ArrayOfStructs())->~ArrayOfStructs__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT WithStructs::WithStructs(const int& aOther)
{
new (mozilla::KnownNotNull, ptr_int()) int(aOther);
mType = Tint;
}
MOZ_IMPLICIT WithStructs::WithStructs(int&& aOther)
{
new (mozilla::KnownNotNull, ptr_int()) int(std::move(aOther));
mType = Tint;
}
MOZ_IMPLICIT WithStructs::WithStructs(const nsTArray<int>& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>((aOther).Clone());
mType = TArrayOfint;
}
MOZ_IMPLICIT WithStructs::WithStructs(nsTArray<int>&& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move(aOther));
mType = TArrayOfint;
}
MOZ_IMPLICIT WithStructs::WithStructs(const nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>((aOther).Clone());
mType = TArrayOfPTestDataStructuresSub;
}
MOZ_IMPLICIT WithStructs::WithStructs(nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>&& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(std::move(aOther));
mType = TArrayOfPTestDataStructuresSub;
}
MOZ_IMPLICIT WithStructs::WithStructs(const nsTArray<SActors>& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfSActors()) nsTArray<SActors>((aOther).Clone());
mType = TArrayOfSActors;
}
MOZ_IMPLICIT WithStructs::WithStructs(nsTArray<SActors>&& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfSActors()) nsTArray<SActors>(std::move(aOther));
mType = TArrayOfSActors;
}
MOZ_IMPLICIT WithStructs::WithStructs(const nsTArray<Structs>& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfStructs()) nsTArray<Structs>((aOther).Clone());
mType = TArrayOfStructs;
}
MOZ_IMPLICIT WithStructs::WithStructs(nsTArray<Structs>&& aOther)
{
new (mozilla::KnownNotNull, ptr_ArrayOfStructs()) nsTArray<Structs>(std::move(aOther));
mType = TArrayOfStructs;
}
MOZ_IMPLICIT WithStructs::WithStructs(const WithStructs& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case Tint:
{
new (mozilla::KnownNotNull, ptr_int()) int((aOther).get_int());
break;
}
case TArrayOfint:
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(((aOther).get_ArrayOfint()).Clone());
break;
}
case TArrayOfPTestDataStructuresSub:
{
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(((aOther).get_ArrayOfPTestDataStructuresSub()).Clone());
break;
}
case TArrayOfSActors:
{
new (mozilla::KnownNotNull, ptr_ArrayOfSActors()) nsTArray<SActors>(((aOther).get_ArrayOfSActors()).Clone());
break;
}
case TArrayOfStructs:
{
new (mozilla::KnownNotNull, ptr_ArrayOfStructs()) nsTArray<Structs>(((aOther).get_ArrayOfStructs()).Clone());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT WithStructs::WithStructs(WithStructs&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case Tint:
{
new (mozilla::KnownNotNull, ptr_int()) int(std::move((aOther).get_int()));
(aOther).MaybeDestroy();
break;
}
case TArrayOfint:
{
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move((aOther).get_ArrayOfint()));
(aOther).MaybeDestroy();
break;
}
case TArrayOfPTestDataStructuresSub:
{
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(std::move((aOther).get_ArrayOfPTestDataStructuresSub()));
(aOther).MaybeDestroy();
break;
}
case TArrayOfSActors:
{
new (mozilla::KnownNotNull, ptr_ArrayOfSActors()) nsTArray<SActors>(std::move((aOther).get_ArrayOfSActors()));
(aOther).MaybeDestroy();
break;
}
case TArrayOfStructs:
{
new (mozilla::KnownNotNull, ptr_ArrayOfStructs()) nsTArray<Structs>(std::move((aOther).get_ArrayOfStructs()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
WithStructs::~WithStructs()
{
MaybeDestroy();
}
auto WithStructs::operator=(const int& aRhs) -> WithStructs&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(aRhs);
mType = Tint;
return (*(this));
}
auto WithStructs::operator=(int&& aRhs) -> WithStructs&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(std::move(aRhs));
mType = Tint;
return (*(this));
}
auto WithStructs::operator=(const nsTArray<int>& aRhs) -> WithStructs&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>((aRhs).Clone());
mType = TArrayOfint;
return (*(this));
}
auto WithStructs::operator=(nsTArray<int>&& aRhs) -> WithStructs&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move(aRhs));
mType = TArrayOfint;
return (*(this));
}
auto WithStructs::operator=(const nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>& aRhs) -> WithStructs&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>((aRhs).Clone());
mType = TArrayOfPTestDataStructuresSub;
return (*(this));
}
auto WithStructs::operator=(nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>&& aRhs) -> WithStructs&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(std::move(aRhs));
mType = TArrayOfPTestDataStructuresSub;
return (*(this));
}
auto WithStructs::operator=(const nsTArray<SActors>& aRhs) -> WithStructs&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfSActors()) nsTArray<SActors>((aRhs).Clone());
mType = TArrayOfSActors;
return (*(this));
}
auto WithStructs::operator=(nsTArray<SActors>&& aRhs) -> WithStructs&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfSActors()) nsTArray<SActors>(std::move(aRhs));
mType = TArrayOfSActors;
return (*(this));
}
auto WithStructs::operator=(const nsTArray<Structs>& aRhs) -> WithStructs&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfStructs()) nsTArray<Structs>((aRhs).Clone());
mType = TArrayOfStructs;
return (*(this));
}
auto WithStructs::operator=(nsTArray<Structs>&& aRhs) -> WithStructs&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfStructs()) nsTArray<Structs>(std::move(aRhs));
mType = TArrayOfStructs;
return (*(this));
}
auto WithStructs::operator=(const WithStructs& aRhs) -> WithStructs&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int((aRhs).get_int());
break;
}
case TArrayOfint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(((aRhs).get_ArrayOfint()).Clone());
break;
}
case TArrayOfPTestDataStructuresSub:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(((aRhs).get_ArrayOfPTestDataStructuresSub()).Clone());
break;
}
case TArrayOfSActors:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfSActors()) nsTArray<SActors>(((aRhs).get_ArrayOfSActors()).Clone());
break;
}
case TArrayOfStructs:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfStructs()) nsTArray<Structs>(((aRhs).get_ArrayOfStructs()).Clone());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto WithStructs::operator=(WithStructs&& aRhs) -> WithStructs&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(std::move((aRhs).get_int()));
(aRhs).MaybeDestroy();
break;
}
case TArrayOfint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfint()) nsTArray<int>(std::move((aRhs).get_ArrayOfint()));
(aRhs).MaybeDestroy();
break;
}
case TArrayOfPTestDataStructuresSub:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfPTestDataStructuresSub()) nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<PTestDataStructuresSubParent*, PTestDataStructuresSubChild*>>>(std::move((aRhs).get_ArrayOfPTestDataStructuresSub()));
(aRhs).MaybeDestroy();
break;
}
case TArrayOfSActors:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfSActors()) nsTArray<SActors>(std::move((aRhs).get_ArrayOfSActors()));
(aRhs).MaybeDestroy();
break;
}
case TArrayOfStructs:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ArrayOfStructs()) nsTArray<Structs>(std::move((aRhs).get_ArrayOfStructs()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::WithStructs>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::_foo::WithStructs union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'WithStructs'
(aWriter)->WriteSentinel(449119381);
switch (type) {
case union__::Tint:
{
IPC::WriteParam(aWriter, (aVar).get_int());
// Sentinel = 'Tint'
(aWriter)->WriteSentinel(64946592);
return;
}
case union__::TArrayOfint:
{
IPC::WriteParam(aWriter, (aVar).get_ArrayOfint());
// Sentinel = 'TArrayOfint'
(aWriter)->WriteSentinel(418251860);
return;
}
case union__::TArrayOfPTestDataStructuresSub:
{
IPC::WriteParam(aWriter, (aVar).get_ArrayOfPTestDataStructuresSub());
// Sentinel = 'TArrayOfPTestDataStructuresSub'
(aWriter)->WriteSentinel(3006794721);
return;
}
case union__::TArrayOfSActors:
{
IPC::WriteParam(aWriter, (aVar).get_ArrayOfSActors());
// Sentinel = 'TArrayOfSActors'
(aWriter)->WriteSentinel(750061000);
return;
}
case union__::TArrayOfStructs:
{
IPC::WriteParam(aWriter, (aVar).get_ArrayOfStructs());
// Sentinel = 'TArrayOfStructs'
(aWriter)->WriteSentinel(773195265);
return;
}
default:
{
aWriter->FatalError("unknown variant of union WithStructs");
return;
}
}
}
auto ParamTraits<::mozilla::_foo::WithStructs>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::_foo::WithStructs union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union WithStructs");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'WithStructs'
if ((!((aReader)->ReadSentinel(449119381)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union WithStructs");
return {};
}
switch (type) {
case union__::Tint:
{
auto maybe__tmp = IPC::ReadParam<int>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tint of union WithStructs");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tint'
if ((!((aReader)->ReadSentinel(64946592)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tint of union WithStructs");
return {};
}
return std::move(tmp);
}
case union__::TArrayOfint:
{
auto maybe__tmp = IPC::ReadParam<nsTArray<int>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TArrayOfint of union WithStructs");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TArrayOfint'
if ((!((aReader)->ReadSentinel(418251860)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TArrayOfint of union WithStructs");
return {};
}
return std::move(tmp);
}
case union__::TArrayOfPTestDataStructuresSub:
{
auto maybe__tmp = IPC::ReadParam<nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<::mozilla::_ipdltest::PTestDataStructuresSubParent*, ::mozilla::_ipdltest::PTestDataStructuresSubChild*>>>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TArrayOfPTestDataStructuresSub of union WithStructs");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TArrayOfPTestDataStructuresSub'
if ((!((aReader)->ReadSentinel(3006794721)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TArrayOfPTestDataStructuresSub of union WithStructs");
return {};
}
return std::move(tmp);
}
case union__::TArrayOfSActors:
{
auto maybe__tmp = IPC::ReadParam<nsTArray<::mozilla::_foo::SActors>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TArrayOfSActors of union WithStructs");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TArrayOfSActors'
if ((!((aReader)->ReadSentinel(750061000)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TArrayOfSActors of union WithStructs");
return {};
}
return std::move(tmp);
}
case union__::TArrayOfStructs:
{
auto maybe__tmp = IPC::ReadParam<nsTArray<::mozilla::_foo::Structs>>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TArrayOfStructs of union WithStructs");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TArrayOfStructs'
if ((!((aReader)->ReadSentinel(773195265)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TArrayOfStructs of union WithStructs");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union WithStructs");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct WithUnions|
//
namespace mozilla {
namespace _foo {
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::WithUnions>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).i());
// Sentinel = 'i'
(aWriter)->WriteSentinel(6946922);
IPC::WriteParam(aWriter, (aVar).ai());
// Sentinel = 'ai'
(aWriter)->WriteSentinel(19726539);
IPC::WriteParam(aWriter, (aVar).ap());
// Sentinel = 'ap'
(aWriter)->WriteSentinel(20185298);
IPC::WriteParam(aWriter, (aVar).aa());
// Sentinel = 'aa'
(aWriter)->WriteSentinel(19202243);
IPC::WriteParam(aWriter, (aVar).au());
// Sentinel = 'au'
(aWriter)->WriteSentinel(20512983);
}
auto ParamTraits<::mozilla::_foo::WithUnions>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___i = IPC::ReadParam<int>(aReader);
if (!maybe___i) {
aReader->FatalError("Error deserializing 'i' (int) member of 'WithUnions'");
return {};
}
auto& _i = *maybe___i;
// Sentinel = 'i'
if ((!((aReader)->ReadSentinel(6946922)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'i' (int) member of 'WithUnions'");
return {};
}
auto maybe___ai = IPC::ReadParam<nsTArray<int>>(aReader);
if (!maybe___ai) {
aReader->FatalError("Error deserializing 'ai' (int[]) member of 'WithUnions'");
return {};
}
auto& _ai = *maybe___ai;
// Sentinel = 'ai'
if ((!((aReader)->ReadSentinel(19726539)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ai' (int[]) member of 'WithUnions'");
return {};
}
auto maybe___ap = IPC::ReadParam<nsTArray<mozilla::NotNull<::mozilla::ipc::SideVariant<::mozilla::_ipdltest::PTestDataStructuresSubParent*, ::mozilla::_ipdltest::PTestDataStructuresSubChild*>>>>(aReader);
if (!maybe___ap) {
aReader->FatalError("Error deserializing 'ap' (NotNull<PTestDataStructuresSub>[]) member of 'WithUnions'");
return {};
}
auto& _ap = *maybe___ap;
// Sentinel = 'ap'
if ((!((aReader)->ReadSentinel(20185298)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ap' (NotNull<PTestDataStructuresSub>[]) member of 'WithUnions'");
return {};
}
auto maybe___aa = IPC::ReadParam<nsTArray<::mozilla::_foo::Actors>>(aReader);
if (!maybe___aa) {
aReader->FatalError("Error deserializing 'aa' (Actors[]) member of 'WithUnions'");
return {};
}
auto& _aa = *maybe___aa;
// Sentinel = 'aa'
if ((!((aReader)->ReadSentinel(19202243)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'aa' (Actors[]) member of 'WithUnions'");
return {};
}
auto maybe___au = IPC::ReadParam<nsTArray<::mozilla::_foo::Unions>>(aReader);
if (!maybe___au) {
aReader->FatalError("Error deserializing 'au' (Unions[]) member of 'WithUnions'");
return {};
}
auto& _au = *maybe___au;
// Sentinel = 'au'
if ((!((aReader)->ReadSentinel(20512983)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'au' (Unions[]) member of 'WithUnions'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_i),
std::move(_ai),
std::move(_ap),
std::move(_aa),
std::move(_au)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct CommonAttrs|
//
namespace mozilla {
namespace _foo {
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::CommonAttrs>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).dummy());
// Sentinel = 'dummy'
(aWriter)->WriteSentinel(107414061);
}
auto ParamTraits<::mozilla::_foo::CommonAttrs>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___dummy = IPC::ReadParam<bool>(aReader);
if (!maybe___dummy) {
aReader->FatalError("Error deserializing 'dummy' (bool) member of 'CommonAttrs'");
return {};
}
auto& _dummy = *maybe___dummy;
// Sentinel = 'dummy'
if ((!((aReader)->ReadSentinel(107414061)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'dummy' (bool) member of 'CommonAttrs'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_dummy)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct FooAttrs|
//
namespace mozilla {
namespace _foo {
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::FooAttrs>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).dummy());
// Sentinel = 'dummy'
(aWriter)->WriteSentinel(107414061);
}
auto ParamTraits<::mozilla::_foo::FooAttrs>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___dummy = IPC::ReadParam<int>(aReader);
if (!maybe___dummy) {
aReader->FatalError("Error deserializing 'dummy' (int) member of 'FooAttrs'");
return {};
}
auto& _dummy = *maybe___dummy;
// Sentinel = 'dummy'
if ((!((aReader)->ReadSentinel(107414061)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'dummy' (int) member of 'FooAttrs'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_dummy)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct BarAttrs|
//
namespace mozilla {
namespace _foo {
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::BarAttrs>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
(aWriter)->WriteBytes((&((aVar).dummy())), 4);
// Sentinel = 'dummy'
(aWriter)->WriteSentinel(107414061);
}
auto ParamTraits<::mozilla::_foo::BarAttrs>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
IPC::ReadResult<paramType> result__{
std::in_place,
float{0}};
if ((!((aReader)->ReadBytesInto((&((result__)->dummy())), 4)))) {
aReader->FatalError("Error bulk reading fields from float");
return {};
}
// Sentinel = 'dummy'
if ((!((aReader)->ReadSentinel(107414061)))) {
mozilla::ipc::SentinelReadError("Error bulk reading fields from float");
return {};
}
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union SpecificAttrs|
//
namespace mozilla {
namespace _foo {
auto SpecificAttrs::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case TFooAttrs:
{
(ptr_FooAttrs())->~FooAttrs__tdef();
break;
}
case TBarAttrs:
{
(ptr_BarAttrs())->~BarAttrs__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT SpecificAttrs::SpecificAttrs(const FooAttrs& aOther)
{
new (mozilla::KnownNotNull, ptr_FooAttrs()) FooAttrs(aOther);
mType = TFooAttrs;
}
MOZ_IMPLICIT SpecificAttrs::SpecificAttrs(FooAttrs&& aOther)
{
new (mozilla::KnownNotNull, ptr_FooAttrs()) FooAttrs(std::move(aOther));
mType = TFooAttrs;
}
MOZ_IMPLICIT SpecificAttrs::SpecificAttrs(const BarAttrs& aOther)
{
new (mozilla::KnownNotNull, ptr_BarAttrs()) BarAttrs(aOther);
mType = TBarAttrs;
}
MOZ_IMPLICIT SpecificAttrs::SpecificAttrs(BarAttrs&& aOther)
{
new (mozilla::KnownNotNull, ptr_BarAttrs()) BarAttrs(std::move(aOther));
mType = TBarAttrs;
}
MOZ_IMPLICIT SpecificAttrs::SpecificAttrs(const SpecificAttrs& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case TFooAttrs:
{
new (mozilla::KnownNotNull, ptr_FooAttrs()) FooAttrs((aOther).get_FooAttrs());
break;
}
case TBarAttrs:
{
new (mozilla::KnownNotNull, ptr_BarAttrs()) BarAttrs((aOther).get_BarAttrs());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT SpecificAttrs::SpecificAttrs(SpecificAttrs&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case TFooAttrs:
{
new (mozilla::KnownNotNull, ptr_FooAttrs()) FooAttrs(std::move((aOther).get_FooAttrs()));
(aOther).MaybeDestroy();
break;
}
case TBarAttrs:
{
new (mozilla::KnownNotNull, ptr_BarAttrs()) BarAttrs(std::move((aOther).get_BarAttrs()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
SpecificAttrs::~SpecificAttrs()
{
MaybeDestroy();
}
auto SpecificAttrs::operator=(const FooAttrs& aRhs) -> SpecificAttrs&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_FooAttrs()) FooAttrs(aRhs);
mType = TFooAttrs;
return (*(this));
}
auto SpecificAttrs::operator=(FooAttrs&& aRhs) -> SpecificAttrs&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_FooAttrs()) FooAttrs(std::move(aRhs));
mType = TFooAttrs;
return (*(this));
}
auto SpecificAttrs::operator=(const BarAttrs& aRhs) -> SpecificAttrs&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_BarAttrs()) BarAttrs(aRhs);
mType = TBarAttrs;
return (*(this));
}
auto SpecificAttrs::operator=(BarAttrs&& aRhs) -> SpecificAttrs&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_BarAttrs()) BarAttrs(std::move(aRhs));
mType = TBarAttrs;
return (*(this));
}
auto SpecificAttrs::operator=(const SpecificAttrs& aRhs) -> SpecificAttrs&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TFooAttrs:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_FooAttrs()) FooAttrs((aRhs).get_FooAttrs());
break;
}
case TBarAttrs:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_BarAttrs()) BarAttrs((aRhs).get_BarAttrs());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto SpecificAttrs::operator=(SpecificAttrs&& aRhs) -> SpecificAttrs&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TFooAttrs:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_FooAttrs()) FooAttrs(std::move((aRhs).get_FooAttrs()));
(aRhs).MaybeDestroy();
break;
}
case TBarAttrs:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_BarAttrs()) BarAttrs(std::move((aRhs).get_BarAttrs()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::SpecificAttrs>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::_foo::SpecificAttrs union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'SpecificAttrs'
(aWriter)->WriteSentinel(596837685);
switch (type) {
case union__::TFooAttrs:
{
IPC::WriteParam(aWriter, (aVar).get_FooAttrs());
// Sentinel = 'TFooAttrs'
(aWriter)->WriteSentinel(278397831);
return;
}
case union__::TBarAttrs:
{
IPC::WriteParam(aWriter, (aVar).get_BarAttrs());
// Sentinel = 'TBarAttrs'
(aWriter)->WriteSentinel(271057784);
return;
}
default:
{
aWriter->FatalError("unknown variant of union SpecificAttrs");
return;
}
}
}
auto ParamTraits<::mozilla::_foo::SpecificAttrs>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::_foo::SpecificAttrs union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union SpecificAttrs");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'SpecificAttrs'
if ((!((aReader)->ReadSentinel(596837685)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union SpecificAttrs");
return {};
}
switch (type) {
case union__::TFooAttrs:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::_foo::FooAttrs>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TFooAttrs of union SpecificAttrs");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TFooAttrs'
if ((!((aReader)->ReadSentinel(278397831)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TFooAttrs of union SpecificAttrs");
return {};
}
return std::move(tmp);
}
case union__::TBarAttrs:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::_foo::BarAttrs>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TBarAttrs of union SpecificAttrs");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TBarAttrs'
if ((!((aReader)->ReadSentinel(271057784)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TBarAttrs of union SpecificAttrs");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union SpecificAttrs");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct Attrs|
//
namespace mozilla {
namespace _foo {
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::Attrs>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).common());
// Sentinel = 'common'
(aWriter)->WriteSentinel(147456650);
IPC::WriteParam(aWriter, (aVar).specific());
// Sentinel = 'specific'
(aWriter)->WriteSentinel(252183367);
}
auto ParamTraits<::mozilla::_foo::Attrs>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___common = IPC::ReadParam<::mozilla::_foo::CommonAttrs>(aReader);
if (!maybe___common) {
aReader->FatalError("Error deserializing 'common' (CommonAttrs) member of 'Attrs'");
return {};
}
auto& _common = *maybe___common;
// Sentinel = 'common'
if ((!((aReader)->ReadSentinel(147456650)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'common' (CommonAttrs) member of 'Attrs'");
return {};
}
auto maybe___specific = IPC::ReadParam<::mozilla::_foo::SpecificAttrs>(aReader);
if (!maybe___specific) {
aReader->FatalError("Error deserializing 'specific' (SpecificAttrs) member of 'Attrs'");
return {};
}
auto& _specific = *maybe___specific;
// Sentinel = 'specific'
if ((!((aReader)->ReadSentinel(252183367)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'specific' (SpecificAttrs) member of 'Attrs'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_common),
std::move(_specific)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SetAttrs|
//
namespace mozilla {
namespace _foo {
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::SetAttrs>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).x());
// Sentinel = 'x'
(aWriter)->WriteSentinel(7929977);
IPC::WriteParam(aWriter, (aVar).attrs());
// Sentinel = 'attrs'
(aWriter)->WriteSentinel(107807279);
}
auto ParamTraits<::mozilla::_foo::SetAttrs>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___x = IPC::ReadParam<mozilla::NotNull<::mozilla::ipc::SideVariant<::mozilla::_ipdltest::PTestDataStructuresSubParent*, ::mozilla::_ipdltest::PTestDataStructuresSubChild*>>>(aReader);
if (!maybe___x) {
aReader->FatalError("Error deserializing 'x' (NotNull<PTestDataStructuresSub>) member of 'SetAttrs'");
return {};
}
auto& _x = *maybe___x;
// Sentinel = 'x'
if ((!((aReader)->ReadSentinel(7929977)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'x' (NotNull<PTestDataStructuresSub>) member of 'SetAttrs'");
return {};
}
auto maybe___attrs = IPC::ReadParam<::mozilla::_foo::Attrs>(aReader);
if (!maybe___attrs) {
aReader->FatalError("Error deserializing 'attrs' (Attrs) member of 'SetAttrs'");
return {};
}
auto& _attrs = *maybe___attrs;
// Sentinel = 'attrs'
if ((!((aReader)->ReadSentinel(107807279)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'attrs' (Attrs) member of 'SetAttrs'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_x),
std::move(_attrs)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union Op|
//
namespace mozilla {
namespace _foo {
auto Op::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case Tnull_t:
{
(ptr_null_t())->~null_t__tdef();
break;
}
case TSetAttrs:
{
(ptr_SetAttrs())->~SetAttrs__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT Op::Op(const null_t& aOther)
{
new (mozilla::KnownNotNull, ptr_null_t()) null_t(aOther);
mType = Tnull_t;
}
MOZ_IMPLICIT Op::Op(null_t&& aOther)
{
new (mozilla::KnownNotNull, ptr_null_t()) null_t(std::move(aOther));
mType = Tnull_t;
}
MOZ_IMPLICIT Op::Op(const SetAttrs& aOther)
{
new (mozilla::KnownNotNull, ptr_SetAttrs()) SetAttrs(aOther);
mType = TSetAttrs;
}
MOZ_IMPLICIT Op::Op(SetAttrs&& aOther)
{
new (mozilla::KnownNotNull, ptr_SetAttrs()) SetAttrs(std::move(aOther));
mType = TSetAttrs;
}
MOZ_IMPLICIT Op::Op(const Op& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case Tnull_t:
{
new (mozilla::KnownNotNull, ptr_null_t()) null_t((aOther).get_null_t());
break;
}
case TSetAttrs:
{
new (mozilla::KnownNotNull, ptr_SetAttrs()) SetAttrs((aOther).get_SetAttrs());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT Op::Op(Op&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case Tnull_t:
{
new (mozilla::KnownNotNull, ptr_null_t()) null_t(std::move((aOther).get_null_t()));
(aOther).MaybeDestroy();
break;
}
case TSetAttrs:
{
new (mozilla::KnownNotNull, ptr_SetAttrs()) SetAttrs(std::move((aOther).get_SetAttrs()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
Op::~Op()
{
MaybeDestroy();
}
auto Op::operator=(const null_t& aRhs) -> Op&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_null_t()) null_t(aRhs);
mType = Tnull_t;
return (*(this));
}
auto Op::operator=(null_t&& aRhs) -> Op&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_null_t()) null_t(std::move(aRhs));
mType = Tnull_t;
return (*(this));
}
auto Op::operator=(const SetAttrs& aRhs) -> Op&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_SetAttrs()) SetAttrs(aRhs);
mType = TSetAttrs;
return (*(this));
}
auto Op::operator=(SetAttrs&& aRhs) -> Op&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_SetAttrs()) SetAttrs(std::move(aRhs));
mType = TSetAttrs;
return (*(this));
}
auto Op::operator=(const Op& aRhs) -> Op&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tnull_t:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_null_t()) null_t((aRhs).get_null_t());
break;
}
case TSetAttrs:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_SetAttrs()) SetAttrs((aRhs).get_SetAttrs());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto Op::operator=(Op&& aRhs) -> Op&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tnull_t:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_null_t()) null_t(std::move((aRhs).get_null_t()));
(aRhs).MaybeDestroy();
break;
}
case TSetAttrs:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_SetAttrs()) SetAttrs(std::move((aRhs).get_SetAttrs()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::Op>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::_foo::Op union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'Op'
(aWriter)->WriteSentinel(17825984);
switch (type) {
case union__::Tnull_t:
{
IPC::WriteParam(aWriter, (aVar).get_null_t());
// Sentinel = 'Tnull_t'
(aWriter)->WriteSentinel(190186211);
return;
}
case union__::TSetAttrs:
{
IPC::WriteParam(aWriter, (aVar).get_SetAttrs());
// Sentinel = 'TSetAttrs'
(aWriter)->WriteSentinel(282592143);
return;
}
default:
{
aWriter->FatalError("unknown variant of union Op");
return;
}
}
}
auto ParamTraits<::mozilla::_foo::Op>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::_foo::Op union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union Op");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'Op'
if ((!((aReader)->ReadSentinel(17825984)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union Op");
return {};
}
switch (type) {
case union__::Tnull_t:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::null_t>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tnull_t of union Op");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tnull_t'
if ((!((aReader)->ReadSentinel(190186211)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tnull_t of union Op");
return {};
}
return std::move(tmp);
}
case union__::TSetAttrs:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::_foo::SetAttrs>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TSetAttrs of union Op");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TSetAttrs'
if ((!((aReader)->ReadSentinel(282592143)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TSetAttrs of union Op");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union Op");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct ShmemStruct|
//
namespace mozilla {
namespace _foo {
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::ShmemStruct>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).i());
// Sentinel = 'i'
(aWriter)->WriteSentinel(6946922);
IPC::WriteParam(aWriter, std::move((aVar).mem()));
// Sentinel = 'mem'
(aWriter)->WriteSentinel(42008896);
}
auto ParamTraits<::mozilla::_foo::ShmemStruct>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___i = IPC::ReadParam<int>(aReader);
if (!maybe___i) {
aReader->FatalError("Error deserializing 'i' (int) member of 'ShmemStruct'");
return {};
}
auto& _i = *maybe___i;
// Sentinel = 'i'
if ((!((aReader)->ReadSentinel(6946922)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'i' (int) member of 'ShmemStruct'");
return {};
}
auto maybe___mem = IPC::ReadParam<::mozilla::ipc::Shmem>(aReader);
if (!maybe___mem) {
aReader->FatalError("Error deserializing 'mem' (Shmem) member of 'ShmemStruct'");
return {};
}
auto& _mem = *maybe___mem;
// Sentinel = 'mem'
if ((!((aReader)->ReadSentinel(42008896)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'mem' (Shmem) member of 'ShmemStruct'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_i),
std::move(_mem)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union ShmemUnion|
//
namespace mozilla {
namespace _foo {
auto ShmemUnion::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case Tint:
{
(ptr_int())->~int__tdef();
break;
}
case TShmem:
{
(ptr_Shmem())->~Shmem__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT ShmemUnion::ShmemUnion(const int& aOther)
{
new (mozilla::KnownNotNull, ptr_int()) int(aOther);
mType = Tint;
}
MOZ_IMPLICIT ShmemUnion::ShmemUnion(int&& aOther)
{
new (mozilla::KnownNotNull, ptr_int()) int(std::move(aOther));
mType = Tint;
}
MOZ_IMPLICIT ShmemUnion::ShmemUnion(Shmem& aOther)
{
new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(aOther);
mType = TShmem;
}
MOZ_IMPLICIT ShmemUnion::ShmemUnion(Shmem&& aOther)
{
new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(std::move(aOther));
mType = TShmem;
}
MOZ_IMPLICIT ShmemUnion::ShmemUnion(const ShmemUnion& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case Tint:
{
new (mozilla::KnownNotNull, ptr_int()) int((aOther).get_int());
break;
}
case TShmem:
{
new (mozilla::KnownNotNull, ptr_Shmem()) Shmem((aOther).get_Shmem());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT ShmemUnion::ShmemUnion(ShmemUnion&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case Tint:
{
new (mozilla::KnownNotNull, ptr_int()) int(std::move((aOther).get_int()));
(aOther).MaybeDestroy();
break;
}
case TShmem:
{
new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(std::move((aOther).get_Shmem()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
ShmemUnion::~ShmemUnion()
{
MaybeDestroy();
}
auto ShmemUnion::operator=(const int& aRhs) -> ShmemUnion&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(aRhs);
mType = Tint;
return (*(this));
}
auto ShmemUnion::operator=(int&& aRhs) -> ShmemUnion&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(std::move(aRhs));
mType = Tint;
return (*(this));
}
auto ShmemUnion::operator=(Shmem& aRhs) -> ShmemUnion&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(aRhs);
mType = TShmem;
return (*(this));
}
auto ShmemUnion::operator=(Shmem&& aRhs) -> ShmemUnion&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(std::move(aRhs));
mType = TShmem;
return (*(this));
}
auto ShmemUnion::operator=(const ShmemUnion& aRhs) -> ShmemUnion&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int((aRhs).get_int());
break;
}
case TShmem:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_Shmem()) Shmem((aRhs).get_Shmem());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto ShmemUnion::operator=(ShmemUnion&& aRhs) -> ShmemUnion&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tint:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_int()) int(std::move((aRhs).get_int()));
(aRhs).MaybeDestroy();
break;
}
case TShmem:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(std::move((aRhs).get_Shmem()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::ShmemUnion>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::_foo::ShmemUnion union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'ShmemUnion'
(aWriter)->WriteSentinel(361825284);
switch (type) {
case union__::Tint:
{
IPC::WriteParam(aWriter, (aVar).get_int());
// Sentinel = 'Tint'
(aWriter)->WriteSentinel(64946592);
return;
}
case union__::TShmem:
{
IPC::WriteParam(aWriter, std::move((aVar).get_Shmem()));
// Sentinel = 'TShmem'
(aWriter)->WriteSentinel(129696335);
return;
}
default:
{
aWriter->FatalError("unknown variant of union ShmemUnion");
return;
}
}
}
auto ParamTraits<::mozilla::_foo::ShmemUnion>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::_foo::ShmemUnion union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union ShmemUnion");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'ShmemUnion'
if ((!((aReader)->ReadSentinel(361825284)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union ShmemUnion");
return {};
}
switch (type) {
case union__::Tint:
{
auto maybe__tmp = IPC::ReadParam<int>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tint of union ShmemUnion");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tint'
if ((!((aReader)->ReadSentinel(64946592)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tint of union ShmemUnion");
return {};
}
return std::move(tmp);
}
case union__::TShmem:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::ipc::Shmem>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TShmem of union ShmemUnion");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TShmem'
if ((!((aReader)->ReadSentinel(129696335)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TShmem of union ShmemUnion");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union ShmemUnion");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct Empty|
//
namespace mozilla {
namespace _foo {
} // namespace _foo
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_foo::Empty>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
}
auto ParamTraits<::mozilla::_foo::Empty>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
IPC::ReadResult<paramType> result__{std::in_place};
return result__;
}
} // namespace IPC