OpenMS
|
File adapter for AbsoluteQuantitationMethod files. More...
#include <OpenMS/FORMAT/AbsoluteQuantitationMethodFile.h>
Public Member Functions | |
AbsoluteQuantitationMethodFile ()=default | |
Default constructor. More... | |
~AbsoluteQuantitationMethodFile () override=default | |
Destructor. More... | |
void | load (const String &filename, std::vector< AbsoluteQuantitationMethod > &aqm_list) |
Loads an AbsoluteQuantitationMethod file. More... | |
void | store (const String &filename, const std::vector< AbsoluteQuantitationMethod > &aqm_list) |
Stores an AbsoluteQuantitationMethod file. More... | |
Protected Member Functions | |
void | parseLine_ (const StringList &line, const std::map< String, Size > &headers, AbsoluteQuantitationMethod &aqm) const |
Parses a line into the members of AbsoluteQuantitationMethod. More... | |
void | setCastValue_ (const String &key, const String &value, Param ¶ms) const |
Helper method which takes care of converting the given value to the desired type, based on the header (here `key`) information. More... | |
Additional Inherited Members | |
Private Member Functions inherited from CsvFile | |
CsvFile () | |
Default constructor. More... | |
~CsvFile () override | |
destructor More... | |
CsvFile (const String &filename, char is=',', bool ie=false, Int first_n=-1) | |
Constructor with filename. More... | |
void | load (const String &filename, char is=',', bool ie=false, Int first_n=-1) |
Loads data from a text file. More... | |
void | store (const String &filename) |
Stores the buffer's content into a file. More... | |
void | addRow (const StringList &list) |
Add a row to the buffer. More... | |
void | clear () |
Clears the buffer. More... | |
bool | getRow (Size row, StringList &list) |
writes all items from a row to list More... | |
std::vector< String >::size_type | rowCount () const |
Returns the number of rows that were loaded from the file. More... | |
File adapter for AbsoluteQuantitationMethod files.
Loads and stores .csv or .tsv files describing an AbsoluteQuantitationMethod.
|
default |
Default constructor.
|
overridedefault |
Destructor.
void load | ( | const String & | filename, |
std::vector< AbsoluteQuantitationMethod > & | aqm_list | ||
) |
Loads an AbsoluteQuantitationMethod file.
Exception::FileNotFound | is thrown if the file could not be opened |
Exception::ParseError | is thrown if an error occurs during parsing |
[in] | filename | The input file name. |
[out] | aqm_list | Output variable where the AbsoluteQuantitationMethod data is loaded. |
|
protected |
Parses a line into the members of AbsoluteQuantitationMethod.
[in] | line | A line of the .csv file. |
[in] | headers | A map of header strings to column positions. |
[out] | aqm | AbsoluteQuantitationMethod. |
Helper method which takes care of converting the given value to the desired type, based on the header (here `key`) information.
[in] | key | The header name with which the correct conversion is chosen |
[in] | value | The value to be converted |
[in,out] | params | The object where the new value is saved |
void store | ( | const String & | filename, |
const std::vector< AbsoluteQuantitationMethod > & | aqm_list | ||
) |
Stores an AbsoluteQuantitationMethod file.
Exception::UnableToCreateFile | is thrown if the file could not be created |
[in] | filename | The output file name. |
[in] | aqm_list | The AbsoluteQuantitationMethod data to write into the file. |