table_util.h
Go to the documentation of this file.
1 
10 #pragma once
12 
13 namespace illumina { namespace interop { namespace logic { namespace table
14 {
15 
25  template<class T, typename R, typename P1, typename P2>
26  R call_adapter(const T& obj, P2 param1, R (T::*func )(P1)const)
27  {
28  return (obj.*func)(param1);
29  }
38  template<class T, typename R, typename P1>
39  R call_adapter(const T& obj, P1, R (T::*func )()const)
40  {
41  return (obj.*func)();
42  }
43 
44 
45 }}}}
46 
47 
49 #define INTEROP_TUPLE7(X, Ignore1, Ignore2, Ignore3, Ignore4, Ignore5, Ignored6) name_type_pair_t(#X, model::table:: X##Column),
50 namespace illumina { namespace interop { namespace constants {
51 
53  template<>
55  {
56  typedef std::pair<std::string, model::table::column_id> name_type_pair_t;
57  public:
63  template<typename R, typename F>
64  static R setup(F func)
65  {
66  static const name_type_pair_t name_types[] = {INTEROP_IMAGING_COLUMN_TYPES name_type_pair_t("Dummy", model::table::ImagingColumnCount)};
67  return func(name_types, util::length_of(name_types));
68  }
69  };
70 }}}
71 #undef INTEROP_TUPLE7 // Reuse this for another conversion
72 
Definition: enum_description.h:15
R call_adapter(const T &obj, P2 param1, R(T::*func)(P1) const)
Definition: table_util.h:26
column_id
Definition: imaging_column.h:91
#define INTEROP_IMAGING_COLUMN_TYPES
Definition: imaging_column.h:48
Definition: enums.h:301
size_t length_of(const T &val)
Definition: length_of.h:55