Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-27 07:23:57

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 // Project include(s)
0012 #include "detray/definitions/detail/qualifiers.hpp"
0013 
0014 // System include(s)
0015 #include <cstdint>
0016 #include <ostream>
0017 
0018 namespace detray::actor {
0019 
0020 enum class status : std::uint8_t {
0021   e_notify = 0u,
0022   e_success = 1u,
0023   e_unknown = 2u,
0024   e_failure = 3u,
0025 };
0026 
0027 // Print the values of an enum by identifier
0028 #define ENUM_PRINT(x) \
0029   case x:             \
0030     os << #x;         \
0031     break
0032 
0033 DETRAY_HOST inline std::ostream& operator<<(std::ostream& os, status s) {
0034   switch (s) {
0035     using enum status;
0036     ENUM_PRINT(e_notify);
0037     ENUM_PRINT(e_success);
0038     ENUM_PRINT(e_unknown);
0039     ENUM_PRINT(e_failure);
0040   }
0041   return os;
0042 }
0043 
0044 #undef ENUM_PRINT
0045 }  // namespace detray::actor