Alexandria  2.14.1
Please provide a description of the project.
Row.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2020 Euclid Science Ground Segment
3  *
4  * This library is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License as published by the Free
6  * Software Foundation; either version 3.0 of the License, or (at your option)
7  * any later version.
8  *
9  * This library is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12  * details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this library; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
25 #ifndef TABLE_ROW_H
26 #define TABLE_ROW_H
27 
28 #include <memory>
29 #include <vector>
30 #include <string>
31 #include <iterator>
32 #include <boost/variant.hpp>
33 
34 #include "ElementsKernel/Export.h"
35 
36 #include "Table/ColumnInfo.h"
37 #include "NdArray/NdArray.h"
38 
39 namespace std {
40 
41 template <typename T>
43 
44 }
45 
46 namespace Euclid {
47 namespace Table {
48 
65 
66 public:
67 
69  typedef boost::variant<bool,
70  int32_t,
71  int64_t,
72  float,
73  double,
85 
87 
111 
113  virtual ~Row() = default;
114 
121  std::shared_ptr<ColumnInfo> getColumnInfo() const;
122 
129  size_t size() const;
130 
140  const cell_type& operator[](const size_t index) const;
141 
151  const cell_type& operator[](const std::string& column) const;
152 
159  const_iterator begin() const;
160 
167  const_iterator end() const;
168 
169 private:
172 };
173 
174 }
175 } // end of namespace Euclid
176 
177 #endif /* TABLE_ROW_H */
178 
Export.h
std::string
STL class.
std::shared_ptr
STL class.
std::vector
STL class.
Euclid::NdArray::NdArray
Definition: NdArray.h:45
ELEMENTS_API
#define ELEMENTS_API
std::ostream
STL class.
Euclid::Table::Row::m_values
std::vector< cell_type > m_values
Definition: Row.h:170
Euclid::Table::Row::cell_type
boost::variant< bool, int32_t, int64_t, float, double, std::string, std::vector< bool >, std::vector< int32_t >, std::vector< int64_t >, std::vector< float >, std::vector< double >, NdArray::NdArray< bool >, NdArray::NdArray< int32_t >, NdArray::NdArray< int64_t >, NdArray::NdArray< float >, NdArray::NdArray< double > > cell_type
The possible cell types.
Definition: Row.h:84
NdArray.h
Euclid::Table::Row::const_iterator
std::vector< cell_type >::const_iterator const_iterator
Definition: Row.h:86
std
STL namespace.
Euclid::Table::Row::m_column_info
std::shared_ptr< ColumnInfo > m_column_info
Definition: Row.h:171
Euclid::Table::Row
Represents one row of a Table.
Definition: Row.h:64
ColumnInfo.h
Euclid
Definition: InstOrRefHolder.h:29
std::operator<<
std::ostream & operator<<(std::ostream &s, const std::vector< T > &v)
Definition: Row.cpp:40