
/*

  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 gsiDeclQDomImplementation.cc 
*
*  DO NOT EDIT THIS FILE. 
*  This file has been created automatically
*/

#include "gsiQtXml.h"
#include "gsiDeclQtTypeTraits.h"
#include "gsiDeclQDomImplementation_Enums.h"
#include <memory>

// -----------------------------------------------------------------------
// class QDomImplementation

//  Constructor QDomImplementation::QDomImplementation()


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

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

static qt_gsi::GenericStaticMethod *_create_ctor_QDomImplementation_0 ()
{
  return new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QDomImplementation::QDomImplementation()\nThis method creates an object of class QDomImplementation.", &_init_ctor_QDomImplementation_0, &_call_ctor_QDomImplementation_0);
}

//  Constructor QDomImplementation::QDomImplementation(const QDomImplementation &)


static void _init_ctor_QDomImplementation_3160 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("arg1");
  decl->add_arg<const QDomImplementation & > (argspec_0);
  decl->set_return_new<QDomImplementation *> ();
}

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

static qt_gsi::GenericStaticMethod *_create_ctor_QDomImplementation_3160 ()
{
  return new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QDomImplementation::QDomImplementation(const QDomImplementation &)\nThis method creates an object of class QDomImplementation.", &_init_ctor_QDomImplementation_3160, &_call_ctor_QDomImplementation_3160);
}

// QDomDocument QDomImplementation::createDocument(const QString &nsURI, const QString &qName, const QDomDocumentType &doctype)


static void _init_f_createDocument_6765 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("nsURI");
  decl->add_arg<const QString & > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("qName");
  decl->add_arg<const QString & > (argspec_1);
  static gsi::ArgSpecBase argspec_2 ("doctype");
  decl->add_arg<const QDomDocumentType & > (argspec_2);
  decl->set_return<QDomDocument > ();
}

static void _call_f_createDocument_6765 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QString &arg1 = args.read<const QString & > ();
  const QString &arg2 = args.read<const QString & > ();
  const QDomDocumentType &arg3 = args.read<const QDomDocumentType & > ();
  ret.write<QDomDocument > ((QDomDocument)((QDomImplementation *)cls)->createDocument (arg1, arg2, arg3));
}

static qt_gsi::GenericMethod *_create_f_createDocument_6765 ()
{
  return new qt_gsi::GenericMethod ("createDocument", "@brief Method QDomDocument QDomImplementation::createDocument(const QString &nsURI, const QString &qName, const QDomDocumentType &doctype)\n", false, &_init_f_createDocument_6765, &_call_f_createDocument_6765);
}

// QDomDocumentType QDomImplementation::createDocumentType(const QString &qName, const QString &publicId, const QString &systemId)


static void _init_f_createDocumentType_5859 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("qName");
  decl->add_arg<const QString & > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("publicId");
  decl->add_arg<const QString & > (argspec_1);
  static gsi::ArgSpecBase argspec_2 ("systemId");
  decl->add_arg<const QString & > (argspec_2);
  decl->set_return<QDomDocumentType > ();
}

static void _call_f_createDocumentType_5859 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QString &arg1 = args.read<const QString & > ();
  const QString &arg2 = args.read<const QString & > ();
  const QString &arg3 = args.read<const QString & > ();
  ret.write<QDomDocumentType > ((QDomDocumentType)((QDomImplementation *)cls)->createDocumentType (arg1, arg2, arg3));
}

static qt_gsi::GenericMethod *_create_f_createDocumentType_5859 ()
{
  return new qt_gsi::GenericMethod ("createDocumentType", "@brief Method QDomDocumentType QDomImplementation::createDocumentType(const QString &qName, const QString &publicId, const QString &systemId)\n", false, &_init_f_createDocumentType_5859, &_call_f_createDocumentType_5859);
}

// bool QDomImplementation::hasFeature(const QString &feature, const QString &version)


