18 #ifndef itkLoggerThreadWrapper_h
19 #define itkLoggerThreadWrapper_h
28 #include "ITKCommonExport.h"
53 extern ITKCommon_EXPORT std::ostream &
67 template <
typename SimpleLoggerType>
82 using OutputType =
typename SimpleLoggerType::OutputType;
88 #if !defined(ITK_LEGACY_REMOVE)
91 static constexpr
OperationEnum SET_PRIORITY_LEVEL = OperationEnum::SET_PRIORITY_LEVEL;
92 static constexpr
OperationEnum SET_LEVEL_FOR_FLUSHING = OperationEnum::SET_LEVEL_FOR_FLUSHING;
93 static constexpr
OperationEnum ADD_LOG_OUTPUT = OperationEnum::ADD_LOG_OUTPUT;
107 GetPriorityLevel()
const override;
113 GetLevelForFlushing()
const override;
139 PrivateFlush()
override;
149 PrintSelf(std::ostream & os,
Indent indent)
const override;
155 std::thread m_Thread{};
157 std::atomic<bool> m_TerminationRequested{};
159 std::queue<OperationEnum> m_OperationQ{};
161 std::queue<std::string> m_MessageQ{};
163 std::queue<PriorityLevelEnum> m_LevelQ{};
165 std::queue<typename OutputType::Pointer> m_OutputQ{};
167 mutable std::mutex m_Mutex{};
175 #ifndef ITK_MANUAL_INSTANTIATION
176 # include "itkLoggerThreadWrapper.hxx"
179 #endif // itkLoggerThreadWrapper_h