VTK
dox/IO/vtkRowQuery.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkRowQuery.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00052 #ifndef __vtkRowQuery_h
00053 #define __vtkRowQuery_h
00054 
00055 #include "vtkObject.h"
00056 
00057 class vtkVariant;
00058 class vtkVariantArray;
00059 
00060 class VTK_IO_EXPORT vtkRowQuery : public vtkObject
00061 {
00062 public:
00063   vtkTypeMacro(vtkRowQuery, vtkObject);
00064   void PrintSelf(ostream& os, vtkIndent indent);
00065 
00068   virtual bool Execute() = 0;
00069 
00071   virtual int GetNumberOfFields() = 0;
00072 
00074   virtual const char* GetFieldName(int i) = 0;
00075 
00078   virtual int GetFieldType(int i) = 0;
00079 
00082   int GetFieldIndex(char* name);
00083 
00085   virtual bool NextRow() = 0;
00086 
00090   virtual bool IsActive() = 0;
00091 
00094   bool NextRow(vtkVariantArray* rowArray);
00095 
00097   virtual vtkVariant DataValue(vtkIdType c) = 0;
00098 
00100   virtual bool HasError() = 0;
00101   
00103   virtual const char* GetLastErrorText() = 0;
00104 
00106 
00111   vtkSetMacro(CaseSensitiveFieldNames, bool);
00112   vtkGetMacro(CaseSensitiveFieldNames, bool);
00113   vtkBooleanMacro(CaseSensitiveFieldNames, bool);
00115 
00116 protected:
00117   vtkRowQuery();
00118   ~vtkRowQuery();
00119   bool CaseSensitiveFieldNames;
00120 private:
00121   vtkRowQuery(const vtkRowQuery &); // Not implemented.
00122   void operator=(const vtkRowQuery &); // Not implemented.
00123 };
00124 
00125 #endif // __vtkRowQuery_h
00126