static void _init_f_hasFeature_c3942 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("feature");
  decl->add_arg<const QString & > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("version");
  decl->add_arg<const QString & > (argspec_1);
  decl->set_return<bool > ();
}

static void _call_f_hasFeature_c3942 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QString &arg1 = args.read<const QString & > ();
  const QString &arg2 = args.read<const QString & > ();
  ret.write<bool > ((bool)((QDomImplementation *)cls)->hasFeature (arg1, arg2));
}

static qt_gsi::GenericMethod *_create_f_hasFeature_c3942 ()
{
  return new qt_gsi::GenericMethod ("hasFeature", "@brief Method bool QDomImplementation::hasFeature(const QString &feature, const QString &version)\n", true, &_init_f_hasFeature_c3942, &_call_f_hasFeature_c3942);
}

// bool QDomImplementation::isNull()


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

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

static qt_gsi::GenericMethod *_create_f_isNull_0 ()
{
  return new qt_gsi::GenericMethod ("isNull?", "@brief Method bool QDomImplementation::isNull()\n", false, &_init_f_isNull_0, &_call_f_isNull_0);
}

// bool QDomImplementation::operator!=(const QDomImplementation &)


static void _init_f_operator_excl__eq__c3160 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("arg1");
  decl->add_arg<const QDomImplementation & > (argspec_0);
  decl->set_return<bool > ();
}

static void _call_f_operator_excl__eq__c3160 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QDomImplementation &arg1 = args.read<const QDomImplementation & > ();
  ret.write<bool > ((bool)((QDomImplementation *)cls)->operator!= (arg1));
}

static qt_gsi::GenericMethod *_create_f_operator_excl__eq__c3160 ()
{
  return new qt_gsi::GenericMethod ("!=", "@brief Method bool QDomImplementation::operator!=(const QDomImplementation &)\n", true, &_init_f_operator_excl__eq__c3160, &_call_f_operator_excl__eq__c3160);
}

// QDomImplementation &QDomImplementation::operator=(const QDomImplementation &)


static void _init_f_operator_eq__3160 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("arg1");
  decl->add_arg<const QDomImplementation & > (argspec_0);
  decl->set_return<QDomImplementation & > ();
}

static void _call_f_operator_eq__3160 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QDomImplementation &arg1 = args.read<const QDomImplementation & > ();
  ret.write<QDomImplementation & > ((QDomImplementation &)((QDomImplementation *)cls)->operator= (arg1));
}

static qt_gsi::GenericMethod *_create_f_operator_eq__3160 ()
{
  return new qt_gsi::GenericMethod ("assign", "@brief Method QDomImplementation &QDomImplementation::operator=(const QDomImplementation &)\n", false, &_init_f_operator_eq__3160, &_call_f_operator_eq__3160);
}

// bool QDomImplementation::operator==(const QDomImplementation &)


static void _init_f_operator_eq__eq__c3160 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("arg1");
  decl->add_arg<const QDomImplementation & > (argspec_0);
  decl->set_return<bool > ();
}

static void _call_f_operator_eq__eq__c3160 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QDomImplementation &arg1 = args.read<const QDomImplementation & > ();
  ret.write<bool > ((bool)((QDomImplementation *)cls)->operator== (arg1));
}

static qt_gsi::GenericMethod *_create_f_operator_eq__eq__c3160 ()
{
  return new qt_gsi::GenericMethod ("==", "@brief Method bool QDomImplementation::operator==(const QDomImplementation &)\n", true, &_init_f_operator_eq__eq__c3160, &_call_f_operator_eq__eq__c3160);
}

// static QDomImplementation::InvalidDataPolicy QDomImplementation::invalidDataPolicy()


static void _init_f_invalidDataPolicy_0 (qt_gsi::GenericStaticMethod *decl)
{
  decl->set_return<qt_gsi::Converter<QDomImplementation::InvalidDataPolicy>::target_type > ();
}

