VTK  9.1.0
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
59class vtkVariant;
60class vtkVariantArray;
61
62class VTKIOSQL_EXPORT vtkRowQuery : public vtkObject
63{
64public:
65 vtkTypeMacro(vtkRowQuery, vtkObject);
66 void PrintSelf(ostream& os, vtkIndent indent) override;
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(const char* name);
96
100 virtual bool NextRow() = 0;
101
107 virtual bool IsActive() = 0;
108
113 bool NextRow(vtkVariantArray* rowArray);
114
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
144protected:
146 ~vtkRowQuery() override;
148
149private:
150 vtkRowQuery(const vtkRowQuery&) = delete;
151 void operator=(const vtkRowQuery&) = delete;
152};
153
154#endif // vtkRowQuery_h
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
abstract interface for queries that return row-oriented results.
Definition: vtkRowQuery.h:63
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int GetNumberOfFields()=0
The number of fields in the query result.
~vtkRowQuery() override
virtual vtkVariant DataValue(vtkIdType c)=0
Return data in current row, field c.
virtual bool NextRow()=0
Advance row, return false if past end.
virtual const char * GetFieldName(int i)=0
Return the name of the specified query field.
virtual bool IsActive()=0
Return true if the query is active (i.e.
virtual int GetFieldType(int i)=0
Return the type of the field, using the constants defined in vtkType.h.
bool NextRow(vtkVariantArray *rowArray)
Advance row, return false if past end.
virtual bool Execute()=0
Execute the query.
bool CaseSensitiveFieldNames
Definition: vtkRowQuery.h:147
int GetFieldIndex(const char *name)
Return the index of the specified query field.
virtual bool HasError()=0
Returns true if an error is set, otherwise false.
virtual const char * GetLastErrorText()=0
Get the last error text from the query.
An array holding vtkVariants.
A atomic type representing the union of many types.
Definition: vtkVariant.h:145
@ name
Definition: vtkX3D.h:225
int vtkIdType
Definition: vtkType.h:332