| OpenMS 2.5.0

Public Member Functions | Protected Member Functions | List of all members
AbsoluteQuantitationMethodFile Class Reference
Format » File IO

File adapter for AbsoluteQuantitationMethod files. More...

`#include <OpenMS/FORMAT/AbsoluteQuantitationMethodFile.h>`

Inheritance diagram for AbsoluteQuantitationMethodFile:

## Public Member Functions

| AbsoluteQuantitationMethodFile ()=default
| Default constructor. More...
| ~AbsoluteQuantitationMethodFile ()=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 &params) 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...

## Detailed Description

File adapter for AbsoluteQuantitationMethod files.

Loads and stores .csv or .tsv files describing an AbsoluteQuantitationMethod.

## Constructor & Destructor Documentation

## ◆ AbsoluteQuantitationMethodFile()

AbsoluteQuantitationMethodFile | ( |  | ) |

default

Default constructor.

## ◆ ~AbsoluteQuantitationMethodFile()

~AbsoluteQuantitationMethodFile | ( |  | ) |

default

Destructor.

## Member Function Documentation

## ◆ load()

void load | ( | const String & | filename,
|  | std::vector< AbsoluteQuantitationMethod > & | aqm_list
| ) |  |

Loads an AbsoluteQuantitationMethod file.

Exceptions

  Exception::FileNotFound | is thrown if the file could not be opened
  Exception::ParseError | is thrown if an error occurs during parsing

Parameters

  [in] | filename | The input file name.
  [out] | aqm_list | Output variable where the AbsoluteQuantitationMethod data is loaded.

## ◆ parseLine_()

void parseLine_ | ( | const StringList & | line,
|  | const std::map< String, Size > & | headers,
|  | AbsoluteQuantitationMethod & | aqm
| ) |  | const

protected

Parses a line into the members of AbsoluteQuantitationMethod.

Parameters

  [in] | line | A line of the .csv file.
  [in] | headers | A map of header strings to column positions.
  [out] | aqm | AbsoluteQuantitationMethod.

## ◆ setCastValue_()

void setCastValue_ | ( | const String & | key,
|  | const String & | value,
|  | Param & | params
| ) |  | const

protected

Helper method which takes care of converting the given value to the desired type, based on the header (here `key`) information.

Parameters

  [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

## ◆ store()

void store | ( | const String & | filename,
|  | const std::vector< AbsoluteQuantitationMethod > & | aqm_list
| ) |  |

Stores an AbsoluteQuantitationMethod file.

Exceptions

  Exception::UnableToCreateFile | is thrown if the file could not be created

Parameters

  [in] | filename | The output file name.
  [in] | aqm_list | The AbsoluteQuantitationMethod data to write into the file.