static void _call_f_invalidDataPolicy_0 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<qt_gsi::Converter<QDomImplementation::InvalidDataPolicy>::target_type > ((qt_gsi::Converter<QDomImplementation::InvalidDataPolicy>::target_type)qt_gsi::CppToQtAdaptor<QDomImplementation::InvalidDataPolicy>(QDomImplementation::invalidDataPolicy ()));
}

static qt_gsi::GenericStaticMethod *_create_f_invalidDataPolicy_0 ()
{
  return new qt_gsi::GenericStaticMethod (":invalidDataPolicy", "@brief Static method QDomImplementation::InvalidDataPolicy QDomImplementation::invalidDataPolicy()\nThis method is static and can be called without an instance.", &_init_f_invalidDataPolicy_0, &_call_f_invalidDataPolicy_0);
}

// static void QDomImplementation::setInvalidDataPolicy(QDomImplementation::InvalidDataPolicy policy)


static void _init_f_setInvalidDataPolicy_4112 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("policy");
  decl->add_arg<const qt_gsi::Converter<QDomImplementation::InvalidDataPolicy>::target_type & > (argspec_0);
  decl->set_return<void > ();
}

static void _call_f_setInvalidDataPolicy_4112 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const qt_gsi::Converter<QDomImplementation::InvalidDataPolicy>::target_type & arg1 = args.read<const qt_gsi::Converter<QDomImplementation::InvalidDataPolicy>::target_type & > ();
  QDomImplementation::setInvalidDataPolicy (qt_gsi::QtToCppAdaptor<QDomImplementation::InvalidDataPolicy>(arg1).cref());
}

static qt_gsi::GenericStaticMethod *_create_f_setInvalidDataPolicy_4112 ()
{
  return new qt_gsi::GenericStaticMethod ("setInvalidDataPolicy|invalidDataPolicy=", "@brief Static method void QDomImplementation::setInvalidDataPolicy(QDomImplementation::InvalidDataPolicy policy)\nThis method is static and can be called without an instance.", &_init_f_setInvalidDataPolicy_4112, &_call_f_setInvalidDataPolicy_4112);
}


namespace gsi
{
gsi::Class<QDomImplementation> decl_QDomImplementation ("QDomImplementation",
  gsi::Methods(_create_ctor_QDomImplementation_0 ()) +
  gsi::Methods(_create_ctor_QDomImplementation_3160 ()) +
  gsi::Methods(_create_f_createDocument_6765 ()) +
  gsi::Methods(_create_f_createDocumentType_5859 ()) +
  gsi::Methods(_create_f_hasFeature_c3942 ()) +
  gsi::Methods(_create_f_isNull_0 ()) +
  gsi::Methods(_create_f_operator_excl__eq__c3160 ()) +
  gsi::Methods(_create_f_operator_eq__3160 ()) +
  gsi::Methods(_create_f_operator_eq__eq__c3160 ()) +
  gsi::Methods(_create_f_invalidDataPolicy_0 ()) +
  gsi::Methods(_create_f_setInvalidDataPolicy_4112 ()),
  "@qt\n@brief Binding of QDomImplementation");

}


