ifw-daq  2.1.0-pre1
IFW Data Acquisition modules
utility.hpp
Go to the documentation of this file.
1 /**
2  * @file
3  * @ingroup daq_ocm
4  * @copyright 2022 ESO - European Southern Observatory
5  *
6  * @brief Declaration of utilities
7  */
8 #ifndef DAQ_UTILITY_HPP_
9 #define DAQ_UTILITY_HPP_
10 
11 namespace daq {
12 
13 /**
14  * Utility class that represents a result and an error.
15  */
16 template<class T=void, class ErrorType=bool>
17 struct Result {
18  ErrorType error;
19  T result;
20 };
21 
22 template<>
23 struct Result<void> {
24  bool error;
25 };
26 }
27 
28 #endif // #ifndef DAQ_UTILITY_HPP_
daq::Result::result
T result
Definition: utility.hpp:19
daq::Result< void >::error
bool error
Definition: utility.hpp:24
daq
Definition: asyncProcess.cpp:15
daq::Result
Utility class that represents a result and an error.
Definition: utility.hpp:17
daq::Result::error
ErrorType error
Definition: utility.hpp:18