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 -------------------------------------------------------------------------*/
52 #ifndef vtkRowQuery_h
53 #define vtkRowQuery_h
54 
55 #include "vtkIOSQLModule.h" // For export macro
56 #include "vtkObject.h"
57 
58 class vtkVariant;
59 class vtkVariantArray;
60 
62 {
63 public:
64  vtkTypeMacro(vtkRowQuery, vtkObject);
65  void PrintSelf(ostream& os, vtkIndent indent);
66 
69  virtual bool Execute() = 0;
70 
72  virtual int GetNumberOfFields() = 0;
73 
75  virtual const char* GetFieldName(int i) = 0;
76 
79  virtual int GetFieldType(int i) = 0;
80 
83  int GetFieldIndex(char* name);
84 
86  virtual bool NextRow() = 0;
87 
91  virtual bool IsActive() = 0;
92 
95  bool NextRow(vtkVariantArray* rowArray);
96 
98  virtual vtkVariant DataValue(vtkIdType c) = 0;
99 
101  virtual bool HasError() = 0;
102 
104  virtual const char* GetLastErrorText() = 0;
105 
107 
112  vtkSetMacro(CaseSensitiveFieldNames, bool);
113  vtkGetMacro(CaseSensitiveFieldNames, bool);
114  vtkBooleanMacro(CaseSensitiveFieldNames, bool);
116 
117 protected:
118  vtkRowQuery();
119  ~vtkRowQuery();
121 private:
122  vtkRowQuery(const vtkRowQuery &); // Not implemented.
123  void operator=(const vtkRowQuery &); // Not implemented.
124 };
125 
126 #endif // vtkRowQuery_h
127 
abstract base class for most VTK objects
Definition: vtkObject.h:61
An array holding vtkVariants.
int vtkIdType
Definition: vtkType.h:247
abstract interface for queries that return row-oriented results.
Definition: vtkRowQuery.h:61
A atomic type representing the union of many types.
Definition: vtkVariant.h:78
bool CaseSensitiveFieldNames
Definition: vtkRowQuery.h:120
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKIOSQL_EXPORT