#include <constant_mapping.h>
|
const Value & | get (const Key &key, const Value &default_value) const |
|
template<class Key, class Value>
class illumina::interop::util::constant_mapping< Key, Value >
A singleton that maps a key to a value
static const constant_mapping<Key, Value>& fmapping |
( |
const std::pair< Key, Value > * |
pairs, |
|
|
size_t |
pair_count |
|
) |
| |
|
inlinestatic |
Get instance of singleton
- Parameters
-
pairs | array of values mapping Key to Value |
pair_count | number of pairs in array |
- Returns
- instance of singleton
const Value& get |
( |
const Key & |
key, |
|
|
const Value & |
default_value |
|
) |
| const |
|
inline |
Get the value corresponding to the key or default_value if none exists
- Parameters
-
key | key to search for in mapping |
default_value | value to return if the key is not found |
- Returns
- value found (or default_value)
static const constant_mapping<Key, Value>& rmapping |
( |
const std::pair< Value, Key > * |
pairs, |
|
|
size_t |
pair_count |
|
) |
| |
|
inlinestatic |
Get instance of singleton
- Note
- This reverse the input pair to setup a reverse mapping
- Parameters
-
pairs | array of values mapping Key to Value |
pair_count | number of pairs in array |
- Returns
- instance of singleton
The documentation for this class was generated from the following file: