...
This commit is contained in:
@@ -144,6 +144,8 @@ public:
|
||||
return MccPZoneContainerErrorCode::ERROR_OK;
|
||||
});
|
||||
|
||||
_names.push_back(std::format("{}", zone.pzoneName));
|
||||
|
||||
return _inZoneFunc.size();
|
||||
}
|
||||
|
||||
@@ -152,9 +154,16 @@ public:
|
||||
_inZoneFunc.clear();
|
||||
_timeToZoneFunc.clear();
|
||||
_timeFromZoneFunc.clear();
|
||||
|
||||
_names.clear();
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::string> pzoneNames() const
|
||||
{
|
||||
return _names;
|
||||
}
|
||||
|
||||
error_t inPZone(mcc_skypoint_c auto const& coords, bool* at_least_one, std::ranges::output_range<bool> auto* result)
|
||||
{
|
||||
auto err = forEach(_inZoneFunc, coords, result);
|
||||
@@ -188,9 +197,11 @@ public:
|
||||
protected:
|
||||
typedef std::chrono::nanoseconds duration_t;
|
||||
|
||||
std::vector<std::function<error_t(MccSkyPoint const& pt, bool*)>> _inZoneFunc;
|
||||
std::vector<std::function<error_t(MccSkyPoint const& pt, duration_t*)>> _timeToZoneFunc;
|
||||
std::vector<std::function<error_t(MccSkyPoint const& pt, duration_t*)>> _timeFromZoneFunc;
|
||||
std::vector<std::function<error_t(MccSkyPoint const& pt, bool*)>> _inZoneFunc{};
|
||||
std::vector<std::function<error_t(MccSkyPoint const& pt, duration_t*)>> _timeToZoneFunc{};
|
||||
std::vector<std::function<error_t(MccSkyPoint const& pt, duration_t*)>> _timeFromZoneFunc{};
|
||||
|
||||
std::vector<std::string> _names{};
|
||||
|
||||
error_t forEach(auto& func_cont, MccSkyPoint const& pt, auto* result)
|
||||
{
|
||||
@@ -205,7 +216,7 @@ protected:
|
||||
|
||||
res_elem_t res_elem;
|
||||
|
||||
size_t res_sz = std::ranges::size(*result);
|
||||
// size_t res_sz = std::ranges::size(*result);
|
||||
auto it = result->begin();
|
||||
|
||||
for (auto& func : func_cont) {
|
||||
|
||||
Reference in New Issue
Block a user