VTK
dox/TextAnalysis/vtkQtXMLProcessor.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkQtXMLProcessor.h
00005   
00006 -------------------------------------------------------------------------
00007   Copyright 2008 Sandia Corporation.
00008   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00009   the U.S. Government retains certain rights in this software.
00010 -------------------------------------------------------------------------
00011 
00012   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00013   All rights reserved.
00014   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00015 
00016      This software is distributed WITHOUT ANY WARRANTY; without even
00017      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00018      PURPOSE.  See the above copyright notice for more information.
00019 
00020 =========================================================================*/
00021 
00110 #ifndef __vtkQtXMLProcessor_h
00111 #define __vtkQtXMLProcessor_h
00112 
00113 #include "vtkPassInputTypeAlgorithm.h"
00114 
00115 #include "vtkStdString.h" //avoids an error when building plugins
00116 
00117 class VTK_TEXT_ANALYSIS_EXPORT vtkQtXMLProcessor:
00118   public vtkPassInputTypeAlgorithm
00119 {
00120 public:
00121   static vtkQtXMLProcessor* New();
00122   vtkTypeMacro(vtkQtXMLProcessor,vtkPassInputTypeAlgorithm);
00123   void PrintSelf(ostream& os, vtkIndent indent);
00124   
00125 //BTX
00126   enum
00127     {
00128     ROW_DOMAIN = 0,
00129     DATA_OBJECT_DOMAIN = 1,
00130     VALUE_DOMAIN = 2
00131     };
00132 
00133   enum
00134     {
00135     XQUERY = 0,
00136     XSLT = 1
00137     };
00138 
00139 //ETX
00140 
00142 
00144   vtkGetMacro(FieldType, int);
00145   vtkSetMacro(FieldType, int);
00147 
00149 
00150   vtkGetMacro(InputDomain, int);
00151   vtkSetMacro(InputDomain, int);
00153 
00155 
00156   vtkGetMacro(QueryType, int);
00157   vtkSetMacro(QueryType, int);
00159 
00161 
00162   vtkSetStringMacro(Query);
00163   vtkGetStringMacro(Query);
00165 
00167 
00168   vtkSetStringMacro(OutputArray);
00169   vtkGetStringMacro(OutputArray);
00171 
00173 
00175   void MapArrayName(const vtkStdString& from, const vtkStdString& to);
00176   void ClearArrayNameMap();
00178 
00179 //BTX
00180 protected:
00181   vtkQtXMLProcessor();
00182   ~vtkQtXMLProcessor();
00183   
00184   int FillOutputPortInformation(int port, vtkInformation* info);
00185   
00186   int RequestData(
00187     vtkInformation*, 
00188     vtkInformationVector**, 
00189     vtkInformationVector*);
00190   
00191 private:
00192   vtkQtXMLProcessor(const vtkQtXMLProcessor&); // Not implemented
00193   void operator=(const vtkQtXMLProcessor&);   // Not implemented
00194 
00195   class XMLAdapter;
00196   class Internals;
00197   Internals* const Implementation;
00198 
00199   int FieldType;
00200   int InputDomain;
00201   int QueryType;
00202   char* Query;
00203   char* OutputArray;
00204 //ETX
00205 };
00206 
00207 #endif
00208