//  Implementation of the enum wrapper class for QDomImplementation::InvalidDataPolicy
namespace qt_gsi
{

static QDomImplementation_InvalidDataPolicy_Enum *c_1_QDomImplementation_InvalidDataPolicy_Enum () { return new QDomImplementation_InvalidDataPolicy_Enum (QDomImplementation::AcceptInvalidChars); }
static QDomImplementation_InvalidDataPolicy_Enum *c_2_QDomImplementation_InvalidDataPolicy_Enum () { return new QDomImplementation_InvalidDataPolicy_Enum (QDomImplementation::DropInvalidChars); }
static QDomImplementation_InvalidDataPolicy_Enum *c_3_QDomImplementation_InvalidDataPolicy_Enum () { return new QDomImplementation_InvalidDataPolicy_Enum (QDomImplementation::ReturnNullNode); }

static gsi::Methods mkdefs_QDomImplementation_InvalidDataPolicy () {
  return
    gsi::constant ("AcceptInvalidChars", &qt_gsi::c_1_QDomImplementation_InvalidDataPolicy_Enum, "@brief Enum constant QDomImplementation::AcceptInvalidChars") +
    gsi::constant ("DropInvalidChars", &qt_gsi::c_2_QDomImplementation_InvalidDataPolicy_Enum, "@brief Enum constant QDomImplementation::DropInvalidChars") +
    gsi::constant ("ReturnNullNode", &qt_gsi::c_3_QDomImplementation_InvalidDataPolicy_Enum, "@brief Enum constant QDomImplementation::ReturnNullNode");
}

static std::string to_s_QDomImplementation_InvalidDataPolicy_Enum (const QDomImplementation_InvalidDataPolicy_Enum *e)
{
  if (e->value () == QDomImplementation::AcceptInvalidChars) { return tl::sprintf ("AcceptInvalidChars (%u)", (unsigned int) e->value ()); }
  if (e->value () == QDomImplementation::DropInvalidChars) { return tl::sprintf ("DropInvalidChars (%u)", (unsigned int) e->value ()); }
  if (e->value () == QDomImplementation::ReturnNullNode) { return tl::sprintf ("ReturnNullNode (%u)", (unsigned int) e->value ()); }
  return std::string ("(not a valid enum evalue)");
}

static unsigned int to_i_QDomImplementation_InvalidDataPolicy_Enum (const QDomImplementation_InvalidDataPolicy_Enum *e)
{
  return (unsigned int) e->value ();
}

static QDomImplementation_InvalidDataPolicy_Enum *from_i_QDomImplementation_InvalidDataPolicy_Enum (unsigned int i)
{
  return new QDomImplementation_InvalidDataPolicy_Enum ((QDomImplementation::InvalidDataPolicy) i);
}

static bool equalQDomImplementation_InvalidDataPolicy_Enum (const QDomImplementation_InvalidDataPolicy_Enum *e, QDomImplementation_InvalidDataPolicy_Enum d)
{
  return e->value () == d.value ();
}

static bool equal2QDomImplementation_InvalidDataPolicy_Enum (const QDomImplementation_InvalidDataPolicy_Enum *e, unsigned int i)
{
  return (unsigned int) e->value () == i;
}

static QDomImplementation_InvalidDataPolicy_Enums oropQDomImplementation_InvalidDataPolicy_Enums (const QDomImplementation_InvalidDataPolicy_Enums *e, const QDomImplementation_InvalidDataPolicy_Enums &d)
{
  return e->flags () | d.flags ();
}

static QDomImplementation_InvalidDataPolicy_Enums andopQDomImplementation_InvalidDataPolicy_Enums (const QDomImplementation_InvalidDataPolicy_Enums *e, const QDomImplementation_InvalidDataPolicy_Enums &d)
{
  return e->flags () & d.flags ();
}

static QDomImplementation_InvalidDataPolicy_Enums xoropQDomImplementation_InvalidDataPolicy_Enums (const QDomImplementation_InvalidDataPolicy_Enums *e, const QDomImplementation_InvalidDataPolicy_Enums &d)
{
  return e->flags () ^ d.flags ();
}

static std::string to_s_QDomImplementation_InvalidDataPolicy_Enums (const QDomImplementation_InvalidDataPolicy_Enums *e)
{
  std::string l;
  if (e->testFlag (QDomImplementation::AcceptInvalidChars)) { if (!l.empty ()) l += "|"; l += "AcceptInvalidChars"; }
  if (e->testFlag (QDomImplementation::DropInvalidChars)) { if (!l.empty ()) l += "|"; l += "DropInvalidChars"; }
  if (e->testFlag (QDomImplementation::ReturnNullNode)) { if (!l.empty ()) l += "|"; l += "ReturnNullNode"; }
  return tl::sprintf ("%u (%s)", (unsigned int) (e->flags ()), l);
}

static int to_i_QDomImplementation_InvalidDataPolicy_Enums (const QDomImplementation_InvalidDataPolicy_Enums *e)
{
  return int (e->flags ());
}

static bool testFlag_QDomImplementation_InvalidDataPolicy_Enums (const QDomImplementation_InvalidDataPolicy_Enums *e, const QDomImplementation_InvalidDataPolicy_Enum &d)
{
  return e->flags ().testFlag (d.value ());
}

}

