...
This commit is contained in:
@@ -11,7 +11,8 @@
|
||||
#include <concepts>
|
||||
|
||||
|
||||
#include "mcc_traits.h"
|
||||
// #include "mcc_traits.h"
|
||||
#include "mcc_angle.h"
|
||||
|
||||
namespace mcc
|
||||
{
|
||||
@@ -20,16 +21,16 @@ namespace mcc
|
||||
// mount construction type (only the most common ones)
|
||||
enum class MccMountType : uint8_t { GERMAN_TYPE, FORK_TYPE, CROSSAXIS_TYPE, ALTAZ_TYPE };
|
||||
|
||||
enum MccCoordPairKind : size_t {
|
||||
COORDS_KIND_GENERIC,
|
||||
COORDS_KIND_RADEC_ICRS,
|
||||
COORDS_KIND_RADEC_APP,
|
||||
COORDS_KIND_HADEC_APP,
|
||||
COORDS_KIND_AZZD,
|
||||
COORDS_KIND_AZALT,
|
||||
COORDS_KIND_XY,
|
||||
COORDS_KIND_LATLON
|
||||
};
|
||||
// enum MccCoordPairKind : size_t {
|
||||
// COORDS_KIND_GENERIC,
|
||||
// COORDS_KIND_RADEC_ICRS,
|
||||
// COORDS_KIND_RADEC_APP,
|
||||
// COORDS_KIND_HADEC_APP,
|
||||
// COORDS_KIND_AZZD,
|
||||
// COORDS_KIND_AZALT,
|
||||
// COORDS_KIND_XY,
|
||||
// COORDS_KIND_LATLON
|
||||
// };
|
||||
|
||||
|
||||
/* FLOATING-POINT LIKE CLASS CONCEPT */
|
||||
@@ -165,14 +166,13 @@ protected:
|
||||
|
||||
|
||||
template <typename T>
|
||||
concept mcc_ast_engine_c =
|
||||
std::derived_from<T, mcc_CCTE_interface_t<typename T::error_t>> && requires(const T t_const, T t) {
|
||||
{ t_const.name() } -> std::formattable<char>;
|
||||
concept mcc_ccte_c = std::derived_from<T, mcc_CCTE_interface_t<typename T::error_t>> && requires(const T t_const, T t) {
|
||||
{ t_const.name() } -> std::formattable<char>;
|
||||
|
||||
requires mcc_refract_model_c<typename T::refract_model_t>;
|
||||
requires mcc_refract_model_c<typename T::refract_model_t>;
|
||||
|
||||
{ t.refractionModel(std::declval<typename T::refract_model_t*>()) } -> std::same_as<typename T::error_t>;
|
||||
};
|
||||
{ t.refractionModel(std::declval<typename T::refract_model_t*>()) } -> std::same_as<typename T::error_t>;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -303,7 +303,8 @@ struct mcc_pzone_interface_t {
|
||||
|
||||
template <std::derived_from<mcc_pzone_interface_t> SelfT, typename InputT>
|
||||
RetT inPZone(this SelfT&& self, InputT coords, bool* result)
|
||||
requires(mcc_eqt_hrz_coord_c<InputT> || mcc_celestial_point_c<InputT>)
|
||||
requires(mcc_eqt_hrz_coord_c<InputT> || mcc_celestial_point_c<InputT>) &&
|
||||
requires { self.inPZone(coords, result); }
|
||||
{
|
||||
return std::forward<SelfT>(self).InPZone(std::move(coords), result);
|
||||
}
|
||||
@@ -311,14 +312,16 @@ struct mcc_pzone_interface_t {
|
||||
|
||||
template <std::derived_from<mcc_pzone_interface_t> SelfT, typename InputT>
|
||||
RetT timeToPZone(this SelfT&& self, InputT coords, traits::mcc_time_duration_c auto* res_time)
|
||||
requires(mcc_eqt_hrz_coord_c<InputT> || mcc_celestial_point_c<InputT>)
|
||||
requires(mcc_eqt_hrz_coord_c<InputT> || mcc_celestial_point_c<InputT>) &&
|
||||
requires { self.timeToPZone(coords, res_time); }
|
||||
{
|
||||
return std::forward<SelfT>(self).timeToPZone(std::move(coords), res_time);
|
||||
}
|
||||
|
||||
template <std::derived_from<mcc_pzone_interface_t> SelfT, typename InputT>
|
||||
RetT timeFromPZone(this SelfT&& self, InputT coords, traits::mcc_time_duration_c auto* res_time)
|
||||
requires(mcc_eqt_hrz_coord_c<InputT> || mcc_celestial_point_c<InputT>)
|
||||
requires(mcc_eqt_hrz_coord_c<InputT> || mcc_celestial_point_c<InputT>) &&
|
||||
requires { self.timeFromPZone(coords, res_time); }
|
||||
{
|
||||
return std::forward<SelfT>(self).timeFromPZone(std::move(coords), res_time);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user