|
NIST Biometric Evaluation Framework
Software components for biometric technology evaluations
|
A convenient way to execute biometric technology evaluation API methods safely. More...
#include <be_framework_api.h>
Classes | |
| class | Result |
| The result of an operation. More... | |
Public Member Functions | |
| API () | |
| Constructor. More... | |
| Result | call (const std::function< T(void)> &operation, const std::function< void(const Result &)> &success={}, const std::function< void(const Result &)> &failure={}) |
| Invoke an operation. More... | |
| bool | protectionsEnabled () const |
| Obtain whether or not all protections enabled by this object are enabled. More... | |
| void | setProtectionsEnabled (const bool protectionsEnabled) |
| Wholesale change of process protections enabled by this object. More... | |
| bool | willRethrowExceptions () const |
| Obtain whether or not exceptions caught in call() will be rethrown. More... | |
| void | setRethrowExceptions (const bool shouldRethrow) |
| Change whether or not exceptions caught in call() should be rethrown. More... | |
| void | setCatchExceptions (const bool catchExceptions) |
Set whether or not to catch exceptions from call(), triggering the failure block. More... | |
| bool | willCatchExceptions () const |
Obtain whether or not exceptions raised in call() will be caught, triggering the failure block. More... | |
| std::shared_ptr< BiometricEvaluation::Time::Timer > | getTimer () noexcept |
| Obtain the timer object. More... | |
| std::shared_ptr< BiometricEvaluation::Time::Watchdog > | getWatchdog () noexcept |
| Obtain the watchdog timer object. More... | |
| std::shared_ptr< BiometricEvaluation::Error::SignalManager > | getSignalManager () noexcept |
| Obtain the signal manager object. More... | |
A convenient way to execute biometric technology evaluation API methods safely.
Definition at line 63 of file be_framework_api.h.
| BiometricEvaluation::Framework::API< T >::API |
Constructor.
Definition at line 451 of file be_framework_api.h.
| BiometricEvaluation::Framework::API< T >::Result BiometricEvaluation::Framework::API< T >::call | ( | const std::function< T(void)> & | operation, |
| const std::function< void(const Result &)> & | success = {}, |
||
| const std::function< void(const Result &)> & | failure = {} |
||
| ) |
Invoke an operation.
@detail Invoking operations within this method implicitly wraps the operation in a SignalManager, Watchdog, and Timer, and follows evaluation best practices for calling an API operation.
| operation | A reference to a function that returns a Status. (i.e., an API method). |
| success | Operations invoked if operation returns. |
| failure | Operations invoked if we abort the operation. |
| rethrowExceptions | Whether or not to rethrow an exception caught from operation. |
| ... | Exceptions raised from operation, if caught (willCatchExceptions() is true), are rethrown when API::willRethrowExceptions() is true. |
Definition at line 464 of file be_framework_api.h.
|
inline |
Obtain whether or not all protections enabled by this object are enabled.
Protections include:
true if all protections are enabled, false if one or more protections are disabled.Definition at line 269 of file be_framework_api.h.
|
inline |
Wholesale change of process protections enabled by this object.
Protections include:
| protectionsEnabled | true if all protections should be enabled, false if all protections should be disabled. |
Definition at line 298 of file be_framework_api.h.
|
inline |
Obtain whether or not exceptions caught in call() will be rethrown.
true if exceptions raised in call() will be rethrown, false otherwise.false. Definition at line 323 of file be_framework_api.h.
|
inline |
Change whether or not exceptions caught in call() should be rethrown.
| shouldRethrow | true if exceptions raised in call() will be rethrown, false otherwise. |
false. Definition at line 343 of file be_framework_api.h.
|
inline |
Set whether or not to catch exceptions from call(), triggering the failure block.
| catchExceptions | true if call()'s operation should be executed within a try block, false otherwise. |
Definition at line 359 of file be_framework_api.h.
|
inline |
Obtain whether or not exceptions raised in call() will be caught, triggering the failure block.
true if call()'s operation will be executed within a try block, false otherwise. Definition at line 375 of file be_framework_api.h.
|
inlinenoexcept |
|
inlinenoexcept |
Obtain the watchdog timer object.
Definition at line 404 of file be_framework_api.h.
|
inlinenoexcept |
Obtain the signal manager object.
Definition at line 419 of file be_framework_api.h.