15 #define INTEROP_TUPLE1(X) name_type_pair_t(#X,X)
17 #define INTEROP_TUPLE_ASSIGN(X, IGNORED_1) name_type_pair_t(#X,X)
19 #define INTEROP_TUPLE2(X, IGNORED_1) name_type_pair_t(#X,X)
21 #define INTEROP_TUPLE3(X, IGNORED_1, IGNORED_2) name_type_pair_t(#X,X)
23 #define INTEROP_TUPLE4(X, IGNORED_1, IGNORED_2, IGNORED_3) name_type_pair_t(#X,X),
25 #define INTEROP_TUPLE7(X, IGNORED_1, IGNORED_2, IGNORED_3, IGNORED_4, IGNORED_5, IGNORED_6) name_type_pair_t(#X,X),
28 namespace illumina {
namespace interop {
namespace constants
34 template<
typename Enum>
42 template<
typename Enum>
47 return enum_map_t::template setup<const mapping_t&>(mapping_t::rmapping).
get(value, std::string(
"Unknown"));
55 template<
typename Enum>
56 Enum
parse(
const std::string& name)
60 return enum_map_t::template setup<const mapping_t&>(mapping_t::fmapping).
get(name, static_cast<Enum>(
Unknown));
65 template<
typename Enum>
73 fill_enum_vector(std::vector<Enum> &vec1,
const size_t start=0) : m_vec(vec1), m_start(start) { }
79 void operator()(
const std::pair<std::string, Enum> *vals,
const size_t n)
const
81 m_vec.resize(n-m_start);
82 for (
size_t i = m_start; i < n; ++i)
83 m_vec[i-m_start] = vals[i].second;
86 std::vector<Enum> &m_vec;
90 template<
typename Enum>
104 void operator()(
const std::pair<std::string, Enum> *vals,
const size_t n)
const
106 m_vec.resize(n-m_start);
107 for (
size_t i = m_start; i < n; ++i)
108 m_vec[i-m_start] = vals[i].first;
111 std::vector<std::string> &m_vec;
112 const size_t m_start;
120 template<
typename Enum>
131 template<
typename Enum>
142 typedef std::pair<std::string, metric_type> name_type_pair_t;
149 template<
typename R,
typename F>
161 typedef std::pair<std::string, tile_naming_method> name_type_pair_t;
168 template<
typename R,
typename F>
179 typedef std::pair<std::string, surface_type> name_type_pair_t;
186 template<
typename R,
typename F>
197 typedef std::pair<std::string, dna_bases> name_type_pair_t;
204 template<
typename R,
typename F>
215 typedef std::pair<std::string, instrument_type> name_type_pair_t;
222 template<
typename R,
typename F>
233 typedef std::pair<std::string, plot_colors> name_type_pair_t;
240 template<
typename R,
typename F>
251 typedef std::pair<std::string, metric_group> name_type_pair_t;
258 template<
typename R,
typename F>
269 typedef std::pair<std::string, metric_data> name_type_pair_t;
276 template<
typename R,
typename F>
287 typedef std::pair<std::string, bar_plot_options> name_type_pair_t;
294 template<
typename R,
typename F>
305 typedef std::pair<std::string, metric_feature_type> name_type_pair_t;
312 template<
typename R,
typename F>
325 typedef std::pair<std::string, plot_types > name_type_pair_t;
332 template<
typename R,
typename F>
345 typedef std::pair<std::string, metric_base_type > name_type_pair_t;
352 template<
typename R,
typename F>
362 #undef INTEROP_TUPLE1
363 #undef INTEROP_TUPLE2
364 #undef INTEROP_TUPLE3
365 #undef INTEROP_TUPLE4
366 #undef INTEROP_TUPLE7
metric_base_type
Definition: enums.h:314
#define INTEROP_ENUM_METRIC_DATA_TYPES
Definition: enums.h:100
static R setup(F func)
Definition: enums.h:259
static R setup(F func)
Definition: enums.h:333
#define INTEROP_ENUM_BAR_PLOT_OPTIONS
Definition: enums.h:241
metric_type
Definition: enums.h:284
Definition: enum_description.h:15
#define INTEROP_ENUM_METRIC_FEATURE_TYPE
Definition: enums.h:26
void operator()(const std::pair< std::string, Enum > *vals, const size_t n) const
Definition: enums.h:79
static R setup(F func)
Definition: enums.h:169
#define INTEROP_ENUM_PLOT_COLORS
Definition: enums.h:203
bar_plot_options
Definition: enums.h:324
plot_types
Definition: enums.h:339
#define INTEROP_ENUM_INSTRUMENT_TYPES
Definition: enums.h:166
#define INTEROP_ENUM_SURFACE_TYPES
Definition: enums.h:154
static R setup(F func)
Definition: enums.h:277
metric_group
Definition: enums.h:289
static R setup(F func)
Definition: enums.h:295
Definition: constant_mapping.h:54
#define INTEROP_ENUM_METRIC_BASE_TYPES
Definition: enums.h:183
metric_feature_type
Definition: enums.h:334
#define INTEROP_ENUM_METRIC_GROUPS
Definition: enums.h:77
void list_enum_names(std::vector< std::string > &vec, const size_t skip=0)
Definition: enums.h:132
void operator()(const std::pair< std::string, Enum > *vals, const size_t n) const
Definition: enums.h:104
#define INTEROP_ENUM_PLOT_TYPES
Definition: enums.h:220
metric_data
Definition: enums.h:329
fill_enum_name_vector(std::vector< std::string > &vec1, const size_t start=0)
Definition: enums.h:98
static R setup(F func)
Definition: enums.h:187
static R setup(F func)
Definition: enums.h:353
#define INTEROP_ENUM_DNA_BASE_TYPES
Definition: enums.h:131
#define INTEROP_ENUM_TILE_NAMING_METHODS
Definition: enums.h:114
fill_enum_vector(std::vector< Enum > &vec1, const size_t start=0)
Definition: enums.h:73
static R setup(F func)
Definition: enums.h:313
static R setup(F func)
Definition: enums.h:150
static R setup(F func)
Definition: enums.h:223
size_t length_of(const T &val)
Definition: length_of.h:55
#define INTEROP_ENUM_METRIC_TYPES
Definition: enums.h:42
instrument_type
Definition: enums.h:309
static R setup(F func)
Definition: enums.h:205
static R setup(F func)
Definition: enums.h:241
tile_naming_method
Definition: enums.h:294
dna_bases
Definition: enums.h:299
void list_enums(std::vector< Enum > &vec, const size_t skip=0)
Definition: enums.h:121
Enum parse(const std::string &name)
Definition: enums.h:56
std::string to_string(Enum value)
Definition: enums.h:43
plot_colors
Definition: enums.h:319
surface_type
Definition: enums.h:304