| OpenMS 2.5.0

Public Member Functions | Protected Attributes | List of all members
TOPPASResources Class Reference
Visual » TOPPAS

A dictionary mapping string keys to lists of TOPPASResource objects. More...

`#include <OpenMS/VISUAL/TOPPASResources.h>`

Inheritance diagram for TOPPASResources:

## Public Member Functions

| TOPPASResources ()
| Constructor. More...
| TOPPASResources (const TOPPASResources &rhs)
| Copy constructor. More...
| ~TOPPASResources () override
| Destructor. More...
TOPPASResources & | operator= (const TOPPASResources &rhs)
| Assignment operator. More...
void | add (const QString &key, const QList< TOPPASResource > &resource_list)
| Adds the (key,resource_list) pair to the dictionary. More...
const QList< TOPPASResource > & | get (const QString &key) const
| Returns the resource list that `key` is mapped to, or an empty list if `key` does not exist. More...
void | load (const QString &file_name)
| Loads the dictionary from file `file_name`. More...
void | store (const QString &file_name)
| Writes the dictionary to file `file_name`. More...
void | clear ()
| Clears the dictionary. More...

## Protected Attributes

Map< QString, QList< TOPPASResource > > | map_
| The dictionary. More...
QList< TOPPASResource > | empty_list_
| The empty list. More...

## Detailed Description

A dictionary mapping string keys to lists of TOPPASResource objects.

## Constructor & Destructor Documentation

## ◆ TOPPASResources() [1/2]

TOPPASResources | ( |  | ) |

Constructor.

## ◆ TOPPASResources() [2/2]

TOPPASResources | ( | const TOPPASResources & | rhs | ) |

Copy constructor.

## ◆ ~TOPPASResources()

~TOPPASResources | ( |  | ) |

override

Destructor.

## Member Function Documentation

## ◆ add()

void add | ( | const QString & | key,
|  | const QList< TOPPASResource > & | resource_list
| ) |  |

Adds the (key,resource_list) pair to the dictionary.

## ◆ clear()

void clear | ( |  | ) |

Clears the dictionary.

## ◆ get()

const QList<TOPPASResource>& get | ( | const QString & | key | ) | const

Returns the resource list that `key` is mapped to, or an empty list if `key` does not exist.

## ◆ load()

void load | ( | const QString & | file_name | ) |

Loads the dictionary from file `file_name`.

Referenced by TOPPASBase::loadPipelineResourceFile().

## ◆ operator=()

TOPPASResources& operator= | ( | const TOPPASResources & | rhs | ) |

Assignment operator.

## ◆ store()

void store | ( | const QString & | file_name | ) |

Writes the dictionary to file `file_name`.

Referenced by TOPPASBase::savePipelineResourceFile().

## Member Data Documentation

## ◆ empty_list_

QList<TOPPASResource> empty_list_

protected

The empty list.

## ◆ map_

Map<QString, QList<TOPPASResource> > map_

protected

The dictionary.