|
ifw-daq
3.0.0-pre2
IFW Data Acquisition modules
|
Combined fake/mock. More...
#include <mockAsyncProcess.hpp>
Inheritance diagram for daq::MockAsyncProcess:Public Types | |
| using | SigOutStream = boost::signals2::signal< void(pid_t, std::string const &)> |
| Signal type for stdout/stderr signals. More... | |
Public Types inherited from daq::AsyncProcessIf | |
| using | SigOutStream = boost::signals2::signal< void(pid_t, std::string const &)> |
| Signal type for stdout/stderr signals. More... | |
Public Member Functions | |
| virtual boost::future< int > | Initiate () override |
| Initiates async operation by executing the specified process. More... | |
| MOCK_METHOD (std::optional< pid_t >, GetPid,(),(const, noexcept, override)) | |
| MOCK_METHOD (std::error_code, Abort,(),(noexcept, override)) | |
| MOCK_METHOD (std::error_code, Signal,(int),(override, noexcept)) | |
| MOCK_METHOD (std::vector< std::string > const &, GetArguments,(),(const, override, noexcept)) | |
| MOCK_METHOD (bool, IsRunning,(),(const, noexcept, override)) | |
| boost::signals2::connection | ConnectStdout (SigOutStream::slot_type const &slot) override |
| Connect slot to line-buffered stdout signal. More... | |
| boost::signals2::connection | ConnectStderr (SigOutStream::slot_type const &slot) override |
| Connect slot to line-buffered stderr signal. More... | |
Public Member Functions inherited from daq::AsyncProcessIf | |
| virtual | ~AsyncProcessIf () |
| virtual std::optional< pid_t > | GetPid () const noexcept=0 |
| Get PID. More... | |
| virtual std::error_code | Abort () noexcept=0 |
| Aborts the operation by terminating process which completes the operation. More... | |
| virtual std::error_code | Signal (int sig) noexcept=0 |
| Send signal to process. More... | |
| virtual std::vector< std::string > const & | GetArguments () const noexcept=0 |
| virtual bool | IsRunning () const noexcept=0 |
Public Attributes | |
| SigOutStream | stdout |
| SigOutStream | stderr |
| boost::promise< int > | promise |
Combined fake/mock.
Definition at line 21 of file mockAsyncProcess.hpp.
| using daq::AsyncProcessIf::SigOutStream = boost::signals2::signal<void(pid_t, std::string const&)> |
Signal type for stdout/stderr signals.
Definition at line 82 of file asyncProcess.hpp.
|
inlineoverridevirtual |
Connect slot to line-buffered stderr signal.
Signal is invoked for every line read from process.
Implements daq::AsyncProcessIf.
Definition at line 36 of file mockAsyncProcess.hpp.
|
inlineoverridevirtual |
Connect slot to line-buffered stdout signal.
Signal is invoked for every line read from process.
Implements daq::AsyncProcessIf.
Definition at line 33 of file mockAsyncProcess.hpp.
|
inlineoverridevirtual |
Initiates async operation by executing the specified process.
This can only be called once.
Implements daq::AsyncProcessIf.
Definition at line 22 of file mockAsyncProcess.hpp.
| daq::MockAsyncProcess::MOCK_METHOD | ( | bool | , |
| IsRunning | , | ||
| () | , | ||
| (const, noexcept, override) | |||
| ) |
| daq::MockAsyncProcess::MOCK_METHOD | ( | std::error_code | , |
| Abort | , | ||
| () | , | ||
| (noexcept, override) | |||
| ) |
| daq::MockAsyncProcess::MOCK_METHOD | ( | std::error_code | , |
| Signal | , | ||
| (int) | , | ||
| (override, noexcept) | |||
| ) |
| daq::MockAsyncProcess::MOCK_METHOD | ( | std::optional< pid_t > | , |
| GetPid | , | ||
| () | , | ||
| (const, noexcept, override) | |||
| ) |
| daq::MockAsyncProcess::MOCK_METHOD | ( | std::vector< std::string > const & | , |
| GetArguments | , | ||
| () | , | ||
| (const, override, noexcept) | |||
| ) |
| boost::promise<int> daq::MockAsyncProcess::promise |
Definition at line 42 of file mockAsyncProcess.hpp.
| SigOutStream daq::MockAsyncProcess::stderr |
Definition at line 41 of file mockAsyncProcess.hpp.
| SigOutStream daq::MockAsyncProcess::stdout |
Definition at line 40 of file mockAsyncProcess.hpp.