VTK
vtkRowQuery.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRowQuery.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 -------------------------------------------------------------------------*/
53 #ifndef vtkRowQuery_h
54 #define vtkRowQuery_h
55 
56 #include "vtkIOSQLModule.h" // For export macro
57 #include "vtkObject.h"
58 
59 class vtkVariant;
60 class vtkVariantArray;
61 
62 class VTKIOSQL_EXPORT vtkRowQuery : public vtkObject
63 {
64 public:
65  vtkTypeMacro(vtkRowQuery, vtkObject);
66  void PrintSelf(ostream& os, vtkIndent indent);
67 
73  virtual bool Execute() = 0;
74 
78  virtual int GetNumberOfFields() = 0;
79 
83  virtual const char* GetFieldName(int i) = 0;
84 
88  virtual int GetFieldType(int i) = 0;
89 
95  int GetFieldIndex(char* name);
96 
100  virtual bool NextRow() = 0;
101 
107  virtual bool IsActive() = 0;
108 
113  bool NextRow(vtkVariantArray* rowArray);
114 
118  virtual vtkVariant DataValue(vtkIdType c) = 0;
119 
123  virtual bool HasError() = 0;
124 
128  virtual const char* GetLastErrorText() = 0;
129 
131 
139  vtkSetMacro(CaseSensitiveFieldNames, bool);
140  vtkGetMacro(CaseSensitiveFieldNames, bool);
141  vtkBooleanMacro(CaseSensitiveFieldNames, bool);
143 
144 protected:
145  vtkRowQuery();
146  ~vtkRowQuery();
148 private:
149  vtkRowQuery(const vtkRowQuery &) VTK_DELETE_FUNCTION;
150  void operator=(const vtkRowQuery &) VTK_DELETE_FUNCTION;
151 };
152 
153 #endif // vtkRowQuery_h
154 
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
An array holding vtkVariants.
int vtkIdType
Definition: vtkType.h:287
abstract interface for queries that return row-oriented results.
Definition: vtkRowQuery.h:62
A atomic type representing the union of many types.
Definition: vtkVariant.h:75
bool CaseSensitiveFieldNames
Definition: vtkRowQuery.h:147
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.