Eneboo - Documentación para desarrolladores
src/qt/src/sql/drivers/cache/qsqlcachedresult.h
Ir a la documentación de este archivo.
00001 /****************************************************************************
00002 **
00003 ** Definition of shared Qt SQL module classes
00004 **
00005 ** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
00006 **
00007 ** This file is part of the sql module of the Qt GUI Toolkit.
00008 **
00009 ** This file may be distributed under the terms of the Q Public License
00010 ** as defined by Trolltech ASA of Norway and appearing in the file
00011 ** LICENSE.QPL included in the packaging of this file.
00012 **
00013 ** This file may be distributed and/or modified under the terms of the
00014 ** GNU General Public License version 2 as published by the Free Software
00015 ** Foundation and appearing in the file LICENSE.GPL included in the
00016 ** packaging of this file.
00017 **
00018 ** Licensees holding valid Qt Enterprise Edition licenses may use this
00019 ** file in accordance with the Qt Commercial License Agreement provided
00020 ** with the Software.
00021 **
00022 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00023 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00024 **
00025 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00026 **   information about Qt Commercial License Agreements.
00027 ** See http://www.trolltech.com/qpl/ for QPL licensing information.
00028 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00029 **
00030 ** Contact info@trolltech.com if any conditions of this licensing are
00031 ** not clear to you.
00032 **
00033 **********************************************************************/
00034 
00035 #ifndef QSQLCACHEDRESULT_H
00036 #define QSQLCACHEDRESULT_H
00037 
00038 //
00039 //  W A R N I N G
00040 //  -------------
00041 //
00042 // This file is not part of the Qt API.  It exists for the convenience
00043 // of other Qt classes.  This header file may change from version to
00044 // version without notice, or even be removed.
00045 //
00046 // We mean it.
00047 //
00048 //
00049 
00050 #include <qglobal.h>
00051 #include <qvariant.h>
00052 #include <qptrvector.h>
00053 #include <qvaluevector.h>
00054 #include <qsqlresult.h>
00055 
00056 #if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
00057 #define QM_EXPORT_SQL
00058 #else
00059 #define QM_EXPORT_SQL Q_EXPORT
00060 #endif
00061 
00062 #ifndef QT_NO_SQL
00063 
00064 class QtSqlCachedResultPrivate;
00065 
00066 class QM_EXPORT_SQL QtSqlCachedResult: public QSqlResult
00067 {
00068 public:
00069     virtual ~QtSqlCachedResult();
00070 
00071     typedef QValueVector<QVariant> RowCache;
00072     typedef QPtrVector<RowCache> RowsetCache;
00073 
00074 protected:    
00075     QtSqlCachedResult(const QSqlDriver * db);
00076 
00077     void init(int colCount);
00078     void cleanup();
00079     bool cacheNext();
00080 
00081     virtual bool gotoNext(RowCache* row) = 0;
00082 
00083     QVariant data(int i);
00084     bool isNull(int i);
00085     bool fetch(int i);
00086     bool fetchNext();
00087     bool fetchPrev();
00088     bool fetchFirst();
00089     bool fetchLast();
00090 
00091     int colCount() const;
00092 
00093 private:
00094     QtSqlCachedResultPrivate *d;
00095 };
00096 
00097 
00098 #endif
00099 
00100 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'