Report on a treebank file.
More...
#include <treebank_file_report.hpp>
|
error_list | m_hv_errors |
| The error in the head vector and the line number where it happened.
|
|
treebank_file_error | m_treebank_error |
| A treebank error. Set if the file could not be opened or it does not exist.
|
|
Report on a treebank file.
Stores a list of errors concerning a treebank file and its contents. If the treebank file could not be opened, then the treebank error is set (see m_treebank_error and lal::io::treebank_file_error::is_error).
Only when the treebank could be opened (and thus the treebank error is never set) does this class contain a valid (possibly empty) list of errors of head vectors (see m_hv_errors).
◆ error_list
The error list for a trebank file.
A list of pairs where
- The first field is the line number where the error is found.
- The second field is the actual error in the head vector.
◆ add_error() [1/2]
void lal::io::treebank_file_report::add_error |
( |
const uint64_t | line_number, |
|
|
const head_vector_error & | err ) |
|
inlinenoexcept |
Adds an error to the list of errors.
- Parameters
-
line_number | Line number of the treebank file where the error is. |
err | Error to add. |
◆ add_error() [2/2]
void lal::io::treebank_file_report::add_error |
( |
const uint64_t | line_number, |
|
|
head_vector_error && | err ) |
|
inlinenoexcept |
Adds an error to the list of errors.
- Parameters
-
line_number | Line number of the treebank file where the error is. |
err | Error to add. |
◆ get_head_vector_errors()
const error_list & lal::io::treebank_file_report::get_head_vector_errors |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Returns the list of errors in the head vectors.
If the list returned is empty, then there were no errors.
◆ get_treebank_error()
Returns the only treebank error concerning the file (if any).
- Returns
- An error that informs that the file does not exist or that it could not be opened.
The documentation for this class was generated from the following file: