
/*

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

#include "gsiQtCore.h"
#include "gsiDeclQtTypeTraits.h"
#include "gsiDeclQTextEncoder_Enums.h"
#include <memory>

// -----------------------------------------------------------------------
// class QTextEncoder

//  Constructor QTextEncoder::QTextEncoder(const QTextCodec *codec)


static void _init_ctor_QTextEncoder_2297 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("codec");
  decl->add_arg<const QTextCodec * > (argspec_0);
  decl->set_return_new<QTextEncoder *> ();
}

static void _call_ctor_QTextEncoder_2297 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QTextCodec *arg1 = args.read<const QTextCodec * > ();
  ret.write<QTextEncoder *> (new QTextEncoder (arg1));
}

static qt_gsi::GenericStaticMethod *_create_ctor_QTextEncoder_2297 ()
{
  return new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QTextEncoder::QTextEncoder(const QTextCodec *codec)\nThis method creates an object of class QTextEncoder.", &_init_ctor_QTextEncoder_2297, &_call_ctor_QTextEncoder_2297);
}

// QByteArray QTextEncoder::fromUnicode(const QString &str)


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

static void _call_f_fromUnicode_2025 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QString &arg1 = args.read<const QString & > ();
  ret.write<QByteArray > ((QByteArray)((QTextEncoder *)cls)->fromUnicode (arg1));
}

static qt_gsi::GenericMethod *_create_f_fromUnicode_2025 ()
{
  return new qt_gsi::GenericMethod ("fromUnicode", "@brief Method QByteArray QTextEncoder::fromUnicode(const QString &str)\n", false, &_init_f_fromUnicode_2025, &_call_f_fromUnicode_2025);
}

// bool QTextEncoder::hasFailure()


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

static void _call_f_hasFailure_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<bool > ((bool)((QTextEncoder *)cls)->hasFailure ());
}

static qt_gsi::GenericMethod *_create_f_hasFailure_c0 ()
{
  return new qt_gsi::GenericMethod ("hasFailure", "@brief Method bool QTextEncoder::hasFailure()\n", true, &_init_f_hasFailure_c0, &_call_f_hasFailure_c0);
}


namespace gsi
{
gsi::Class<QTextEncoder> decl_QTextEncoder ("QTextEncoder",
  gsi::Methods(_create_ctor_QTextEncoder_2297 ()) +
  gsi::Methods(_create_f_fromUnicode_2025 ()) +
  gsi::Methods(_create_f_hasFailure_c0 ()),
  "@qt\n@brief Binding of QTextEncoder");

}

