This is a collection of processes. By adding processes to this module, all processes can be started and stopped by one utility.
More...
#include "umps/modules/processManager.hpp"
This is a collection of processes. By adding processes to this module, all processes can be started and stopped by one utility.
- Copyright
- Ben Baker (University of Utah) distributed under the MIT license.
◆ ProcessManager()
UMPS::Modules::ProcessManager::ProcessManager |
( |
std::shared_ptr< UMPS::Logging::ILog > & |
logger | ) |
|
|
explicit |
Constructs a process manager with a given logger.
- Parameters
-
◆ contains() [1/2]
bool UMPS::Modules::ProcessManager::contains |
( |
const IProcess & |
process | ) |
const |
|
noexcept |
- Returns
- True indicates the process exists.
- Exceptions
-
std::invalid_argument | if process.getName() is not set. |
◆ contains() [2/2]
bool UMPS::Modules::ProcessManager::contains |
( |
const std::string & |
name | ) |
const |
|
noexcept |
- Returns
- True idicates the process exists.
◆ insert()
void UMPS::Modules::ProcessManager::insert |
( |
std::unique_ptr< IProcess > && |
process | ) |
|
Adds a process to the manager.
- Parameters
-
[in,out] | process | The process to bring under process management. Note, this class takes ownership or process. Therefore, processes's behavior on exit is undefined. |
- Exceptions
-
std::invalid_argument | if exists(process) is true; |
◆ isRunning()
bool UMPS::Modules::ProcessManager::isRunning |
( |
| ) |
const |
|
noexcept |
- Returns
- True indicates the processes are running.
The documentation for this class was generated from the following file: