
/*

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

#include <QPageRanges>
#include "gsiQt.h"
#include "gsiQtGuiCommon.h"
#include <memory>

// -----------------------------------------------------------------------
// class QPageRanges

//  Constructor QPageRanges::QPageRanges()


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

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


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


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

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


// void QPageRanges::addPage(int pageNumber)


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

static void _call_f_addPage_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);
  ((QPageRanges *)cls)->addPage (arg1);
}


// void QPageRanges::addRange(int from, int to)


static void _init_f_addRange_1426 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("from");
  decl->add_arg<int > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("to");
  decl->add_arg<int > (argspec_1);
  decl->set_return<void > ();
}

static void _call_f_addRange_1426 (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);
  int arg2 = gsi::arg_reader<int >() (args, heap);
  __SUPPRESS_UNUSED_WARNING(ret);
  ((QPageRanges *)cls)->addRange (arg1, arg2);
}


// void QPageRanges::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);
  ((QPageRanges *)cls)->clear ();
}


// bool QPageRanges::contains(int pageNumber)


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

static void _call_f_contains_c767 (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);
  ret.write<bool > ((bool)((QPageRanges *)cls)->contains (arg1));
}


// void QPageRanges::detach()


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

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


// int QPageRanges::firstPage()


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

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


// bool QPageRanges::isEmpty()


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

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


// int QPageRanges::lastPage()


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

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


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


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

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


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


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

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


// QList<QPageRanges::Range> QPageRanges::toRangeList()


static void _init_f_toRangeList_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<QList<QPageRanges::Range> > ();
}

static void _call_f_toRangeList_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<QList<QPageRanges::Range> > ((QList<QPageRanges::Range>)((QPageRanges *)cls)->toRangeList ());
}


// QString QPageRanges::toString()


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

static void _call_f_toString_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<QString > ((QString)((QPageRanges *)cls)->toString ());
}


// static QPageRanges QPageRanges::fromString(const QString &ranges)


static void _init_f_fromString_2025 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("ranges");
  decl->add_arg<const QString & > (argspec_0);
  decl->set_return<QPageRanges > ();
}

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


//  bool ::operator==(const QPageRanges &lhs, const QPageRanges &rhs)
static bool op_QPageRanges_operator_eq__eq__4658(const QPageRanges *_self, const QPageRanges &rhs) {
  return operator==(*_self, rhs);
}

//  bool ::operator!=(const QPageRanges &lhs, const QPageRanges &rhs)
static bool op_QPageRanges_operator_excl__eq__4658(const QPageRanges *_self, const QPageRanges &rhs) {
  return operator!=(*_self, rhs);
}


namespace gsi
{

static gsi::Methods methods_QPageRanges () {
  gsi::Methods methods;
  methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QPageRanges::QPageRanges()\nThis method creates an object of class QPageRanges.", &_init_ctor_QPageRanges_0, &_call_ctor_QPageRanges_0);
  methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QPageRanges::QPageRanges(const QPageRanges &other)\nThis method creates an object of class QPageRanges.", &_init_ctor_QPageRanges_2383, &_call_ctor_QPageRanges_2383);
  methods += new qt_gsi::GenericMethod ("addPage", "@brief Method void QPageRanges::addPage(int pageNumber)\n", false, &_init_f_addPage_767, &_call_f_addPage_767);
  methods += new qt_gsi::GenericMethod ("addRange", "@brief Method void QPageRanges::addRange(int from, int to)\n", false, &_init_f_addRange_1426, &_call_f_addRange_1426);
  methods += new qt_gsi::GenericMethod ("clear", "@brief Method void QPageRanges::clear()\n", false, &_init_f_clear_0, &_call_f_clear_0);
  methods += new qt_gsi::GenericMethod ("contains", "@brief Method bool QPageRanges::contains(int pageNumber)\n", true, &_init_f_contains_c767, &_call_f_contains_c767);
  methods += new qt_gsi::GenericMethod ("detach", "@brief Method void QPageRanges::detach()\n", false, &_init_f_detach_0, &_call_f_detach_0);
  methods += new qt_gsi::GenericMethod ("firstPage", "@brief Method int QPageRanges::firstPage()\n", true, &_init_f_firstPage_c0, &_call_f_firstPage_c0);
  methods += new qt_gsi::GenericMethod ("isEmpty?", "@brief Method bool QPageRanges::isEmpty()\n", true, &_init_f_isEmpty_c0, &_call_f_isEmpty_c0);
  methods += new qt_gsi::GenericMethod ("lastPage", "@brief Method int QPageRanges::lastPage()\n", true, &_init_f_lastPage_c0, &_call_f_lastPage_c0);
  methods += new qt_gsi::GenericMethod ("assign", "@brief Method QPageRanges &QPageRanges::operator=(const QPageRanges &other)\n", false, &_init_f_operator_eq__2383, &_call_f_operator_eq__2383);
  methods += new qt_gsi::GenericMethod ("swap", "@brief Method void QPageRanges::swap(QPageRanges &other)\n", false, &_init_f_swap_1688, &_call_f_swap_1688);
  methods += new qt_gsi::GenericMethod ("toRangeList", "@brief Method QList<QPageRanges::Range> QPageRanges::toRangeList()\n", true, &_init_f_toRangeList_c0, &_call_f_toRangeList_c0);
  methods += new qt_gsi::GenericMethod ("toString", "@brief Method QString QPageRanges::toString()\n", true, &_init_f_toString_c0, &_call_f_toString_c0);
  methods += new qt_gsi::GenericStaticMethod ("fromString", "@brief Static method QPageRanges QPageRanges::fromString(const QString &ranges)\nThis method is static and can be called without an instance.", &_init_f_fromString_2025, &_call_f_fromString_2025);
  methods += gsi::method_ext("==", &::op_QPageRanges_operator_eq__eq__4658, gsi::arg ("rhs"), "@brief Operator bool ::operator==(const QPageRanges &lhs, const QPageRanges &rhs)\nThis is the mapping of the global operator to the instance method.");
  methods += gsi::method_ext("!=", &::op_QPageRanges_operator_excl__eq__4658, gsi::arg ("rhs"), "@brief Operator bool ::operator!=(const QPageRanges &lhs, const QPageRanges &rhs)\nThis is the mapping of the global operator to the instance method.");
  return methods;
}

gsi::Class<QPageRanges> decl_QPageRanges ("QtGui", "QPageRanges",
  methods_QPageRanges (),
  "@qt\n@brief Binding of QPageRanges");


GSI_QTGUI_PUBLIC gsi::Class<QPageRanges> &qtdecl_QPageRanges () { return decl_QPageRanges; }

}

