16#ifndef SIMICS_DETAIL_ATTRIBUTE_GETTER_H
17#define SIMICS_DETAIL_ATTRIBUTE_GETTER_H
39#define _G_SINGLE(func_ptr) \
40 simics::detail::attr_getter_helper<decltype(&func_ptr)>::\
42#define _G_DUAL(cls, m) \
43 simics::detail::attr_getter_helper_dual<decltype(&cls::m), cls>::\
47template <
typename O,
typename T>
50 static_assert(
sizeof(T) == -1,
51 "Pass class member pointer as two arguments to the MACRO:"
55template <
typename O,
typename T>
58 static_assert(
sizeof(T) == -1,
59 "Pass class member pointer as two arguments to the MACRO:"
65template <
typename T,
typename O,
typename C>
67 static_assert(std::is_base_of<O, C>::value,
68 "Type C should be same as or derived from type O");
70 template <T (O::*F)()>
71 static attr_value_t
f(conf_object_t *obj) {
76template <
typename T,
typename O,
typename C>
78 static_assert(std::is_base_of<O, C>::value,
79 "Type C should be same as or derived from type O");
81 template <T (O::*F)() const>
82 static attr_value_t
f(conf_object_t *obj) {
88template <
typename T,
typename O>
91 static_assert(
sizeof(T) == -1,
92 "Pass class member pointer as two arguments to the MACRO:"
96template <
typename T,
typename O,
typename C>
98 static_assert(std::is_base_of<O, C>::value,
99 "Type C should be same as or derived from type O");
102 static attr_value_t
f(conf_object_t *obj) {
108template <
typename O,
typename T>
110 template <T& (*F)(O&)>
111 static attr_value_t
f(conf_object_t *obj) {
116template <
typename O,
typename T>
118 template <T (*F)(O&)>
119 static attr_value_t
f(conf_object_t *obj) {
Definition: after-bank.h:33
std::enable_if< std::is_enum< T >::value, attr_value_t >::type std_to_attr(const T &src)
Function transforms C++ enum type T to Simics attr_value_t.
Definition: attribute-traits.h:163
static attr_value_t f(conf_object_t *obj)
Definition: attribute-getter.h:111
static attr_value_t f(conf_object_t *obj)
Definition: attribute-getter.h:119
static attr_value_t f(conf_object_t *obj)
Definition: attribute-getter.h:102
static attr_value_t f(conf_object_t *obj)
Definition: attribute-getter.h:71
static attr_value_t f(conf_object_t *obj)
Definition: attribute-getter.h:82
Definition: attribute-getter.h:26
Definition: attribute-getter.h:25