
/*

  KLayout Layout Viewer
  Copyright (C) 2006-2025 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 gsiDeclQSemaphoreReleaser.cc 
*
*  DO NOT EDIT THIS FILE. 
*  This file has been created automatically
*/

#include <QSemaphoreReleaser>
#include <QSemaphore>
#include "gsiQt.h"
#include "gsiQtCoreCommon.h"
#include <memory>

// -----------------------------------------------------------------------
// class QSemaphoreReleaser

//  Constructor QSemaphoreReleaser::QSemaphoreReleaser()


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

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


//  Constructor QSemaphoreReleaser::QSemaphoreReleaser(QSemaphore &sem, int n)


static void _init_ctor_QSemaphoreReleaser_2290 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("sem");
  decl->add_arg<QSemaphore & > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("n", true, "1");
  decl->add_arg<int > (argspec_1);
  decl->set_return_new<QSemaphoreReleaser> ();
}

static void _call_ctor_QSemaphoreReleaser_2290 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  QSemaphore &arg1 = gsi::arg_reader<QSemaphore & >() (args, heap);
  int arg2 = args ? gsi::arg_reader<int >() (args, heap) : gsi::arg_maker<int >() (1, heap);
  ret.write<QSemaphoreReleaser *> (new QSemaphoreReleaser (arg1, arg2));
}


//  Constructor QSemaphoreReleaser::QSemaphoreReleaser(QSemaphore *sem, int n)


static void _init_ctor_QSemaphoreReleaser_2294 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("sem");
  decl->add_arg<QSemaphore * > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("n", true, "1");
  decl->add_arg<int > (argspec_1);
  decl->set_return_new<QSemaphoreReleaser> ();
}

static void _call_ctor_QSemaphoreReleaser_2294 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  QSemaphore *arg1 = gsi::arg_reader<QSemaphore * >() (args, heap);
  int arg2 = args ? gsi::arg_reader<int >() (args, heap) : gsi::arg_maker<int >() (1, heap);
  ret.write<QSemaphoreReleaser *> (new QSemaphoreReleaser (arg1, arg2));
}


// QSemaphore *QSemaphoreReleaser::cancel()


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

static void _call_f_cancel_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<QSemaphore * > ((QSemaphore *)((QSemaphoreReleaser *)cls)->cancel ());
}


// QSemaphore *QSemaphoreReleaser::semaphore()


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

static void _call_f_semaphore_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<QSemaphore * > ((QSemaphore *)((QSemaphoreReleaser *)cls)->semaphore ());
}


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


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

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



namespace gsi
{

static gsi::Methods methods_QSemaphoreReleaser () {
  gsi::Methods methods;
  methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QSemaphoreReleaser::QSemaphoreReleaser()\nThis method creates an object of class QSemaphoreReleaser.", &_init_ctor_QSemaphoreReleaser_0, &_call_ctor_QSemaphoreReleaser_0);
  methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QSemaphoreReleaser::QSemaphoreReleaser(QSemaphore &sem, int n)\nThis method creates an object of class QSemaphoreReleaser.", &_init_ctor_QSemaphoreReleaser_2290, &_call_ctor_QSemaphoreReleaser_2290);
  methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QSemaphoreReleaser::QSemaphoreReleaser(QSemaphore *sem, int n)\nThis method creates an object of class QSemaphoreReleaser.", &_init_ctor_QSemaphoreReleaser_2294, &_call_ctor_QSemaphoreReleaser_2294);
  methods += new qt_gsi::GenericMethod ("cancel", "@brief Method QSemaphore *QSemaphoreReleaser::cancel()\n", false, &_init_f_cancel_0, &_call_f_cancel_0);
  methods += new qt_gsi::GenericMethod ("semaphore", "@brief Method QSemaphore *QSemaphoreReleaser::semaphore()\n", true, &_init_f_semaphore_c0, &_call_f_semaphore_c0);
  methods += new qt_gsi::GenericMethod ("swap", "@brief Method void QSemaphoreReleaser::swap(QSemaphoreReleaser &other)\n", false, &_init_f_swap_2450, &_call_f_swap_2450);
  return methods;
}

gsi::Class<QSemaphoreReleaser> decl_QSemaphoreReleaser ("QtCore", "QSemaphoreReleaser",
  methods_QSemaphoreReleaser (),
  "@qt\n@brief Binding of QSemaphoreReleaser");


GSI_QTCORE_PUBLIC gsi::Class<QSemaphoreReleaser> &qtdecl_QSemaphoreReleaser () { return decl_QSemaphoreReleaser; }

}

