mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 13:37:00 -04:00
Use Base::reflect instead of reflect_impl for reflecting base properties, made reflect_impl private.
This should fix #8
This commit is contained in:
@@ -23,8 +23,9 @@
|
|||||||
/** Reflection allows the member variables of a class to be inspected at runtime.
|
/** Reflection allows the member variables of a class to be inspected at runtime.
|
||||||
*/
|
*/
|
||||||
#define DECLARE_REFLECTION_PREFIX(PREFIX,SUFFIX) \
|
#define DECLARE_REFLECTION_PREFIX(PREFIX,SUFFIX) \
|
||||||
protected: \
|
private: \
|
||||||
template<class Handler> void reflect_impl(Handler&); \
|
template<class Handler> void reflect_impl(Handler&); \
|
||||||
|
protected: \
|
||||||
friend class Reader; \
|
friend class Reader; \
|
||||||
friend class Writer; \
|
friend class Writer; \
|
||||||
friend class GetDefaultMember; \
|
friend class GetDefaultMember; \
|
||||||
@@ -101,7 +102,7 @@
|
|||||||
#define REFLECT_NAMELESS(var) handler.handle(var)
|
#define REFLECT_NAMELESS(var) handler.handle(var)
|
||||||
|
|
||||||
/// Declare that the variables of a base class should also be reflected
|
/// Declare that the variables of a base class should also be reflected
|
||||||
#define REFLECT_BASE(Base) Base::reflect_impl(handler)
|
#define REFLECT_BASE(Base) Base::reflect(handler)
|
||||||
|
|
||||||
/// Reflect a group of declarations only when reading
|
/// Reflect a group of declarations only when reading
|
||||||
/** Usage:
|
/** Usage:
|
||||||
|
|||||||
Reference in New Issue
Block a user