|
takane
Validators for ArtifactDB file formats
|
Definitions for CSV data frames. More...
Classes | |
| struct | Parameters |
| Parameters for validating the CSV data frame. More... | |
Functions | |
| template<class Reader > | |
| CsvContents | validate (Reader &reader, const Parameters ¶ms, CsvFieldCreator *creator=NULL) |
| CsvContents | validate (const char *path, const Parameters ¶ms, CsvFieldCreator *creator=NULL) |
Definitions for CSV data frames.
|
inline |
Overload of csv_data_frame::validate() that accepts a file path.
| path | Path to the CSV file. |
| params | Validation parameters. |
| creator | Factory to create objects for holding the contents of each CSV field. Defaults to a pointer to a DummyFieldCreator instance. |
| CsvContents takane::csv_data_frame::validate | ( | Reader & | reader, |
| const Parameters & | params, | ||
| CsvFieldCreator * | creator = NULL ) |
Checks if a CSV data frame is correctly formatted. An error is raised if the file does not meet the specifications.
| Reader | A byteme reader class. |
| reader | A stream of bytes from the CSV file. |
| params | Validation parameters. |
| creator | Factory to create objects for holding the contents of each CSV field. Defaults to a pointer to a DummyFieldCreator instance. |
fields member actually contains the CSV data depends on creator. Each entry of the fields member corresponds to an entry of params.columns, which an additional field at the start if params.has_row_names = true.