Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
Euclid::SourceCatalog::Source Class Reference

The Source class includes all information related to a sky source. More...

#include <Source.h>

Collaboration diagram for Euclid::SourceCatalog::Source:
Collaboration graph
[legend]

Public Types

typedef boost::variant< int64_t, std::stringid_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
 

Detailed Description

The Source class includes all information related to a sky source.

Definition at line 48 of file Source.h.

Member Typedef Documentation

◆ id_type

Definition at line 51 of file Source.h.

Constructor & Destructor Documentation

◆ Source()

Euclid::SourceCatalog::Source::Source ( id_type  source_id,
std::vector< std::shared_ptr< Attribute > >  attributeVector 
)
inline

Constructor.

Parameters
source_idSource identifier
attributeVectorVector of shared pointers on Attribute objects

Definition at line 60 of file Source.h.

◆ ~Source()

virtual Euclid::SourceCatalog::Source::~Source ( )
virtualdefault

Virtual default destructor.

Member Function Documentation

◆ getAttribute()

template<typename T >
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.

Returns
The pointer to the attribute or nullptr if the attribute is not found

◆ getId()

id_type Euclid::SourceCatalog::Source::getId ( ) const
inline

Get the source ID.

Returns
The source ID

Definition at line 70 of file Source.h.

References m_source_id.

Member Data Documentation

◆ m_attribute_vector

std::vector<std::shared_ptr<Attribute> > Euclid::SourceCatalog::Source::m_attribute_vector
private

Definition at line 95 of file Source.h.

◆ m_source_id

id_type Euclid::SourceCatalog::Source::m_source_id {}
private

Definition at line 92 of file Source.h.

Referenced by getId().


The documentation for this class was generated from the following file: