52#include <lal/io/head_vector_error.hpp>
53#include <lal/io/treebank_file_error.hpp>
79 typedef std::vector<std::pair<uint64_t, head_vector_error>>
error_list;
105 m_hv_errors.emplace_back(line_number, std::move(err));
134 m_hv_errors.emplace_back(line_number, std::move(err));
Head vector error report class.
Definition head_vector_error.hpp:64
Treebank file error report class.
Definition treebank_file_error.hpp:64
bool is_error() const noexcept
Returns whether or not this is an actual error.
Definition treebank_file_error.hpp:131
Report on a treebank file.
Definition treebank_file_report.hpp:69
void add_error(const uint64_t line_number, const head_vector_error &err) noexcept
Adds an error to the list of errors.
Definition treebank_file_report.hpp:125
treebank_file_error m_treebank_error
A treebank error. Set if the file could not be opened or it does not exist.
Definition treebank_file_report.hpp:174
std::size_t get_num_errors() const noexcept
Returns the number of errors in this report.
Definition treebank_file_report.hpp:149
const error_list & get_head_vector_errors() const noexcept
Returns the list of errors in the head vectors.
Definition treebank_file_report.hpp:158
treebank_file_report() noexcept=default
Default constructor.
treebank_file_report(const uint64_t line_number, head_vector_error &&err) noexcept
Constructor with a single head vector error.
Definition treebank_file_report.hpp:104
treebank_file_report(const uint64_t line_number, const head_vector_error &err) noexcept
Constructor with a single head vector error.
Definition treebank_file_report.hpp:100
~treebank_file_report() noexcept=default
Default destructor.
void add_error(const uint64_t line_number, head_vector_error &&err) noexcept
Adds an error to the list of errors.
Definition treebank_file_report.hpp:133
void set_treebank_error(treebank_file_error &&err) noexcept
Sets the treebank error m_treebank_error.
Definition treebank_file_report.hpp:142
std::vector< std::pair< uint64_t, head_vector_error > > error_list
The error list for a trebank file.
Definition treebank_file_report.hpp:79
void set_treebank_error(const treebank_file_error &err) noexcept
Sets the treebank error m_treebank_error.
Definition treebank_file_report.hpp:138
const treebank_file_error & get_treebank_error() const noexcept
Returns the only treebank error concerning the file (if any).
Definition treebank_file_report.hpp:166
treebank_file_report(treebank_file_error &&err) noexcept
Constructor with a single head vector error.
Definition treebank_file_report.hpp:95
error_list m_hv_errors
The error in the head vector and the line number where it happened.
Definition treebank_file_report.hpp:171
Main namespace of the library.
Definition basic_types.hpp:48