Alexandria 2.31.0
SDC-CH common library for the Euclid project
|
The Source class includes all information related to a sky source. More...
#include <Source.h>
Public Types | |
typedef boost::variant< int64_t, std::string > | id_type |
Public Member Functions | |
Source (id_type source_id, std::vector< std::shared_ptr< Attribute > > attributeVector) | |
Constructor. | |
virtual | ~Source ()=default |
Virtual default destructor. | |
id_type | getId () const |
Get the source ID. | |
template<typename T > | |
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 attribute of type T. | |
Private Attributes | |
id_type | m_source_id {} |
std::vector< std::shared_ptr< Attribute > > | m_attribute_vector |
The Source class includes all information related to a sky source.
typedef boost::variant<int64_t, std::string> Euclid::SourceCatalog::Source::id_type |
|
inline |
|
virtualdefault |
Virtual default destructor.
std::shared_ptr< T > Euclid::SourceCatalog::Source::getAttribute | ( | ) | const |
Get a pointer to source attribute of type T or a null pointer if the source do not contain an attribute of type T.
An example usage is
std::shared_ptr<Photometry> a_photometric_attribute = source.getAttribute<Photometry>()
where Photometry can be replaced by any other attributes.
|
inline |
Get the source ID.
Definition at line 70 of file Source.h.
References m_source_id.
|
private |
|
private |