13 #ifndef BERRYREFLECTION_H 14 #define BERRYREFLECTION_H 33 namespace Reflection {
82 length = tail::length+1
99 template <
typename>
class Map,
100 template <
typename>
class Reduce
105 typedef typename Reduce<map_type>::result
type;
120 template <
typename>
class Map,
121 template <
typename>
class Reduce
126 typedef typename Reduce<map_type>::result
type;
147 : m_Self(
std::make_shared<Model<T> >())
154 { T* dummy =
nullptr;
return TypeInfo(dummy); }
156 QString GetName()
const;
164 virtual QString GetName()
const = 0;
169 struct Model : Concept {
170 QString GetName()
const override 171 {
return GetClassName<T>(); }
176 std::shared_ptr<const Concept> m_Self;
185 return TypeInfo::New<T>();
194 static result&
value(result& list,
const type& item)
196 list.push_back(item);
205 struct Big {
char dummy[2]; };
207 template<
typename U>
static Small Test(
typename U::SuperclassTypes*);
208 template<
typename U>
static Big Test(...);
210 enum { value =
sizeof(Test<T>(
nullptr)) ==
sizeof(Small) };
213 template<
typename T,
bool>
228 return ::berry::Reflection::GetSuperclasses<T>();
235 #endif // BERRYREFLECTION_H MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
org_blueberry_core_runtime_EXPORT QString GetClassName(const Object *obj)
Map< char >::type map_type
Light weight base class for most BlueBerry classes.
Reduce< map_type >::result type
org_blueberry_core_runtime_EXPORT QString DemangleName(const char *typeName)
Map< char >::type map_type
#define org_blueberry_core_runtime_EXPORT
TypeList< T1, T2, T3, T4, T5, T6, T7, T8, T9 > tail
Reduce< map_type >::result type
static type & value(type &result)
static type & value(type &result)
static result & value(result &list, const type &item)
QList< TypeInfo > GetSuperclasses()