DGtal  0.9.2
TableReader.h
1 
17 #pragma once
18 
31 #if defined(TableReader_RECURSES)
32 #error Recursive header files inclusion detected in TableReader.h
33 #else // defined(TableReader_RECURSES)
34 
35 #define TableReader_RECURSES
36 
37 #if !defined TableReader_h
38 
39 #define TableReader_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <vector>
45 #include "DGtal/base/Common.h"
46 #include "DGtal/geometry/curves/FreemanChain.h"
48 
49 namespace DGtal
50 {
51 
53  // class TableReader
82  template <typename TQuantity>
83  struct TableReader
84  {
85  // ----------------------- Standard services ------------------------------
86  public:
87 
88 
98  static std::vector< TQuantity >
99  getColumnElementsFromFile (const std::string & aFilename,
100  unsigned int aPosition);
101 
112  static std::vector< TQuantity >
113  getColumnElementsFromInputStream (std::istream &in,
114  unsigned int aPosition);
115 
116 
117  }; // end of class TableReader
118 
119 
120 
121 } // namespace DGtal
122 
123 
125 // Includes inline functions.
126 #include "DGtal/io/readers/TableReader.ih"
127 
128 
129 // //
131 
132 #endif // !defined TableReader_h
133 
134 #undef TableReader_RECURSES
135 #endif // else defined(TableReader_RECURSES)
static std::vector< TQuantity > getColumnElementsFromFile(const std::string &aFilename, unsigned int aPosition)
static std::vector< TQuantity > getColumnElementsFromInputStream(std::istream &in, unsigned int aPosition)
Aim: Implements method to read a set of numbers represented in each line of a file.
Definition: TableReader.h:83
DGtal is the top-level namespace which contains all DGtal functions and types.