ad_map_access
MapMatchedObjectReferencePositionListValidInputRange.hpp
Go to the documentation of this file.
1 /*
2  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
3  *
4  * Copyright (C) 2018-2020 Intel Corporation
5  *
6  * SPDX-License-Identifier: MIT
7  *
8  * ----------------- END LICENSE BLOCK -----------------------------------
9  */
10 
18 #pragma once
19 
20 #include <cmath>
21 #include <limits>
24 #include "spdlog/fmt/ostr.h"
25 #include "spdlog/spdlog.h"
26 
40  bool const logErrors = true)
41 {
42  (void)input;
43  (void)logErrors;
44  bool inValidInputRange = true;
45 
46  if (inValidInputRange)
47  {
48  for (auto const &member : input)
49  {
50  bool memberInValidInputRange = withinValidInputRange(member, logErrors);
51  inValidInputRange = inValidInputRange && memberInValidInputRange;
52  if (!memberInValidInputRange && logErrors)
53  {
54  spdlog::error(
55  "withinValidInputRange(::ad::map::match::MapMatchedObjectReferencePositionList)>> {}, invalid member {}",
56  input,
57  member); // LCOV_EXCL_BR_LINE
58  }
59  }
60  }
61  return inValidInputRange;
62 }
ad::map::match::MapMatchedObjectReferencePositionList
std::vector<::ad::map::match::MapMatchedPositionConfidenceList > MapMatchedObjectReferencePositionList
DataType MapMatchedObjectReferencePositionList.
Definition: MapMatchedObjectReferencePositionList.hpp:44
withinValidInputRange
bool withinValidInputRange(::ad::map::match::MapMatchedObjectReferencePositionList const &input, bool const logErrors=true)
check if the given MapMatchedObjectReferencePositionList is within valid input range
Definition: MapMatchedObjectReferencePositionListValidInputRange.hpp:39
MapMatchedPositionConfidenceListValidInputRange.hpp
MapMatchedObjectReferencePositionList.hpp