ad_rss_map_integration
RssObjectResultValidInputRange.hpp
Go to the documentation of this file.
1 /*
2  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
3  *
4  * Copyright (C) 2018-2022 Intel Corporation
5  *
6  * SPDX-License-Identifier: LGPL-2.1-only
7  *
8  * ----------------- END LICENSE BLOCK -----------------------------------
9  */
10 
18 #pragma once
19 
20 #include <cmath>
21 #include <limits>
25 #include "spdlog/fmt/ostr.h"
26 #include "spdlog/spdlog.h"
27 
38 inline bool withinValidInputRange(::ad::rss::map::RssObjectResult const &input, bool const logErrors = true)
39 {
40  // check for generic member input ranges
41  bool inValidInputRange = true;
42  inValidInputRange = withinValidInputRange(input.object_data, logErrors)
44  if (!inValidInputRange && logErrors)
45  {
46  spdlog::error("withinValidInputRange(::ad::rss::map::RssObjectResult)>> {} has invalid member",
47  input); // LCOV_EXCL_BR_LINE
48  }
49 
50  return inValidInputRange;
51 }
bool withinValidInputRange(::ad::rss::map::RssObjectResult const &input, bool const logErrors=true)
check if the given RssObjectResult is within valid input range
Definition: RssObjectResultValidInputRange.hpp:38
DataType RssObjectResult.
Definition: RssObjectResult.hpp:47
::ad::rss::map::RssObjectData object_data
Definition: RssObjectResult.hpp:123
::ad::rss::map::RssRouteCheckResultList situation_check_results
Definition: RssObjectResult.hpp:128