17 #ifndef BERRYREFLECTION_H
18 #define BERRYREFLECTION_H
37 namespace Reflection {
103 template <
typename>
class Map,
104 template <
typename>
class Reduce
109 typedef typename Reduce<map_type>::result
type;
124 template <
typename>
class Map,
125 template <
typename>
class Reduce
130 typedef typename Reduce<map_type>::result
type;
151 : m_Self(
std::make_shared<Model<T> >())
158 { T* dummy =
nullptr;
return TypeInfo(dummy); }
168 virtual QString
GetName()
const = 0;
173 struct Model : Concept {
174 QString
GetName()
const override
175 {
return GetClassName<T>(); }
180 std::shared_ptr<const Concept> m_Self;
189 return TypeInfo::New<T>();
198 static result&
value(result& list,
const type& item)
200 list.push_back(item);
209 struct Big {
char dummy[2]; };
211 template<
typename U>
static Small Test(
typename U::SuperclassTypes*);
212 template<
typename U>
static Big Test(...);
214 enum {
value =
sizeof(Test<T>(
nullptr)) ==
sizeof(Small) };
217 template<
typename T,
bool>
232 return ::berry::Reflection::GetSuperclasses<T>();
239 #endif // BERRYREFLECTION_H
QString GetClassName(const Object *obj)
Map< char >::type map_type
Reduce< map_type >::result type
Map< char >::type map_type
QString DemangleName(const char *mangledName)
MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
#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()
static std::string GetName(std::string fileName, std::string suffix)