VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/GUISupport/QtSQL/vtkQtSQLQuery.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkQtSQLQuery.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00027 #ifndef vtkQtSQLQuery_h
00028 #define vtkQtSQLQuery_h
00029 
00030 // Check for Qt SQL module before defining this class.
00031 #include <qglobal.h>
00032 #if (QT_EDITION & QT_MODULE_SQL)
00033 
00034 #include "vtkGUISupportQtSQLModule.h"
00035 #include "vtkSQLQuery.h"
00036 #include "vtkType.h"
00037 
00038 class vtkVariant;
00039 class vtkQtSQLQueryInternals;
00040 
00041 class VTKGUISUPPORTQTSQL_EXPORT vtkQtSQLQuery : public vtkSQLQuery
00042 {
00043 public:
00044   static vtkQtSQLQuery* New();
00045   vtkTypeMacro(vtkQtSQLQuery, vtkSQLQuery);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047 
00050   virtual bool Execute();
00051 
00053   virtual int GetNumberOfFields();
00054 
00056   virtual const char* GetFieldName(int col);
00057 
00060   virtual int GetFieldType(int col);
00061 
00063   virtual bool NextRow();
00064 
00066   virtual vtkVariant DataValue(vtkIdType c);
00067 
00069   virtual bool HasError();
00070 
00072   virtual const char* GetLastErrorText();
00073 
00074 protected:
00075   vtkQtSQLQuery();
00076   ~vtkQtSQLQuery();
00077 
00078   vtkQtSQLQueryInternals* Internals;
00079   friend class vtkQtSQLDatabase;
00080 
00081 private:
00082 
00083   // Using the convenience function internally
00084   vtkSetStringMacro(LastErrorText);
00085 
00086   char* LastErrorText;
00087 
00088   vtkQtSQLQuery(const vtkQtSQLQuery &); // Not implemented.
00089   void operator=(const vtkQtSQLQuery &); // Not implemented.
00090 };
00091 
00092 #endif // (QT_EDITION & QT_MODULE_SQL)
00093 #endif // vtkQtSQLQuery_h
00094