![]() |
|
|||
File indexing completed on 2025-09-17 09:18:17
0001 //----------------------------------*-C++-*----------------------------------// 0002 // Copyright 2024 UT-Battelle, LLC, and other Celeritas developers. 0003 // See the top-level COPYRIGHT file for details. 0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT) 0005 //---------------------------------------------------------------------------// 0006 //! \file VecGeom/management/NullLoggerMessage.h 0007 //---------------------------------------------------------------------------// 0008 #pragma once 0009 0010 #include <ostream> 0011 #include "VecGeom/base/Global.h" 0012 0013 namespace vecgeom { 0014 0015 namespace detail { 0016 //---------------------------------------------------------------------------// 0017 /*! 0018 * Stream-like helper class that \em discards everything passed to it. 0019 * 0020 * This helper class should simply eat any messages and objects passed to it. 0021 */ 0022 class NullLoggerMessage 0023 { 0024 public: 0025 //!@{ 0026 //! \name Type aliases 0027 using StreamManip = std::ostream& (*)(std::ostream&); 0028 //!@} 0029 0030 public: 0031 // Default constructor. 0032 NullLoggerMessage() = default; 0033 0034 //! Do not print this object 0035 template<class T> 0036 VECCORE_ATT_HOST_DEVICE NullLoggerMessage& operator<<(T&&) 0037 { 0038 return *this; 0039 } 0040 0041 //! Ignore this manipulator function 0042 VECCORE_ATT_HOST_DEVICE NullLoggerMessage& operator<<(StreamManip) 0043 { 0044 return *this; 0045 } 0046 0047 //! Do not set any state 0048 VECCORE_ATT_HOST_DEVICE void setstate(std::ostream::iostate) {} 0049 }; 0050 0051 //---------------------------------------------------------------------------// 0052 } // namespace detail 0053 } // namespace vecgeom
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |