
/*

  KLayout Layout Viewer
  Copyright (C) 2006-2023 Matthias Koefferlein

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

*/

/**
*  @file gsiDeclQNetworkDatagram.cc 
*
*  DO NOT EDIT THIS FILE. 
*  This file has been created automatically
*/

#include <QNetworkDatagram>
#include <QHostAddress>
#include "gsiQt.h"
#include "gsiQtNetworkCommon.h"
#include <memory>

// -----------------------------------------------------------------------
// class QNetworkDatagram

//  Constructor QNetworkDatagram::QNetworkDatagram()


static void _init_ctor_QNetworkDatagram_0 (qt_gsi::GenericStaticMethod *decl)
{
  decl->set_return_new<QNetworkDatagram> ();
}

static void _call_ctor_QNetworkDatagram_0 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<QNetworkDatagram *> (new QNetworkDatagram ());
}


//  Constructor QNetworkDatagram::QNetworkDatagram(const QByteArray &data, const QHostAddress &destinationAddress, quint16 port)


static void _init_ctor_QNetworkDatagram_5711 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("data");
  decl->add_arg<const QByteArray & > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("destinationAddress", true, "QHostAddress()");
  decl->add_arg<const QHostAddress & > (argspec_1);
  static gsi::ArgSpecBase argspec_2 ("port", true, "0");
  decl->add_arg<quint16 > (argspec_2);
  decl->set_return_new<QNetworkDatagram> ();
}

static void _call_ctor_QNetworkDatagram_5711 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  const QByteArray &arg1 = gsi::arg_reader<const QByteArray & >() (args, heap);
  const QHostAddress &arg2 = args ? gsi::arg_reader<const QHostAddress & >() (args, heap) : gsi::arg_maker<const QHostAddress & >() (QHostAddress(), heap);
  quint16 arg3 = args ? gsi::arg_reader<quint16 >() (args, heap) : gsi::arg_maker<quint16 >() (0, heap);
  ret.write<QNetworkDatagram *> (new QNetworkDatagram (arg1, arg2, arg3));
}


//  Constructor QNetworkDatagram::QNetworkDatagram(const QNetworkDatagram &other)


static void _init_ctor_QNetworkDatagram_2941 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("other");
  decl->add_arg<const QNetworkDatagram & > (argspec_0);
  decl->set_return_new<QNetworkDatagram> ();
}

static void _call_ctor_QNetworkDatagram_2941 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  const QNetworkDatagram &arg1 = gsi::arg_reader<const QNetworkDatagram & >() (args, heap);
  ret.write<QNetworkDatagram *> (new QNetworkDatagram (arg1));
}


// void QNetworkDatagram::clear()


static void _init_f_clear_0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<void > ();
}

static void _call_f_clear_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  __SUPPRESS_UNUSED_WARNING(ret);
  ((QNetworkDatagram *)cls)->clear ();
}


// QByteArray QNetworkDatagram::data()


static void _init_f_data_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<QByteArray > ();
}

static void _call_f_data_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<QByteArray > ((QByteArray)((QNetworkDatagram *)cls)->data ());
}


// QHostAddress QNetworkDatagram::destinationAddress()


static void _init_f_destinationAddress_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<QHostAddress > ();
}

static void _call_f_destinationAddress_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<QHostAddress > ((QHostAddress)((QNetworkDatagram *)cls)->destinationAddress ());
}


// int QNetworkDatagram::destinationPort()


static void _init_f_destinationPort_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<int > ();
}

static void _call_f_destinationPort_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<int > ((int)((QNetworkDatagram *)cls)->destinationPort ());
}


// int QNetworkDatagram::hopLimit()


static void _init_f_hopLimit_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<int > ();
}

static void _call_f_hopLimit_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<int > ((int)((QNetworkDatagram *)cls)->hopLimit ());
}


// unsigned int QNetworkDatagram::interfaceIndex()


static void _init_f_interfaceIndex_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<unsigned int > ();
}

static void _call_f_interfaceIndex_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<unsigned int > ((unsigned int)((QNetworkDatagram *)cls)->interfaceIndex ());
}


// bool QNetworkDatagram::isNull()


static void _init_f_isNull_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<bool > ();
}

static void _call_f_isNull_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<bool > ((bool)((QNetworkDatagram *)cls)->isNull ());
}


// bool QNetworkDatagram::isValid()


static void _init_f_isValid_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<bool > ();
}

static void _call_f_isValid_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<bool > ((bool)((QNetworkDatagram *)cls)->isValid ());
}


// QNetworkDatagram QNetworkDatagram::makeReply(const QByteArray &payload)


static void _init_f_makeReply_cr2309 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("payload");
  decl->add_arg<const QByteArray & > (argspec_0);
  decl->set_return<QNetworkDatagram > ();
}

static void _call_f_makeReply_cr2309 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  const QByteArray &arg1 = gsi::arg_reader<const QByteArray & >() (args, heap);
  ret.write<QNetworkDatagram > ((QNetworkDatagram)((QNetworkDatagram *)cls)->makeReply (arg1));
}