namespace gsi
{

//  Declarations for QFlags<enum> wrapper class
gsi::Class<qt_gsi::QDomImplementation_InvalidDataPolicy_Enums> decl_QDomImplementation_InvalidDataPolicy_Enums ("QDomImplementation_QFlags_InvalidDataPolicy",
  gsi::method_ext ("|", &qt_gsi::oropQDomImplementation_InvalidDataPolicy_Enums, gsi::arg ("other"), "@brief 'or' operator between two flag sets") +
  gsi::method_ext ("&", &qt_gsi::andopQDomImplementation_InvalidDataPolicy_Enums, gsi::arg ("other"), "@brief 'and' operator between two flag sets") +
  gsi::method_ext ("^", &qt_gsi::xoropQDomImplementation_InvalidDataPolicy_Enums, gsi::arg ("other"), "@brief 'xor' operator between two flag sets") +
  gsi::method_ext ("to_s|inspect", &qt_gsi::to_s_QDomImplementation_InvalidDataPolicy_Enums, "@brief Converts the flag set to a string") +
  gsi::method_ext ("to_i", &qt_gsi::to_i_QDomImplementation_InvalidDataPolicy_Enums, "@brief Returns the integer value encoding the flag set") +
  gsi::method_ext ("testFlag", &qt_gsi::testFlag_QDomImplementation_InvalidDataPolicy_Enums, gsi::arg ("flag"), "@brief Tests whether the flag is contained in the flag set"),
  "@qt\n@brief This class represents the QFlags<QDomImplementation::InvalidDataPolicy> flag set");

//  Declarations for enum wrapper class
gsi::Class<qt_gsi::QDomImplementation_InvalidDataPolicy_Enum> decl_QDomImplementation_InvalidDataPolicy_Enum (decl_QDomImplementation_InvalidDataPolicy_Enums, "QDomImplementation_InvalidDataPolicy",
  qt_gsi::mkdefs_QDomImplementation_InvalidDataPolicy () +
  gsi::method_ext ("to_s|inspect", &qt_gsi::to_s_QDomImplementation_InvalidDataPolicy_Enum, "@brief Converts the enum class to a string") +
  gsi::method_ext ("to_i", &qt_gsi::to_i_QDomImplementation_InvalidDataPolicy_Enum, "@brief Converts the enum class to an integer") +
  gsi::method_ext ("==", &qt_gsi::equalQDomImplementation_InvalidDataPolicy_Enum, gsi::arg ("other"), "@brief Compares the enum class against an enum of it's own type") +
  gsi::method_ext ("==", &qt_gsi::equal2QDomImplementation_InvalidDataPolicy_Enum, gsi::arg ("other"), "@brief Compares the enum class against an integer") +
  gsi::constructor ("new", &qt_gsi::from_i_QDomImplementation_InvalidDataPolicy_Enum, gsi::arg ("value"), "@brief Creates the enum object from an integer"),
  "@qt\n@brief This class represents the QDomImplementation::InvalidDataPolicy enum");

//  Inject the declarations into the parent
static gsi::ClassExt<QDomImplementation> inject_QDomImplementation_InvalidDataPolicy_Enum_in_parent (qt_gsi::mkdefs_QDomImplementation_InvalidDataPolicy ());
static gsi::ClassExt<QDomImplementation> decl_QDomImplementation_InvalidDataPolicy_Enum_as_child (decl_QDomImplementation_InvalidDataPolicy_Enum, "InvalidDataPolicy");

}

