Autoware.Auto
variable.hpp
Go to the documentation of this file.
1 // Copyright 2021 the Autoware Foundation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //    http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 // Developed by Apex.AI, Inc.
16 
21 
22 #ifndef STATE_VECTOR__VARIABLE_HPP_
23 #define STATE_VECTOR__VARIABLE_HPP_
24 
26 
27 #include <type_traits>
28 
29 
30 namespace autoware
31 {
32 namespace common
33 {
34 namespace state_vector
35 {
36 
40 struct STATE_VECTOR_PUBLIC Variable {};
41 
47 struct STATE_VECTOR_PUBLIC AngleVariable : Variable {};
48 
54 template<typename T>
55 struct STATE_VECTOR_PUBLIC is_variable : std::conditional_t<
56  std::is_base_of<Variable, T>::value, std::true_type, std::false_type> {};
57 
63 template<typename T>
64 struct STATE_VECTOR_PUBLIC is_angle : std::conditional_t<
65  std::is_base_of<AngleVariable, T>::value, std::true_type, std::false_type> {};
66 
67 
68 } // namespace state_vector
69 } // namespace common
70 } // namespace autoware
71 
72 #endif // STATE_VECTOR__VARIABLE_HPP_
autoware::common::state_vector::AngleVariable
A tag struct used to disambiguate variables that store angles from other types.
Definition: variable.hpp:47
autoware::common::state_vector::is_angle
A trait to check if a variable represents an angle.
Definition: variable.hpp:64
autoware::common::state_vector::is_variable
A trait to check if a type is a variable by checking if it inherits from Variable.
Definition: variable.hpp:55
autoware
This file defines the lanelet2_map_provider_node class.
Definition: quick_sort.hpp:24
autoware::common::state_vector::Variable
A tag struct used to disambiguate variables from other types.
Definition: variable.hpp:40
visibility_control.hpp