![]() |
nsbaci 1.0
|
Base result structure for all service operations. More...
#include <baseResult.h>

Public Member Functions | |
| BaseResult () | |
| Default constructor creates a successful result. | |
| BaseResult (std::vector< nsbaci::Error > errs) | |
| Constructs a result from a vector of errors. | |
| BaseResult (nsbaci::Error error) | |
| Constructs a failed result from a single error. | |
| BaseResult (BaseResult &&) noexcept=default | |
| BaseResult & | operator= (BaseResult &&) noexcept=default |
| BaseResult (const BaseResult &)=default | |
| BaseResult & | operator= (const BaseResult &)=default |
Public Attributes | |
| bool | ok |
| True if the operation succeeded. | |
| std::vector< nsbaci::Error > | errors |
| Errors encountered (empty if ok is true). | |
Base result structure for all service operations.
BaseResult provides a common interface for service operation results, encapsulating success/failure status and any associated error information. All service-specific result types should inherit from this base to ensure consistent error handling patterns throughout the application.
Usage example:
|
inlineexplicit |
Constructs a result from a vector of errors.
If the error vector is empty, the result is considered successful.
| errs | Vector of errors encountered during the operation. |
|
inlineexplicit |
Constructs a failed result from a single error.
| error | The error that caused the operation to fail. |