Alexandria  2.25.0
SDC-CH common library for the Euclid project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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::string
id_type
 

Public Member Functions

 Source (id_type source_id, std::vector< std::shared_ptr< Attribute >> attributeVector)
 Constructor. More...
 
virtual ~Source ()
 Virtual default destructor. More...
 
id_type getId () const
 Get the source ID. More...
 
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. More...
 

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

typedef boost::variant<int64_t, std::string> Euclid::SourceCatalog::Source::id_type

Definition at line 51 of file Source.h.

Constructor & Destructor Documentation

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.

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

Virtual default destructor.

Definition at line 64 of file Source.h.

Member Function Documentation

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
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

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

Definition at line 95 of file Source.h.

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: