Alexandria 2.31.4
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Euclid::SourceCatalog::CastSourceIdVisitor Class Reference

This type can be used together with boost::apply_visitor to cast boost::variant with an unknown underlying type, to a Source::id_type. More...

#include <Source.h>

Inheritance diagram for Euclid::SourceCatalog::CastSourceIdVisitor:
Collaboration diagram for Euclid::SourceCatalog::CastSourceIdVisitor:

Public Member Functions

 CastSourceIdVisitor ()=default
Source::id_type operator() (const std::string &from) const
template<typename From>
Source::id_type operator() (const From &from, typename std::enable_if< is_integer< From >()>::type *=0) const
template<typename From>
Source::id_type operator() (const From &, typename std::enable_if<!is_integer< From >()>::type *=0) const

Static Private Member Functions

template<typename From>
static constexpr bool is_integer ()

Detailed Description

This type can be used together with boost::apply_visitor to cast boost::variant with an unknown underlying type, to a Source::id_type.

Definition at line 105 of file Source.h.

Constructor & Destructor Documentation

◆ CastSourceIdVisitor()

Euclid::SourceCatalog::CastSourceIdVisitor::CastSourceIdVisitor ( )
default

Member Function Documentation

◆ is_integer()

template<typename From>
constexpr bool Euclid::SourceCatalog::CastSourceIdVisitor::is_integer ( )
inlinestaticconstexprprivate

Definition at line 107 of file Source.h.

Referenced by operator()(), and operator()().

◆ operator()() [1/3]

template<typename From>
Source::id_type Euclid::SourceCatalog::CastSourceIdVisitor::operator() ( const From & ,
typename std::enable_if<!is_integer< From >()>::type * = 0 ) const
inline

Definition at line 124 of file Source.h.

References is_integer().

Here is the call graph for this function:

◆ operator()() [2/3]

template<typename From>
Source::id_type Euclid::SourceCatalog::CastSourceIdVisitor::operator() ( const From & from,
typename std::enable_if< is_integer< From >()>::type * = 0 ) const
inline

Definition at line 119 of file Source.h.

References is_integer().

Here is the call graph for this function:

◆ operator()() [3/3]

Source::id_type Euclid::SourceCatalog::CastSourceIdVisitor::operator() ( const std::string & from) const
inline

Definition at line 114 of file Source.h.


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