ad_rss
generated
include
ad
rss
world
LaneDrivingDirectionValidInputRange.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: LGPL-2.1-only
7
*
8
* ----------------- END LICENSE BLOCK -----------------------------------
9
*/
10
18
#pragma once
19
20
#include <cmath>
21
#include <limits>
22
#include "
ad/rss/world/LaneDrivingDirection.hpp
"
23
#include "spdlog/fmt/ostr.h"
24
#include "spdlog/spdlog.h"
25
36
inline
bool
withinValidInputRange
(::
ad::rss::world::LaneDrivingDirection
const
&input,
bool
const
logErrors =
true
)
37
{
38
bool
inValidInputRange = (input == ::ad::rss::world::LaneDrivingDirection::Bidirectional)
39
|| (input == ::
ad::rss::world::LaneDrivingDirection::Positive
)
40
|| (input == ::ad::rss::world::LaneDrivingDirection::Negative);
41
if
(!inValidInputRange && logErrors)
42
{
43
spdlog::error(
"withinValidInputRange(::ad::rss::world::LaneDrivingDirection)>> {}, raw value: {} "
,
44
input,
45
static_cast<
int32_t
>
(input));
// LCOV_EXCL_BR_LINE
46
}
47
return
inValidInputRange;
48
}
LaneDrivingDirection.hpp
ad::rss::world::LaneDrivingDirection
LaneDrivingDirection
DataType LaneDrivingDirection.
Definition:
LaneDrivingDirection.hpp:39
withinValidInputRange
bool withinValidInputRange(::ad::rss::world::LaneDrivingDirection const &input, bool const logErrors=true)
check if the given LaneDrivingDirection is within valid input range
Definition:
LaneDrivingDirectionValidInputRange.hpp:36
ad::rss::world::LaneDrivingDirection::Positive
@ Positive
Generated by
1.8.17