astrotypes  0.0
Classes | Namespaces | Functions
BoostDurationCast.h File Reference
#include "TimeUnits.h"
#include <chrono>
#include "detail/BoostDurationCast.cpp"
Include dependency graph for BoostDurationCast.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pss::astrotypes::units::boost_unit_to_std_ratio< BoostUnit >
 conversion helper from boost time units to the std::chrono::duration::period equivalent More...
 
struct  pss::astrotypes::units::has_equivalent_unit< BoostType, ChronoType >
 determine is the units of the chrono::duration and the boost::quatity are equivalent More...
 
struct  pss::astrotypes::units::has_equivalent_rep< BoostType, ChronoType >
 determine is the NumericalRep of the chrono::duration and the boost::quatity are equivalent More...
 
struct  pss::astrotypes::units::is_equivalent< BoostType, ChronoType >
 determine is the boost::quanity and the std::chrono:;duration are equivalent reperesentations i.e. both in unit and numerical representation More...
 

Namespaces

 pss
 
 pss::astrotypes
 
 pss::astrotypes::units
 

Functions

template<typename BoostQuantity , typename ChronoNumericalRep , typename PeriodType >
constexpr std::enable_if< boost::units::is_quantity< BoostQuantity >::value &&boost::units::is_unit_of_dimension< typename BoostQuantity::unit_type, boost::units::time_dimension >::value &&!is_equivalent< BoostQuantity, std::chrono::duration< ChronoNumericalRep, PeriodType > >::value, BoostQuantity >::type pss::astrotypes::units::duration_cast (const std::chrono::duration< ChronoNumericalRep, PeriodType > &duration)
 Mimic the std::duration_cast to convert to/from boost::units::quantity<time, X> tyeps. More...
 
template<typename BoostQuantity , typename ChronoNumericalRep , typename PeriodType >
constexpr std::enable_if< boost::units::is_quantity< BoostQuantity >::value &&boost::units::is_unit_of_dimension< typename BoostQuantity::unit_type, boost::units::time_dimension >::value &&is_equivalent< BoostQuantity, std::chrono::duration< ChronoNumericalRep, PeriodType > >::value, BoostQuantity & >::type pss::astrotypes::units::duration_cast (std::chrono::duration< ChronoNumericalRep, PeriodType > &duration)
 
template<typename BoostQuantity , typename ChronoNumericalRep , typename PeriodType >
constexpr std::enable_if< boost::units::is_quantity< BoostQuantity >::value &&boost::units::is_unit_of_dimension< typename BoostQuantity::unit_type, boost::units::time_dimension >::value &&is_equivalent< BoostQuantity, std::chrono::duration< ChronoNumericalRep, PeriodType > >::value, const BoostQuantity & >::type pss::astrotypes::units::duration_cast (const std::chrono::duration< ChronoNumericalRep, PeriodType > &duration)
 
template<typename ChronoDuration , typename BoostNumericalRep , typename BoostUnit >
constexpr std::enable_if<!boost::units::is_quantity< ChronoDuration >::value &&boost::units::is_unit_of_dimension< BoostUnit, boost::units::time_dimension >::value &&!is_equivalent< boost::units::quantity< BoostUnit, BoostNumericalRep >, ChronoDuration >::value, ChronoDuration >::type pss::astrotypes::units::duration_cast (const boost::units::quantity< BoostUnit, BoostNumericalRep > &duration)
 
template<typename ChronoDuration , typename BoostNumericalRep , typename BoostUnit >
constexpr std::enable_if<!boost::units::is_quantity< ChronoDuration >::value &&boost::units::is_unit_of_dimension< BoostUnit, boost::units::time_dimension >::value &&is_equivalent< boost::units::quantity< BoostUnit, BoostNumericalRep >, ChronoDuration >::value, ChronoDuration & >::type pss::astrotypes::units::duration_cast (boost::units::quantity< BoostUnit, BoostNumericalRep > &duration)
 
template<typename ChronoDuration , typename BoostNumericalRep , typename BoostUnit >
constexpr std::enable_if< boost::units::is_unit_of_dimension< BoostUnit, boost::units::time_dimension >::value &&is_equivalent< boost::units::quantity< BoostUnit, BoostNumericalRep >, ChronoDuration >::value, const ChronoDuration & >::type pss::astrotypes::units::duration_cast (const boost::units::quantity< BoostUnit, BoostNumericalRep > &duration)
 
template<typename BoostDuration , typename BoostNumericalRep , typename BoostUnit >
constexpr std::enable_if< boost::units::is_quantity< BoostDuration >::value &&!is_equivalent< boost::units::quantity< BoostUnit, BoostNumericalRep >, BoostDuration >::value, BoostDuration >::type pss::astrotypes::units::duration_cast (boost::units::quantity< BoostUnit, BoostNumericalRep > const &duration)