// QNetworkDatagram &QNetworkDatagram::operator=(const QNetworkDatagram &other)


static void _init_f_operator_eq__2941 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("other");
  decl->add_arg<const QNetworkDatagram & > (argspec_0);
  decl->set_return<QNetworkDatagram & > ();
}

static void _call_f_operator_eq__2941 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  const QNetworkDatagram &arg1 = gsi::arg_reader<const QNetworkDatagram & >() (args, heap);
  ret.write<QNetworkDatagram & > ((QNetworkDatagram &)((QNetworkDatagram *)cls)->operator= (arg1));
}


// QHostAddress QNetworkDatagram::senderAddress()


static void _init_f_senderAddress_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<QHostAddress > ();
}

static void _call_f_senderAddress_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<QHostAddress > ((QHostAddress)((QNetworkDatagram *)cls)->senderAddress ());
}


// int QNetworkDatagram::senderPort()


static void _init_f_senderPort_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<int > ();
}

static void _call_f_senderPort_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<int > ((int)((QNetworkDatagram *)cls)->senderPort ());
}


// void QNetworkDatagram::setData(const QByteArray &data)


static void _init_f_setData_2309 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("data");
  decl->add_arg<const QByteArray & > (argspec_0);
  decl->set_return<void > ();
}

static void _call_f_setData_2309 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  const QByteArray &arg1 = gsi::arg_reader<const QByteArray & >() (args, heap);
  __SUPPRESS_UNUSED_WARNING(ret);
  ((QNetworkDatagram *)cls)->setData (arg1);
}


// void QNetworkDatagram::setDestination(const QHostAddress &address, quint16 port)


static void _init_f_setDestination_3510 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("address");
  decl->add_arg<const QHostAddress & > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("port");
  decl->add_arg<quint16 > (argspec_1);
  decl->set_return<void > ();
}

static void _call_f_setDestination_3510 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  const QHostAddress &arg1 = gsi::arg_reader<const QHostAddress & >() (args, heap);
  quint16 arg2 = gsi::arg_reader<quint16 >() (args, heap);
  __SUPPRESS_UNUSED_WARNING(ret);
  ((QNetworkDatagram *)cls)->setDestination (arg1, arg2);
}


// void QNetworkDatagram::setHopLimit(int count)


static void _init_f_setHopLimit_767 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("count");
  decl->add_arg<int > (argspec_0);
  decl->set_return<void > ();
}

static void _call_f_setHopLimit_767 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  int arg1 = gsi::arg_reader<int >() (args, heap);
  __SUPPRESS_UNUSED_WARNING(ret);
  ((QNetworkDatagram *)cls)->setHopLimit (arg1);
}


// void QNetworkDatagram::setInterfaceIndex(unsigned int index)


static void _init_f_setInterfaceIndex_1772 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("index");
  decl->add_arg<unsigned int > (argspec_0);
  decl->set_return<void > ();
}

static void _call_f_setInterfaceIndex_1772 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  unsigned int arg1 = gsi::arg_reader<unsigned int >() (args, heap);
  __SUPPRESS_UNUSED_WARNING(ret);
  ((QNetworkDatagram *)cls)->setInterfaceIndex (arg1);
}


// void QNetworkDatagram::setSender(const QHostAddress &address, quint16 port)


static void _init_f_setSender_3510 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("address");
  decl->add_arg<const QHostAddress & > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("port", true, "0");
  decl->add_arg<quint16 > (argspec_1);
  decl->set_return<void > ();
}

static void _call_f_setSender_3510 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  const QHostAddress &arg1 = gsi::arg_reader<const QHostAddress & >() (args, heap);
  quint16 arg2 = args ? gsi::arg_reader<quint16 >() (args, heap) : gsi::arg_maker<quint16 >() (0, heap);
  __SUPPRESS_UNUSED_WARNING(ret);
  ((QNetworkDatagram *)cls)->setSender (arg1, arg2);
}


// void QNetworkDatagram::swap(QNetworkDatagram &other)


static void _init_f_swap_2246 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("other");
  decl->add_arg<QNetworkDatagram & > (argspec_0);
  decl->set_return<void > ();
}

static void _call_f_swap_2246 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  QNetworkDatagram &arg1 = gsi::arg_reader<QNetworkDatagram & >() (args, heap);
  __SUPPRESS_UNUSED_WARNING(ret);
  ((QNetworkDatagram *)cls)->swap (arg1);
}



