iceoryx_doc  1.0.1
compatibility_check_level.hpp
1 // Copyright (c) 2020 by Robert Bosch GmbH, Apex.AI 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 // SPDX-License-Identifier: Apache-2.0
16 #ifndef IOX_POSH_VERSION_COMPATIBILITY_CHECK_LEVEL_HPP
17 #define IOX_POSH_VERSION_COMPATIBILITY_CHECK_LEVEL_HPP
18 
19 #include "iceoryx_utils/log/logstream.hpp"
20 
21 namespace iox
22 {
23 namespace version
24 {
25 enum class CompatibilityCheckLevel
26 {
27  OFF,
28  MAJOR,
29  MINOR,
30  PATCH,
31  COMMIT_ID,
32  BUILD_DATE
33 };
34 
35 inline iox::log::LogStream& operator<<(iox::log::LogStream& logstream, const version::CompatibilityCheckLevel& level)
36 {
37  switch (level)
38  {
39  case CompatibilityCheckLevel::OFF:
40  logstream << "CompatibilityCheckLevel::OFF";
41  break;
42  case CompatibilityCheckLevel::MAJOR:
43  logstream << "CompatibilityCheckLevel::MAJOR";
44  break;
45  case CompatibilityCheckLevel::MINOR:
46  logstream << "CompatibilityCheckLevel::MINOR";
47  break;
48  case CompatibilityCheckLevel::PATCH:
49  logstream << "CompatibilityCheckLevel::PATCH";
50  break;
51  case CompatibilityCheckLevel::COMMIT_ID:
52  logstream << "CompatibilityCheckLevel::COMMIT_ID";
53  break;
54  case CompatibilityCheckLevel::BUILD_DATE:
55  logstream << "CompatibilityCheckLevel::BUILD_DATE";
56  break;
57  default:
58  logstream << "CompatibilityCheckLevel::UNDEFINED";
59  break;
60  }
61  return logstream;
62 }
63 
64 } // namespace version
65 } // namespace iox
66 #endif // IOX_POSH_VERSION_COMPATIBILITY_CHECK_LEVEL_HPP
Definition: service_description.hpp:29