Alexandria  2.16
Please provide a description of the project.
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:
[legend]
Collaboration diagram for Euclid::SourceCatalog::CastSourceIdVisitor:
[legend]

Public Member Functions

 CastSourceIdVisitor ()
 
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 109 of file Source.h.

Constructor & Destructor Documentation

◆ CastSourceIdVisitor()

Euclid::SourceCatalog::CastSourceIdVisitor::CastSourceIdVisitor ( )
inline

Definition at line 116 of file Source.h.

Member Function Documentation

◆ is_integer()

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

Definition at line 111 of file Source.h.

◆ operator()() [1/3]

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

Definition at line 118 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 123 of file Source.h.

◆ operator()() [3/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 128 of file Source.h.


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