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 
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:
148 private:
149  vtkRowQuery(const vtkRowQuery &) VTK_DELETE_FUNCTION;
150  void operator=(const vtkRowQuery &) VTK_DELETE_FUNCTION;
151 };
152 
153 #endif // vtkRowQuery_h
154 
vtkRowQuery::GetFieldName
virtual const char * GetFieldName(int i)=0
Return the name of the specified query field.
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkRowQuery::NextRow
bool NextRow(vtkVariantArray *rowArray)
Advance row, return false if past end.
vtkRowQuery::~vtkRowQuery
~vtkRowQuery()
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkRowQuery::CaseSensitiveFieldNames
bool CaseSensitiveFieldNames
Definition: vtkRowQuery.h:147
vtkRowQuery::GetFieldIndex
int GetFieldIndex(char *name)
Return the index of the specified query field.
vtkVariantArray
An array holding vtkVariants.
Definition: vtkVariantArray.h:47
vtkRowQuery::HasError
virtual bool HasError()=0
Returns true if an error is set, otherwise false.
vtkRowQuery::vtkRowQuery
vtkRowQuery()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:76
vtkRowQuery::GetNumberOfFields
virtual int GetNumberOfFields()=0
The number of fields in the query result.
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkObject.h
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkRowQuery::IsActive
virtual bool IsActive()=0
Return true if the query is active (i.e.
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkRowQuery::DataValue
virtual vtkVariant DataValue(vtkIdType c)=0
Return data in current row, field c.
vtkRowQuery::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkRowQuery::GetFieldType
virtual int GetFieldType(int i)=0
Return the type of the field, using the constants defined in vtkType.h.
vtkRowQuery
abstract interface for queries that return row-oriented results.
Definition: vtkRowQuery.h:63
vtkRowQuery::Execute
virtual bool Execute()=0
Execute the query.
vtkRowQuery::NextRow
virtual bool NextRow()=0
Advance row, return false if past end.
vtkRowQuery::GetLastErrorText
virtual const char * GetLastErrorText()=0
Get the last error text from the query.