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 "vtkObject.h"
56 
57 class vtkVariant;
58 class vtkVariantArray;
59 
61 {
62 public:
63  vtkTypeMacro(vtkRowQuery, vtkObject);
64  void PrintSelf(ostream& os, vtkIndent indent);
65 
68  virtual bool Execute() = 0;
69 
71  virtual int GetNumberOfFields() = 0;
72 
74  virtual const char* GetFieldName(int i) = 0;
75 
78  virtual int GetFieldType(int i) = 0;
79 
82  int GetFieldIndex(char* name);
83 
85  virtual bool NextRow() = 0;
86 
90  virtual bool IsActive() = 0;
91 
94  bool NextRow(vtkVariantArray* rowArray);
95 
97  virtual vtkVariant DataValue(vtkIdType c) = 0;
98 
100  virtual bool HasError() = 0;
101 
103  virtual const char* GetLastErrorText() = 0;
104 
106 
111  vtkSetMacro(CaseSensitiveFieldNames, bool);
112  vtkGetMacro(CaseSensitiveFieldNames, bool);
113  vtkBooleanMacro(CaseSensitiveFieldNames, bool);
115 
116 protected:
117  vtkRowQuery();
118  ~vtkRowQuery();
120 private:
121  vtkRowQuery(const vtkRowQuery &); // Not implemented.
122  void operator=(const vtkRowQuery &); // Not implemented.
123 };
124 
125 #endif // __vtkRowQuery_h
126 
abstract base class for most VTK objects
Definition: vtkObject.h:60
An array holding vtkVariants.
int vtkIdType
Definition: vtkType.h:255
abstract interface for queries that return row-oriented results.
Definition: vtkRowQuery.h:60
A atomic type representing the union of many types.
Definition: vtkVariant.h:72
bool CaseSensitiveFieldNames
Definition: vtkRowQuery.h:119
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_IO_EXPORT