Alexandria  2.14.1
Please provide a description of the project.
Source.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 SOURCE_H_
26 #define SOURCE_H_
27 
28 #include <string>
29 #include <vector>
30 #include <memory>
31 #include <boost/variant.hpp>
32 
34 
39 
40 namespace Euclid {
41 namespace SourceCatalog {
42 
48 class Source {
49 
50 public:
51  typedef boost::variant<int64_t, std::string> id_type;
52 
61  : m_source_id(source_id), m_attribute_vector( std::move(attributeVector) ) {
62  }
63 
65  virtual ~Source() { }
66 
71  id_type getId() const {
72  return m_source_id;
73  }
74 
88  template<typename T>
90 
91 
92  private:
93 
94  // Source identification
96 
97  // Vector of shared pointers to attribute
99 
100 };
101 // Eof class Source
102 
103 #define SOURCE_IMPL
105 #undef SOURCE_IMPL
106 
107 } /* namespace SourceCatalog */
108 } // end of namespace Euclid
109 
110 #if BOOST_VERSION < 105800
111 namespace boost {
112 
119  return !(a == b);
120 }
121 
122 }
123 #endif
124 
125 #endif /* SOURCE_H_ */
Coordinates.h
std::shared_ptr
STL class.
std::vector
STL class.
Photometry.h
Euclid::SourceCatalog::Source::Source
Source(id_type source_id, std::vector< std::shared_ptr< Attribute >> attributeVector)
Constructor.
Definition: Source.h:60
boost::operator!=
bool operator!=(const Euclid::SourceCatalog::Source::id_type &a, const Euclid::SourceCatalog::Source::id_type &b)
boost::variant specifies an equality operator (==), but, in older boost versions, not an inequality o...
Definition: Source.h:118
boost
Definition: array.h:34
Euclid::SourceCatalog::Source::getAttribute
std::shared_ptr< T > getAttribute() const
Get a pointer to source attribute of type T or a null pointer if the source do not contain an attribu...
Exception.h
Euclid::SourceCatalog::Source::getId
id_type getId() const
Get the source ID.
Definition: Source.h:71
Euclid::SourceCatalog::Source::m_source_id
id_type m_source_id
Definition: Source.h:95
Euclid::SourceCatalog::Source::m_attribute_vector
std::vector< std::shared_ptr< Attribute > > m_attribute_vector
Definition: Source.h:98
Euclid::SourceCatalog::Source
The Source class includes all information related to a sky source.
Definition: Source.h:48
SpectroscopicRedshift.h
Source.icpp
std
STL namespace.
Euclid::SourceCatalog::Source::id_type
boost::variant< int64_t, std::string > id_type
Definition: Source.h:51
Euclid::SourceCatalog::Source::~Source
virtual ~Source()
Virtual default destructor.
Definition: Source.h:65
Euclid
Definition: InstOrRefHolder.h:29
Attribute.h