ad_rss
generated
include
ad
rss
world
ObjectValidInputRange.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/Object.hpp
"
23
#include "
ad/rss/world/ObjectStateValidInputRange.hpp
"
24
#include "
ad/rss/world/ObjectTypeValidInputRange.hpp
"
25
#include "
ad/rss/world/OccupiedRegionVectorValidInputRange.hpp
"
26
#include "
ad/rss/world/VelocityValidInputRange.hpp
"
27
#include "spdlog/fmt/ostr.h"
28
#include "spdlog/spdlog.h"
29
40
inline
bool
withinValidInputRange
(::
ad::rss::world::Object
const
&input,
bool
const
logErrors =
true
)
41
{
42
// check for generic member input ranges
43
bool
inValidInputRange =
true
;
44
inValidInputRange =
withinValidInputRange
(input.
objectType
, logErrors)
45
&&
withinValidInputRange
(input.
occupiedRegions
, logErrors) &&
withinValidInputRange
(input.
velocity
, logErrors)
46
&&
withinValidInputRange
(input.
state
, logErrors);
47
if
(!inValidInputRange && logErrors)
48
{
49
spdlog::error(
"withinValidInputRange(::ad::rss::world::Object)>> {} has invalid member"
,
50
input);
// LCOV_EXCL_BR_LINE
51
}
52
53
return
inValidInputRange;
54
}
ad::rss::world::Object::state
::ad::rss::world::ObjectState state
Definition:
Object.hpp:146
Object.hpp
ad::rss::world::Object::objectType
::ad::rss::world::ObjectType objectType
Definition:
Object.hpp:131
withinValidInputRange
bool withinValidInputRange(::ad::rss::world::Object const &input, bool const logErrors=true)
check if the given Object is within valid input range
Definition:
ObjectValidInputRange.hpp:40
OccupiedRegionVectorValidInputRange.hpp
VelocityValidInputRange.hpp
ad::rss::world::Object
DataType Object.
Definition:
Object.hpp:48
ObjectTypeValidInputRange.hpp
ObjectStateValidInputRange.hpp
ad::rss::world::Object::occupiedRegions
::ad::rss::world::OccupiedRegionVector occupiedRegions
Definition:
Object.hpp:136
ad::rss::world::Object::velocity
::ad::rss::world::Velocity velocity
Definition:
Object.hpp:141
Generated by
1.8.17