#pragma once #include "ParseArgs.h" #include class BaseParameters; using michlib::real; template concept InfoSupported = requires(T t) { { t.Info() } -> std::convertible_to; }; template concept ParametersSupported = requires(T t, michlib_internal::ParameterListEx& pars, const CLArgs& args) { { t.Parameters(pars, args).first } -> std::convertible_to; }; template concept ReadPSupported = requires(T t, const MString& vname, const BaseParameters* ip, size_t i) { { t.Read(vname, ip, i)(0) } -> std::convertible_to; }; template concept ReadSupported = requires(T t, const MString& vname, size_t i) { { t.Read(vname, i)(0) } -> std::convertible_to; }; template concept ReadUVPSupported = requires(T t, const BaseParameters* ip, size_t i) { { t.ReadUV(ip, i).U(0, 0) + t.template ReadUV(ip, i).V(0, 0) } -> std::convertible_to; }; template concept IsUVData = requires(T t) { { t.U(0) } -> std::convertible_to; { t.V(0) } -> std::convertible_to; { t.U2(0) } -> std::convertible_to; }; namespace internal { template using void_ = void; template struct GetReadType_; template struct GetReadType_ { using p = BaseParameters*; using type = decltype(D().Read(MString(), p(), 0)); }; template struct GetReadType_ { using type = decltype(D().Read(MString(), 0)); }; } // namespace internal template using ReadType = internal::GetReadType_, ReadSupported>::type;