1 // Copyright (C) 2010-2016 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __vtkVisuTableReader_h_
21 #define __vtkVisuTableReader_h_
23 #include "vtkTableAlgorithm.h"
27 class VTK_EXPORT vtkVisuTableReader: public vtkTableAlgorithm
30 static vtkVisuTableReader* New();
31 vtkTypeMacro(vtkVisuTableReader, vtkTableAlgorithm)
32 void PrintSelf(ostream& os, vtkIndent indent);
35 // Specifies the name of the file
36 vtkGetStringMacro(FileName);
37 vtkSetStringMacro(FileName);
40 // When set to true, the reader will detect numeric columns and create
41 // vtkDoubleArray or vtkIntArray for those instead of vtkStringArray.
42 vtkSetMacro(DetectNumericColumns, bool);
43 vtkGetMacro(DetectNumericColumns, bool);
44 vtkBooleanMacro(DetectNumericColumns, bool);
47 // When set to true, the reader will interpret the first string as
49 vtkSetMacro(FirstStringAsTitles, bool);
50 vtkGetMacro(FirstStringAsTitles, bool);
51 vtkBooleanMacro(FirstStringAsTitles, bool);
54 // Specifies the number of the table
55 vtkSetMacro(TableNumber, int);
56 vtkGetMacro(TableNumber, int);
59 // Specifies string that will be used to separate values
60 vtkSetStringMacro(ValueDelimiter);
61 vtkGetStringMacro(ValueDelimiter);
64 // Determine whether the given file can be read
65 virtual int CanReadFile(const char* fname);
68 // Returns the available table names.
69 virtual vtkStringArray* GetAvailableTables();
73 ~vtkVisuTableReader();
76 // This is called by the superclass.
77 virtual int RequestData(vtkInformation*, vtkInformationVector**,
78 vtkInformationVector*);
80 // name of the file to read from
83 // defines whether to detect numeric columns
84 bool DetectNumericColumns;
86 // defines whether to treat first string as column titles
87 bool FirstStringAsTitles;
89 // number of the table to read
92 // string that will be used to separate values
95 // Available table names
96 vtkStringArray* AvailableTables;
99 vtkVisuTableReader(const vtkVisuTableReader&); // Not implemented.
100 void operator=(const vtkVisuTableReader&); // Not implemented.
103 #endif //__vtkVisuTableReader_h_