VTK: IO/SQL/vtkRowQuery.h Source File

| VTK 9.3.1

vtkRowQuery.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
37 #ifndef vtkRowQuery_h
38 #define vtkRowQuery_h
39
40 #include "vtkIOSQLModule.h" // For export macro
41 #include "vtkObject.h"
42
43 VTK_ABI_NAMESPACE_BEGIN
44 class vtkVariant;
45 class vtkVariantArray;
46
47 class VTKIOSQL_EXPORT vtkRowQuery : public vtkObject
48 {
49 public:
50 vtkTypeMacro(vtkRowQuery, vtkObject);
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
58 virtual bool Execute() = 0;
59
63 virtual int GetNumberOfFields() = 0;
64
68 virtual const char* GetFieldName(int i) = 0;
69
73 virtual int GetFieldType(int i) = 0;
74
80 int GetFieldIndex(const char* name);
81
85 virtual bool NextRow() = 0;
86
92 virtual bool IsActive() = 0;
93
98 bool NextRow(vtkVariantArray* rowArray);
99
103 virtual vtkVariant DataValue(vtkIdType c) = 0;
104
108 virtual bool HasError() = 0;
109
113 virtual const char* GetLastErrorText() = 0;
114
116
124 vtkSetMacro(CaseSensitiveFieldNames, bool);
125 vtkGetMacro(CaseSensitiveFieldNames, bool);
126 vtkBooleanMacro(CaseSensitiveFieldNames, bool);
128
129 protected:
130 vtkRowQuery();
131 ~vtkRowQuery() override;
132 bool CaseSensitiveFieldNames;
133
134 private:
135 vtkRowQuery(const vtkRowQuery&) = delete;
136 void operator=(const vtkRowQuery&) = delete;
137 };
138
139 VTK_ABI_NAMESPACE_END
140 #endif // vtkRowQuery_h
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkRowQuery
abstract interface for queries that return row-oriented results.
Definition: vtkRowQuery.h:48
vtkRowQuery::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkRowQuery::GetLastErrorText
virtual const char * GetLastErrorText()=0
Get the last error text from the query.
vtkRowQuery::GetNumberOfFields
virtual int GetNumberOfFields()=0
The number of fields in the query result.
vtkRowQuery::~vtkRowQuery
~vtkRowQuery() override
vtkRowQuery::DataValue
virtual vtkVariant DataValue(vtkIdType c)=0
Return data in current row, field c.
vtkRowQuery::NextRow
virtual bool NextRow()=0
Advance row, return false if past end.
vtkRowQuery::vtkRowQuery
vtkRowQuery()
vtkRowQuery::GetFieldName
virtual const char * GetFieldName(int i)=0
Return the name of the specified query field.
vtkRowQuery::IsActive
virtual bool IsActive()=0
Return true if the query is active (i.e.
vtkRowQuery::GetFieldType
virtual int GetFieldType(int i)=0
Return the type of the field, using the constants defined in vtkType.h.
vtkRowQuery::NextRow
bool NextRow(vtkVariantArray *rowArray)
Advance row, return false if past end.
vtkRowQuery::Execute
virtual bool Execute()=0
Execute the query.
vtkRowQuery::CaseSensitiveFieldNames
bool CaseSensitiveFieldNames
Definition: vtkRowQuery.h:132
vtkRowQuery::GetFieldIndex
int GetFieldIndex(const char *name)
Return the index of the specified query field.
vtkRowQuery::HasError
virtual bool HasError()=0
Returns true if an error is set, otherwise false.
vtkVariantArray
An array holding vtkVariants.
Definition: vtkVariantArray.h:47
vtkVariant
A type representing the union of many types.
Definition: vtkVariant.h:62
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkObject.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315