VTK
vtkQtSQLQuery.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQtSQLQuery.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
27 #ifndef vtkQtSQLQuery_h
28 #define vtkQtSQLQuery_h
29 
30 // Check for Qt SQL module before defining this class.
31 #include <qglobal.h>
32 #if (QT_EDITION & QT_MODULE_SQL)
33 
35 #include "vtkSQLQuery.h"
36 #include "vtkType.h"
37 
38 class vtkVariant;
39 class vtkQtSQLQueryInternals;
40 
42 {
43 public:
44  static vtkQtSQLQuery* New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
50  virtual bool Execute();
51 
53  virtual int GetNumberOfFields();
54 
56  virtual const char* GetFieldName(int col);
57 
60  virtual int GetFieldType(int col);
61 
63  virtual bool NextRow();
64 
67 
69  virtual bool HasError();
70 
72  virtual const char* GetLastErrorText();
73 
74 protected:
75  vtkQtSQLQuery();
76  ~vtkQtSQLQuery();
77 
78  vtkQtSQLQueryInternals* Internals;
79  friend class vtkQtSQLDatabase;
80 
81 private:
82 
83  // Using the convenience function internally
84  vtkSetStringMacro(LastErrorText);
85 
86  char* LastErrorText;
87 
88  vtkQtSQLQuery(const vtkQtSQLQuery &); // Not implemented.
89  void operator=(const vtkQtSQLQuery &); // Not implemented.
90 };
91 
92 #endif // (QT_EDITION & QT_MODULE_SQL)
93 #endif // vtkQtSQLQuery_h
94 
vtkRowQuery::GetFieldName
virtual const char * GetFieldName(int i)=0
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkObject::New
static vtkObject * New()
vtkQtSQLQuery
query class associated with vtkQtSQLDatabase
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkSQLQuery::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkRowQuery::HasError
virtual bool HasError()=0
vtkType.h
VTKGUISUPPORTQTSQL_EXPORT
#define VTKGUISUPPORTQTSQL_EXPORT
Definition: vtkGUISupportQtSQLModule.h:15
vtkgl::c
const GLubyte * c
Definition: vtkgl.h:15720
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSetStringMacro
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:104
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:79
vtkRowQuery::GetNumberOfFields
virtual int GetNumberOfFields()=0
vtkRowQuery::DataValue
virtual vtkVariant DataValue(vtkIdType c)=0
vtkSQLQuery.h
vtkRowQuery::GetFieldType
virtual int GetFieldType(int i)=0
vtkSQLQuery::Execute
virtual bool Execute()=0
vtkQtSQLDatabase
maintains a connection to an sql database
vtkGUISupportQtSQLModule.h
vtkSQLQuery
executes an sql query and retrieves results
Definition: vtkSQLQuery.h:74
vtkRowQuery::NextRow
virtual bool NextRow()=0
vtkRowQuery::GetLastErrorText
virtual const char * GetLastErrorText()=0