1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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
21 // File : VISU_TableReader.hxx
22 // Author : Alexey PETROV
25 #ifndef VISU_TableReader_HeaderFile
26 #define VISU_TableReader_HeaderFile
29 \file VISU_TableReader.hxx
30 \brief The file contains definition of the Table reading functionlity
33 #include "VISUConvertor.hxx"
35 #include "VISU_IDMapper.hxx"
42 //---------------------------------------------------------------
43 struct VISU_CONVERTOR_EXPORT TTable2D
45 typedef std::string TValue;
46 typedef std::vector<TValue> TValues;
56 std::vector<std::string> myColumnUnits;
57 std::vector<std::string> myColumnTitles;
59 typedef std::vector<TRow> TRows;
66 getColumns( TTable2D& theTable2D ) const;
70 //---------------------------------------------------------------
71 class VISU_CONVERTOR_EXPORT TTableIDMapper:
72 public virtual TPolyDataIDMapper,
73 public virtual TTable2D
88 SetXAxisPosition( vtkIdType theAxisPosition );
94 vtkIdType myXAxisPosition;
95 vtkPolyData* myOutput;
97 typedef MED::SharedPtr<TTableIDMapper> PTableIDMapper;
100 //---------------------------------------------------------------
101 typedef std::vector<PTableIDMapper> TTableContainer;
102 VISU_CONVERTOR_EXPORT
103 void ImportTables( const char* theFileName, TTableContainer& theContainer,
104 bool theFirstStrAsTitle = false);
106 void ImportCSVTable(const char* theFileName,
107 TTableContainer& theContainer,
108 bool theFirstStrAsTitle,
109 const char theSeparator);
111 //---------------------------------------------------------------