Alexandria  2.19
Please provide a description of the project.
Row.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2021 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 <boost/variant.hpp>
29 #include <iterator>
30 #include <memory>
31 #include <string>
32 #include <vector>
33 
34 #include "ElementsKernel/Export.h"
35 
36 #include "NdArray/NdArray.h"
37 #include "Table/ColumnInfo.h"
38 
39 namespace std {
40 
41 template <typename T>
43 
44 }
45 
46 namespace Euclid {
47 namespace Table {
48 
65 
66 public:
68  typedef boost::variant<bool, int32_t, int64_t, float, double, std::string, std::vector<bool>, std::vector<int32_t>,
72 
74 
98 
100  virtual ~Row() = default;
101 
108  std::shared_ptr<ColumnInfo> getColumnInfo() const;
109 
116  size_t size() const;
117 
127  const cell_type& operator[](const size_t index) const;
128 
138  const cell_type& operator[](const std::string& column) const;
139 
146  const_iterator begin() const;
147 
154  const_iterator end() const;
155 
156 private:
159 };
160 
161 } // namespace Table
162 } // end of namespace Euclid
163 
164 #endif /* TABLE_ROW_H */
std::string
STL class.
std::shared_ptr
STL class.
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< int32_t >, NdArray::NdArray< int64_t >, NdArray::NdArray< float >, NdArray::NdArray< double > > cell_type
The possible cell types.
Definition: Row.h:71
Export.h
std::vector
STL class.
Euclid::NdArray::NdArray
Definition: NdArray.h:46
ELEMENTS_API
#define ELEMENTS_API
std::ostream
STL class.
Euclid::Table::Row::m_values
std::vector< cell_type > m_values
Definition: Row.h:157
NdArray.h
Euclid::Table::Row::~Row
virtual ~Row()=default
Default destructor.
Euclid::Table::Row::const_iterator
std::vector< cell_type >::const_iterator const_iterator
Definition: Row.h:73
std
STL namespace.
Euclid::Table::Row::m_column_info
std::shared_ptr< ColumnInfo > m_column_info
Definition: Row.h:158
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:47