scenario_simulator_v2 C++ API
double.hpp
Go to the documentation of this file.
1 // Copyright 2015 TIER IV, Inc. All rights reserved.
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 #ifndef OPENSCENARIO_INTERPRETER__SYNTAX__DOUBLE_HPP_
16 #define OPENSCENARIO_INTERPRETER__SYNTAX__DOUBLE_HPP_
17 
18 #include <string>
19 
21 {
22 inline namespace syntax
23 {
24 struct Double
25 {
26  using value_type = double;
27 
29 
30  Double() = default;
31 
33 
34  explicit Double(const std::string &);
35 
36  static auto infinity() noexcept -> Double;
37 
38  static auto nan() noexcept -> Double;
39 
40  static auto max() noexcept -> Double;
41 
42  static auto lowest() noexcept -> Double;
43 
44  auto operator=(const value_type & rhs) noexcept -> Double &;
45 
46  auto operator+=(const value_type & rhs) noexcept -> Double &;
47 
48  auto operator*=(const value_type & rhs) noexcept -> Double &;
49 
50  operator value_type() const noexcept;
51 };
52 
53 auto operator>>(std::istream &, Double &) -> std::istream &;
54 
55 auto operator<<(std::ostream &, const Double &) -> std::ostream &;
56 } // namespace syntax
57 } // namespace openscenario_interpreter
58 
59 #endif // OPENSCENARIO_INTERPRETER__SYNTAX__DOUBLE_HPP_
Definition: escape_sequence.hpp:22
Definition: cache.hpp:27
std::string string
Definition: junit5.hpp:26
Definition: double.hpp:25
double value_type
Definition: double.hpp:26
static auto nan() noexcept -> Double
Definition: double.cpp:44
static auto infinity() noexcept -> Double
Definition: double.cpp:39
static auto lowest() noexcept -> Double
Definition: double.cpp:54
static auto max() noexcept -> Double
Definition: double.cpp:49
value_type data
Definition: double.hpp:28