OpenMS
Loading...
Searching...
No Matches
IMSAlphabetParser< AlphabetElementType, Container, InputSource > Class Template Referenceabstract

An abstract templatized parser to load the data that is used to initialize Alphabet objects. More...

#include <OpenMS/CHEMISTRY/MASSDECOMPOSITION/IMS/IMSAlphabetParser.h>

Inheritance diagram for IMSAlphabetParser< AlphabetElementType, Container, InputSource >:
[legend]

Public Types

typedef Container ContainerType
 

Public Member Functions

void load (const std::string &fname)
 
virtual ContainerTypegetElements ()=0
 
virtual void parse (InputSource &is)=0
 
virtual ~IMSAlphabetParser ()
 Destructor.
 

Detailed Description

template<typename AlphabetElementType = double, typename Container = std::map<std::string, AlphabetElementType>, typename InputSource = std::istream>
class OpenMS::ims::IMSAlphabetParser< AlphabetElementType, Container, InputSource >

An abstract templatized parser to load the data that is used to initialize Alphabet objects.

AlphabetParser reads the input source, which is given as a template parameter InputSource , by load (const std::string& fname) function where fname is the source name. Loaded data can be retrieved by calling getElements().

See also
Alphabet

Member Typedef Documentation

◆ ContainerType

template<typename AlphabetElementType = double, typename Container = std::map<std::string, AlphabetElementType>, typename InputSource = std::istream>
typedef Container ContainerType

Type of data to be loaded.

Constructor & Destructor Documentation

◆ ~IMSAlphabetParser()

template<typename AlphabetElementType = double, typename Container = std::map<std::string, AlphabetElementType>, typename InputSource = std::istream>
virtual ~IMSAlphabetParser ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ getElements()

template<typename AlphabetElementType = double, typename Container = std::map<std::string, AlphabetElementType>, typename InputSource = std::istream>
virtual ContainerType & getElements ( )
pure virtual

Gets the data that was loaded.

Returns
The data.

Implemented in IMSAlphabetTextParser.

◆ load()

template<typename AlphabetElementType , typename Container , typename InputSource >
void load ( const std::string &  fname)

Loads the data from the InputSource with the name fname. If there is an error occurred while reading data from InputSource, IOException is thrown.

Parameters
[in]fnameThe name of the input source.

◆ parse()

template<typename AlphabetElementType = double, typename Container = std::map<std::string, AlphabetElementType>, typename InputSource = std::istream>
virtual void parse ( InputSource &  is)
pure virtual

Parses the the given input source is .

Parameters
[in]isThe InputSource