![]() |
nsbaci 1.0
|
Result type for file load operations. More...
#include <fileService.h>


Public Member Functions | |
| LoadResult () | |
| Default constructor creates a successful but empty result. | |
| LoadResult (nsbaci::types::Text conts, nsbaci::types::File name) | |
| Constructs a successful result with file contents. | |
| LoadResult (std::vector< nsbaci::Error > errs) | |
| Constructs a result from a vector of errors. | |
| LoadResult (nsbaci::Error error) | |
| Constructs a failed result from a single error. | |
| LoadResult (LoadResult &&) noexcept=default | |
| LoadResult & | operator= (LoadResult &&) noexcept=default |
| LoadResult (const LoadResult &)=default | |
| LoadResult & | operator= (const LoadResult &)=default |
| Public Member Functions inherited from FileResult | |
| FileResult () | |
| Default constructor creates a successful result. | |
| FileResult (std::vector< nsbaci::Error > errs) | |
| Constructs a result from a vector of errors. | |
| FileResult (nsbaci::Error error) | |
| Constructs a failed result from a single error. | |
| FileResult (FileResult &&) noexcept=default | |
| FileResult & | operator= (FileResult &&) noexcept=default |
| FileResult (const FileResult &)=default | |
| FileResult & | operator= (const FileResult &)=default |
| Public Member Functions inherited from nsbaci::BaseResult | |
| 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 | |
| nsbaci::types::Text | contents |
| The loaded file contents. | |
| nsbaci::types::File | fileName |
| The filename for display purposes. | |
| Public Attributes inherited from nsbaci::BaseResult | |
| bool | ok |
| True if the operation succeeded. | |
| std::vector< nsbaci::Error > | errors |
| Errors encountered (empty if ok is true). | |
Result type for file load operations.
Extends FileResult with the loaded file contents and filename. On successful load, contains the file contents as a string and the filename for display purposes.
|
inline |
Constructs a successful result with file contents.
| conts | The loaded file contents. |
| name | The filename (without path) for display. |

|
inlineexplicit |
Constructs a result from a vector of errors.
| errs | Vector of errors encountered during the load. |

|
inlineexplicit |
Constructs a failed result from a single error.
| error | The error that caused the load to fail. |
