Eneboo - Documentación para desarrolladores
src/flbase/aqsobjects/AQSSqlCursor_p.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQSSqlCursor_p.h
00003  -------------------
00004  begin                : 09/02/2011
00005  copyright            : (C) 2003-2011 by InfoSiAL S.L.
00006  email                : mail@infosial.com
00007  ***************************************************************************/
00008 /***************************************************************************
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; version 2 of the License.               *
00012  ***************************************************************************/
00013 /***************************************************************************
00014  Este  programa es software libre. Puede redistribuirlo y/o modificarlo
00015  bajo  los  términos  de  la  Licencia  Pública General de GNU   en  su
00016  versión 2, publicada  por  la  Free  Software Foundation.
00017  ***************************************************************************/
00018 
00019 #ifndef AQSSQLCURSOR_P_H_
00020 #define AQSSQLCURSOR_P_H_
00021 
00022 #include "AQSObject_p.h"
00023 #include "AQObjects.h"
00024 
00025 class AQSSqlCursor : public AQSObject
00026 {
00027   Q_OBJECT
00028 
00029   AQ_DECLARE_AQS_AQOBJECT(SqlCursor, Object);
00030 
00031   //@AQ_BEGIN_DEF_PUB_SLOTS@
00032 public slots:
00033   int modeAccess() const;
00034   void setModeAccess(int);
00035   void setValueBuffer(const QString &, const QVariant &);
00036   QVariant valueBuffer(const QString &);
00037   QVariant valueBufferCopy(const QString &) const;
00038   QString mainFilter() const;
00039   void setMainFilter(const QString &);
00040   bool transaction(bool = false);
00041   bool rollback();
00042   bool commit(bool = true);
00043   int size() const;
00044   void setForwardOnly(bool);
00045   QSqlError *lastError() const;
00046   QString lastQuery() const;
00047 
00048 protected:
00049   static void *construct(const QSArgumentList &args) {
00050     QMap<int, QStringList> candidates;
00051     candidates[0].append(QString::null);
00052     candidates[1].append(QString::fromLatin1("QString"));
00053     candidates[2].append(QString::fromLatin1("QString,QString"));
00054     QString sgt(castArgsSignature(args, candidates));
00055     if (sgt.isEmpty())
00056       return new AQSqlCursor;
00057     if (sgt == QString::fromLatin1("QString"))
00058       return new AQSqlCursor(*(argValue<QString *>(args[0])));
00059     if (sgt == QString::fromLatin1("QString,QString"))
00060       return new AQSqlCursor(*(argValue<QString *>(args[0])),
00061                              *(argValue<QString *>(args[1])));
00062     return 0;
00063   }
00064 
00065 public:
00066   static QMap<int, QStringList> candidateConstructors() {
00067     QMap<int, QStringList> candidates;
00068     candidates[0].append(QString::null);
00069     candidates[1].append(QString::fromLatin1("QString"));
00070     candidates[2].append(QString::fromLatin1("QString,QString"));
00071     return candidates;
00072   }
00073   //@AQ_END_DEF_PUB_SLOTS@
00074 };
00075 
00076 //@AQ_BEGIN_IMP_PUB_SLOTS@
00077 inline int AQSSqlCursor::modeAccess() const
00078 {
00079   AQ_CALL_RET_V(modeAccess(), int);
00080 }
00081 inline void AQSSqlCursor::setModeAccess(int arg0)
00082 {
00083   AQ_CALL_VOID(setModeAccess(arg0));
00084 }
00085 inline void AQSSqlCursor::setValueBuffer(const QString &arg0,  const QVariant &arg1)
00086 {
00087   AQ_CALL_VOID(setValueBuffer(arg0, arg1));
00088 }
00089 inline QVariant AQSSqlCursor::valueBuffer(const QString &arg0)
00090 {
00091   AQ_CALL_RET_V(valueBuffer(arg0), QVariant);
00092 }
00093 inline QVariant AQSSqlCursor::valueBufferCopy(const QString &arg0) const
00094 {
00095   AQ_CALL_RET_V(valueBufferCopy(arg0), QVariant);
00096 }
00097 inline QString AQSSqlCursor::mainFilter() const
00098 {
00099   AQ_CALL_RET_V(mainFilter(), QString);
00100 }
00101 inline void AQSSqlCursor::setMainFilter(const QString &arg0)
00102 {
00103   AQ_CALL_VOID(setMainFilter(arg0));
00104 }
00105 inline bool AQSSqlCursor::transaction(bool arg0)
00106 {
00107   AQ_CALL_RET_V(transaction(arg0), bool);
00108 }
00109 inline bool AQSSqlCursor::rollback()
00110 {
00111   AQ_CALL_RET_V(rollback(), bool);
00112 }
00113 inline bool AQSSqlCursor::commit(bool arg0)
00114 {
00115   AQ_CALL_RET_V(commit(arg0), bool);
00116 }
00117 inline int AQSSqlCursor::size() const
00118 {
00119   AQ_CALL_RET_V(size(), int);
00120 }
00121 inline void AQSSqlCursor::setForwardOnly(bool arg0)
00122 {
00123   AQ_CALL_VOID(setForwardOnly(arg0));
00124 }
00125 inline QSqlError *AQSSqlCursor::lastError() const
00126 {
00127   AQ_CALL_RET_PTR(lastError(), QSqlError);
00128 }
00129 inline QString AQSSqlCursor::lastQuery() const
00130 {
00131   AQ_CALL_RET_V(lastQuery(), QString);
00132 }
00133 //@AQ_END_IMP_PUB_SLOTS@
00134 
00135 #endif /* AQSSQLCURSOR_P_H_ */
00136 // @AQOBJECT@
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'