
/*

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

#ifndef _HDR_gsiDeclQSqlError_Enums
#define _HDR_gsiDeclQSqlError_Enums

#include <QtCore/QFlags>

namespace qt_gsi
{

//  Wrapper class for QFlags<enum QSqlError::ErrorType>
class QSqlError_ErrorType_Enums : public QFlags<enum QSqlError::ErrorType> {
public:
  QSqlError_ErrorType_Enums () : m_flags () { }
  QSqlError_ErrorType_Enums (enum QSqlError::ErrorType v) : m_flags (v) { }
  QSqlError_ErrorType_Enums (const QFlags<enum QSqlError::ErrorType> &v) : m_flags (v) { }
  QFlags<enum QSqlError::ErrorType> flags () const { return m_flags; }
private:
  QFlags<QSqlError::ErrorType> m_flags;
};

//  Wrapper class for enum QSqlError::ErrorType
class QSqlError_ErrorType_Enum : public QSqlError_ErrorType_Enums {
public:
  QSqlError_ErrorType_Enum () { }
  QSqlError_ErrorType_Enum (enum QSqlError::ErrorType v) : QSqlError_ErrorType_Enums (v) { }
  enum QSqlError::ErrorType value () const { return (enum QSqlError::ErrorType) flags ().operator int (); }
};

//  Converter for QFlags<enum QSqlError::ErrorType>
template <>
struct Converter<QFlags<enum QSqlError::ErrorType> >
{
public:
  typedef QFlags<enum QSqlError::ErrorType> source_type;
  typedef QSqlError_ErrorType_Enums target_type;
  static source_type toq (const target_type &c) { return c.flags (); }
  static target_type toc (const source_type &qc) { return target_type (qc); }
};

//  Converter for enum QSqlError::ErrorType
template <>
struct Converter<enum QSqlError::ErrorType>
{
public:
  typedef enum QSqlError::ErrorType source_type;
  typedef QSqlError_ErrorType_Enum target_type;
  static source_type toq (const target_type &c) { return c.value (); }
  static target_type toc (const source_type &qc) { return target_type (qc); }
};

}

#endif
