Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Public Member Functions | Static Private Member Functions | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for Euclid::SourceCatalog::CastSourceIdVisitor:
Collaboration graph
[legend]

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 >
static constexpr bool Euclid::SourceCatalog::CastSourceIdVisitor::is_integer ( )
inlinestaticconstexprprivate

Definition at line 107 of file Source.h.

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

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

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