Medical Imaging Interaction Toolkit
2023.12.00
Medical Imaging Interaction Toolkit
|
Go to the documentation of this file.
13 #ifndef BERRYREFLECTION_H
14 #define BERRYREFLECTION_H
33 namespace Reflection {
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>();
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
org_blueberry_core_runtime_EXPORT QString DemangleName(const char *typeName)
org_blueberry_core_runtime_EXPORT QString GetClassName(const Object *obj)
TypeList< T1, T2, T3, T4, T5, T6, T7, T8, T9 > tail
Reduce< map_type >::result type
Map< char >::type map_type
Light weight base class for most BlueBerry classes.
static type & value(type &result)
#define org_blueberry_core_runtime_EXPORT
static type & value(type &result)
MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
Map< char >::type map_type
QList< TypeInfo > GetSuperclasses()
static result & value(result &list, const type &item)
Reduce< map_type >::result type