namespace gsi
{

static gsi::Methods methods_QNetworkDatagram () {
  gsi::Methods methods;
  methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QNetworkDatagram::QNetworkDatagram()\nThis method creates an object of class QNetworkDatagram.", &_init_ctor_QNetworkDatagram_0, &_call_ctor_QNetworkDatagram_0);
  methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QNetworkDatagram::QNetworkDatagram(const QByteArray &data, const QHostAddress &destinationAddress, quint16 port)\nThis method creates an object of class QNetworkDatagram.", &_init_ctor_QNetworkDatagram_5711, &_call_ctor_QNetworkDatagram_5711);
  methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QNetworkDatagram::QNetworkDatagram(const QNetworkDatagram &other)\nThis method creates an object of class QNetworkDatagram.", &_init_ctor_QNetworkDatagram_2941, &_call_ctor_QNetworkDatagram_2941);
  methods += new qt_gsi::GenericMethod ("clear", "@brief Method void QNetworkDatagram::clear()\n", false, &_init_f_clear_0, &_call_f_clear_0);
  methods += new qt_gsi::GenericMethod ("data", "@brief Method QByteArray QNetworkDatagram::data()\n", true, &_init_f_data_c0, &_call_f_data_c0);
  methods += new qt_gsi::GenericMethod ("destinationAddress", "@brief Method QHostAddress QNetworkDatagram::destinationAddress()\n", true, &_init_f_destinationAddress_c0, &_call_f_destinationAddress_c0);
  methods += new qt_gsi::GenericMethod ("destinationPort", "@brief Method int QNetworkDatagram::destinationPort()\n", true, &_init_f_destinationPort_c0, &_call_f_destinationPort_c0);
  methods += new qt_gsi::GenericMethod ("hopLimit", "@brief Method int QNetworkDatagram::hopLimit()\n", true, &_init_f_hopLimit_c0, &_call_f_hopLimit_c0);
  methods += new qt_gsi::GenericMethod ("interfaceIndex", "@brief Method unsigned int QNetworkDatagram::interfaceIndex()\n", true, &_init_f_interfaceIndex_c0, &_call_f_interfaceIndex_c0);
  methods += new qt_gsi::GenericMethod ("isNull?", "@brief Method bool QNetworkDatagram::isNull()\n", true, &_init_f_isNull_c0, &_call_f_isNull_c0);
  methods += new qt_gsi::GenericMethod ("isValid?", "@brief Method bool QNetworkDatagram::isValid()\n", true, &_init_f_isValid_c0, &_call_f_isValid_c0);
  methods += new qt_gsi::GenericMethod ("makeReply", "@brief Method QNetworkDatagram QNetworkDatagram::makeReply(const QByteArray &payload)\n", true, &_init_f_makeReply_cr2309, &_call_f_makeReply_cr2309);
  methods += new qt_gsi::GenericMethod ("assign", "@brief Method QNetworkDatagram &QNetworkDatagram::operator=(const QNetworkDatagram &other)\n", false, &_init_f_operator_eq__2941, &_call_f_operator_eq__2941);
  methods += new qt_gsi::GenericMethod ("senderAddress", "@brief Method QHostAddress QNetworkDatagram::senderAddress()\n", true, &_init_f_senderAddress_c0, &_call_f_senderAddress_c0);
  methods += new qt_gsi::GenericMethod ("senderPort", "@brief Method int QNetworkDatagram::senderPort()\n", true, &_init_f_senderPort_c0, &_call_f_senderPort_c0);
  methods += new qt_gsi::GenericMethod ("setData", "@brief Method void QNetworkDatagram::setData(const QByteArray &data)\n", false, &_init_f_setData_2309, &_call_f_setData_2309);
  methods += new qt_gsi::GenericMethod ("setDestination", "@brief Method void QNetworkDatagram::setDestination(const QHostAddress &address, quint16 port)\n", false, &_init_f_setDestination_3510, &_call_f_setDestination_3510);
  methods += new qt_gsi::GenericMethod ("setHopLimit", "@brief Method void QNetworkDatagram::setHopLimit(int count)\n", false, &_init_f_setHopLimit_767, &_call_f_setHopLimit_767);
  methods += new qt_gsi::GenericMethod ("setInterfaceIndex", "@brief Method void QNetworkDatagram::setInterfaceIndex(unsigned int index)\n", false, &_init_f_setInterfaceIndex_1772, &_call_f_setInterfaceIndex_1772);
  methods += new qt_gsi::GenericMethod ("setSender", "@brief Method void QNetworkDatagram::setSender(const QHostAddress &address, quint16 port)\n", false, &_init_f_setSender_3510, &_call_f_setSender_3510);
  methods += new qt_gsi::GenericMethod ("swap", "@brief Method void QNetworkDatagram::swap(QNetworkDatagram &other)\n", false, &_init_f_swap_2246, &_call_f_swap_2246);
  return methods;
}

gsi::Class<QNetworkDatagram> decl_QNetworkDatagram ("QtNetwork", "QNetworkDatagram",
  methods_QNetworkDatagram (),
  "@qt\n@brief Binding of QNetworkDatagram");


GSI_QTNETWORK_PUBLIC gsi::Class<QNetworkDatagram> &qtdecl_QNetworkDatagram () { return decl_QNetworkDatagram; }

}

