Manu343726
3/23/2018 - 11:08 AM

tinyrefl generated code example

tinyrefl generated code example


#ifndef TINYREFL_GENERATED_FILE_16890161063312686347_INCLUDED
#define TINYREFL_GENERATED_FILE_16890161063312686347_INCLUDED


#ifndef TINYREFL_SEQUENCE
    #warning "The TINYREFL_SEQUENCE(...) macro is not defined. A definition of this macro is required by tinyrefl to model sequences of metadata"
    #warning "Tinyrefl will define an empty TINYREFL_SEQUENCE() macro for you, but this would mean the metadata of your types could end up being incomplete"

    #define TINYREFL_SEQUENCE(...)
#endif // TINYREFL_SEQUENCE

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING)
    #warning "The TINYREFL_DEFINE_STRING(...) macro is not defined. A definition of this macro is required by tinyrefl to generate definitions of string constants"
    #warning "Tinyrefl will define an empty TINYREFL_DEFINE_STRING() macro for you, but this would mean the metadata of your types could end up being incomplete"

    #define TINYREFL_DEFINE_STRING(...)
#endif // TINYREFL_DEFINE_STRING

#ifndef TINYREFL_STRING
    #warning "The TINYREFL_STRING(...) macro is not defined. A definition of this macro is required by tinyrefl to model string constants"
    #warning "Tinyrefl will define an empty TINYREFL_STRING() macro for you, but this would mean the metadata of your types could end up being incomplete"

    #define TINYREFL_STRING(...)
#endif // TINYREFL_STRING

#ifndef TINYREFL_TYPE
    #warning "The TINYREFL_TYPE(...) macro is not defined. A definition of this macro is required by tinyrefl to model references to types"
    #warning "Tinyrefl will define an empty TINYREFL_TYPE() macro for you, but this would mean the metadata of your types could end up being incomplete"

    #define TINYREFL_TYPE(...)
#endif // TINYREFL_TYPE

#ifndef TINYREFL_VALUE
    #warning "The TINYREFL_VALUE(...) macro is not defined. A definition of this macro is required by tinyrefl to model values (Such as integral constants, string literals, etc)"
    #warning "Tinyrefl will define an empty TINYREFL_VALUE() macro for you, but this would mean the metadata of your types could end up being incomplete"

    #define TINYREFL_VALUE(...)
#endif // TINYREFL_VALUE

#ifndef TINYREFL_ENUM_VALUE
    #warning "The TINYREFL_ENUM_VALUE(...) macro is not defined. A definition of this macro is required by tinyrefl to model sequences of metadata"
    #warning "Tinyrefl will define an empty TINYREFL_ENUM_VALUE() macro for you, but this would mean the metadata of your types could end up being incomplete"

    #define TINYREFL_ENUM_VALUE(...)
#endif // TINYREFL_ENUM_VALUE

#ifndef TINYREFL_MEMBER
    #warning "The TINYREFL_MEMBER(...) macro is not defined. A definition of this macro is required by tinyrefl to model sequences of metadata"
    #warning "Tinyrefl will define an empty TINYREFL_MEMBER() macro for you, but this would mean the metadata of your types could end up being incomplete"

    #define TINYREFL_MEMBER(...)
#endif // TINYREFL_MEMBER

#ifndef TINYREFL_REFLECT_MEMBER
    #warning "The TINYREFL_REFLECT_MEMBER(...) macro is not defined. A definition of this macro is required by tinyrefl to model sequences of metadata"
    #warning "Tinyrefl will define an empty TINYREFL_REFLECT_MEMBER() macro for you, but this would mean the metadata of your types could end up being incomplete"

    #define TINYREFL_REFLECT_MEMBER(...)
#endif // TINYREFL_REFLECT_MEMBER

#ifndef TINYREFL_REFLECT_CLASS
    #warning "The TINYREFL_REFLECT_CLASS(...) macro is not defined. A definition of this macro is required by tinyrefl to model the reflection metadata of a class"
    #warning "Tinyrefl will define an empty TINYREFL_REFLECT_CLASS() macro for you, but this would mean the metadata of your types could end up being incomplete"

    #define TINYREFL_REFLECT_CLASS(...)
#endif // TINYREFL_REFLECT_CLASS

#ifndef TINYREFL_GODMODE
    #warning "The TINYREFL_GODMODE(...) macro is not defined. A definition of this macro is required by tinyrefl to model universal access to class members, regardless of their access specifier"
    #warning "Tinyrefl will define an empty TINYREFL_GODMODE() macro for you, but this would mean the metadata of your types could end up being incomplete"

    #define TINYREFL_GODMODE(...)
#endif // TINYREFL_GODMODE

#ifndef TINYREFL_REFLECT_ENUM
    #warning "The TINYREFL_REFLECT_ENUM(...) macro is not defined. A definition of this macro is required by tinyrefl to model the reflection metadata of an enumeration"
    #warning "Tinyrefl will define an empty TINYREFL_REFLECT_ENUM() macro for you, but this would mean the metadata of your types could end up being incomplete"

    #define TINYREFL_REFLECT_ENUM(...)
#endif // TINYREFL_REFLECT_ENUM

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_295559816372023331)
#define TINYREFL_DEFINE_STRING_295559816372023331
TINYREFL_DEFINE_STRING(field)
#endif //TINYREFL_DEFINE_STRING_295559816372023331

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_6014421718213451189)
#define TINYREFL_DEFINE_STRING_6014421718213451189
TINYREFL_DEFINE_STRING(wmip::testing::MyClass::field)
#endif //TINYREFL_DEFINE_STRING_6014421718213451189

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_6724739152447154698)
#define TINYREFL_DEFINE_STRING_6724739152447154698
TINYREFL_DEFINE_STRING(&wmip::testing::MyClass::slot)
#endif //TINYREFL_DEFINE_STRING_6724739152447154698

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_9264229689384485067)
#define TINYREFL_DEFINE_STRING_9264229689384485067
TINYREFL_DEFINE_STRING(wmip::testing::MyClass::method)
#endif //TINYREFL_DEFINE_STRING_9264229689384485067

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_3736260649242632200)
#define TINYREFL_DEFINE_STRING_3736260649242632200
TINYREFL_DEFINE_STRING(MyClass)
#endif //TINYREFL_DEFINE_STRING_3736260649242632200

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_10919570374423916801)
#define TINYREFL_DEFINE_STRING_10919570374423916801
TINYREFL_DEFINE_STRING(wmip::testing::MyInterface)
#endif //TINYREFL_DEFINE_STRING_10919570374423916801

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_13106154552869321720)
#define TINYREFL_DEFINE_STRING_13106154552869321720
TINYREFL_DEFINE_STRING(wmip::testing::MyInterface::qt_metacast)
#endif //TINYREFL_DEFINE_STRING_13106154552869321720

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_4825324664522898466)
#define TINYREFL_DEFINE_STRING_4825324664522898466
TINYREFL_DEFINE_STRING(&wmip::testing::MyInterface::qt_metacall)
#endif //TINYREFL_DEFINE_STRING_4825324664522898466

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_54004706375334212)
#define TINYREFL_DEFINE_STRING_54004706375334212
TINYREFL_DEFINE_STRING(method)
#endif //TINYREFL_DEFINE_STRING_54004706375334212

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_728579515568191880)
#define TINYREFL_DEFINE_STRING_728579515568191880
TINYREFL_DEFINE_STRING(wmip::testing::MyInterface::qt_metacall)
#endif //TINYREFL_DEFINE_STRING_728579515568191880

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_10152065863223792208)
#define TINYREFL_DEFINE_STRING_10152065863223792208
TINYREFL_DEFINE_STRING(&wmip::testing::MyInterface::slot)
#endif //TINYREFL_DEFINE_STRING_10152065863223792208

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_5782885552608197808)
#define TINYREFL_DEFINE_STRING_5782885552608197808
TINYREFL_DEFINE_STRING(&wmip::testing::MyClass::method)
#endif //TINYREFL_DEFINE_STRING_5782885552608197808

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_7859267687517256111)
#define TINYREFL_DEFINE_STRING_7859267687517256111
TINYREFL_DEFINE_STRING(&wmip::testing::MyInterface::qt_metacast)
#endif //TINYREFL_DEFINE_STRING_7859267687517256111

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_2907249173272475399)
#define TINYREFL_DEFINE_STRING_2907249173272475399
TINYREFL_DEFINE_STRING(MyInterface)
#endif //TINYREFL_DEFINE_STRING_2907249173272475399

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_4625353989454765002)
#define TINYREFL_DEFINE_STRING_4625353989454765002
TINYREFL_DEFINE_STRING(wmip::testing::MyClass::slot)
#endif //TINYREFL_DEFINE_STRING_4625353989454765002

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_191736465236385944)
#define TINYREFL_DEFINE_STRING_191736465236385944
TINYREFL_DEFINE_STRING(wmip::testing::MyInterface::metaObject)
#endif //TINYREFL_DEFINE_STRING_191736465236385944

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_14397716728563006553)
#define TINYREFL_DEFINE_STRING_14397716728563006553
TINYREFL_DEFINE_STRING(&wmip::testing::MyClass::field)
#endif //TINYREFL_DEFINE_STRING_14397716728563006553

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_18128593481497943577)
#define TINYREFL_DEFINE_STRING_18128593481497943577
TINYREFL_DEFINE_STRING(metaObject)
#endif //TINYREFL_DEFINE_STRING_18128593481497943577

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_17064303142271327833)
#define TINYREFL_DEFINE_STRING_17064303142271327833
TINYREFL_DEFINE_STRING(&wmip::testing::MyInterface::method)
#endif //TINYREFL_DEFINE_STRING_17064303142271327833

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_8713850857585098638)
#define TINYREFL_DEFINE_STRING_8713850857585098638
TINYREFL_DEFINE_STRING(qt_metacast)
#endif //TINYREFL_DEFINE_STRING_8713850857585098638

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_2514164756282282575)
#define TINYREFL_DEFINE_STRING_2514164756282282575
TINYREFL_DEFINE_STRING(&wmip::testing::MyInterface::metaObject)
#endif //TINYREFL_DEFINE_STRING_2514164756282282575

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_15283615121063448299)
#define TINYREFL_DEFINE_STRING_15283615121063448299
TINYREFL_DEFINE_STRING(signal)
#endif //TINYREFL_DEFINE_STRING_15283615121063448299

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_10827683444649875078)
#define TINYREFL_DEFINE_STRING_10827683444649875078
TINYREFL_DEFINE_STRING(wmip::testing::MyInterface::method)
#endif //TINYREFL_DEFINE_STRING_10827683444649875078

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_9417550627897969692)
#define TINYREFL_DEFINE_STRING_9417550627897969692
TINYREFL_DEFINE_STRING(wmip::testing::MyInterface::slot)
#endif //TINYREFL_DEFINE_STRING_9417550627897969692

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_8627574202288022770)
#define TINYREFL_DEFINE_STRING_8627574202288022770
TINYREFL_DEFINE_STRING(slot)
#endif //TINYREFL_DEFINE_STRING_8627574202288022770

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_3401563812266771551)
#define TINYREFL_DEFINE_STRING_3401563812266771551
TINYREFL_DEFINE_STRING(&wmip::testing::MyInterface::signal)
#endif //TINYREFL_DEFINE_STRING_3401563812266771551

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_4146721053371200211)
#define TINYREFL_DEFINE_STRING_4146721053371200211
TINYREFL_DEFINE_STRING(qt_metacall)
#endif //TINYREFL_DEFINE_STRING_4146721053371200211

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_13239100383330553076)
#define TINYREFL_DEFINE_STRING_13239100383330553076
TINYREFL_DEFINE_STRING(wmip::testing::MyInterface::signal)
#endif //TINYREFL_DEFINE_STRING_13239100383330553076

#if defined(TINYREFL_DEFINE_STRINGS) && !defined(TINYREFL_DEFINE_STRING_2615229748143249728)
#define TINYREFL_DEFINE_STRING_2615229748143249728
TINYREFL_DEFINE_STRING(wmip::testing::MyClass)
#endif //TINYREFL_DEFINE_STRING_2615229748143249728

TINYREFL_REFLECT_MEMBER(TINYREFL_MEMBER(TINYREFL_STRING(metaObject), TINYREFL_STRING(wmip::testing::MyInterface::metaObject), TINYREFL_TYPE(MyInterface, wmip::testing::MyInterface), TINYREFL_VALUE(&wmip::testing::MyInterface::metaObject)))
TINYREFL_REFLECT_MEMBER(TINYREFL_MEMBER(TINYREFL_STRING(qt_metacast), TINYREFL_STRING(wmip::testing::MyInterface::qt_metacast), TINYREFL_TYPE(MyInterface, wmip::testing::MyInterface), TINYREFL_VALUE(&wmip::testing::MyInterface::qt_metacast)))
TINYREFL_REFLECT_MEMBER(TINYREFL_MEMBER(TINYREFL_STRING(qt_metacall), TINYREFL_STRING(wmip::testing::MyInterface::qt_metacall), TINYREFL_TYPE(MyInterface, wmip::testing::MyInterface), TINYREFL_VALUE(&wmip::testing::MyInterface::qt_metacall)))
TINYREFL_REFLECT_MEMBER(TINYREFL_MEMBER(TINYREFL_STRING(method), TINYREFL_STRING(wmip::testing::MyInterface::method), TINYREFL_TYPE(MyInterface, wmip::testing::MyInterface), TINYREFL_VALUE(&wmip::testing::MyInterface::method)))
TINYREFL_REFLECT_MEMBER(TINYREFL_MEMBER(TINYREFL_STRING(slot), TINYREFL_STRING(wmip::testing::MyInterface::slot), TINYREFL_TYPE(MyInterface, wmip::testing::MyInterface), TINYREFL_VALUE(&wmip::testing::MyInterface::slot)))
TINYREFL_REFLECT_MEMBER(TINYREFL_MEMBER(TINYREFL_STRING(signal), TINYREFL_STRING(wmip::testing::MyInterface::signal), TINYREFL_TYPE(MyInterface, wmip::testing::MyInterface), TINYREFL_VALUE(&wmip::testing::MyInterface::signal)))
TINYREFL_REFLECT_CLASS(TINYREFL_TYPE(MyInterface, wmip::testing::MyInterface), 
// Base classes:
TINYREFL_SEQUENCE(()),
// Members: 
TINYREFL_SEQUENCE((TINYREFL_MEMBER(TINYREFL_STRING(metaObject), TINYREFL_STRING(wmip::testing::MyInterface::metaObject), TINYREFL_TYPE(MyInterface, wmip::testing::MyInterface), TINYREFL_VALUE(&wmip::testing::MyInterface::metaObject)), TINYREFL_MEMBER(TINYREFL_STRING(qt_metacast), TINYREFL_STRING(wmip::testing::MyInterface::qt_metacast), TINYREFL_TYPE(MyInterface, wmip::testing::MyInterface), TINYREFL_VALUE(&wmip::testing::MyInterface::qt_metacast)), TINYREFL_MEMBER(TINYREFL_STRING(qt_metacall), TINYREFL_STRING(wmip::testing::MyInterface::qt_metacall), TINYREFL_TYPE(MyInterface, wmip::testing::MyInterface), TINYREFL_VALUE(&wmip::testing::MyInterface::qt_metacall)), TINYREFL_MEMBER(TINYREFL_STRING(method), TINYREFL_STRING(wmip::testing::MyInterface::method), TINYREFL_TYPE(MyInterface, wmip::testing::MyInterface), TINYREFL_VALUE(&wmip::testing::MyInterface::method)), TINYREFL_MEMBER(TINYREFL_STRING(slot), TINYREFL_STRING(wmip::testing::MyInterface::slot), TINYREFL_TYPE(MyInterface, wmip::testing::MyInterface), TINYREFL_VALUE(&wmip::testing::MyInterface::slot)), TINYREFL_MEMBER(TINYREFL_STRING(signal), TINYREFL_STRING(wmip::testing::MyInterface::signal), TINYREFL_TYPE(MyInterface, wmip::testing::MyInterface), TINYREFL_VALUE(&wmip::testing::MyInterface::signal)))),
// Member classes: 
TINYREFL_SEQUENCE(()),
// Member enums: 
TINYREFL_SEQUENCE(())
)
TINYREFL_REFLECT_MEMBER(TINYREFL_MEMBER(TINYREFL_STRING(method), TINYREFL_STRING(wmip::testing::MyClass::method), TINYREFL_TYPE(MyClass, wmip::testing::MyClass), TINYREFL_VALUE(&wmip::testing::MyClass::method)))
TINYREFL_REFLECT_MEMBER(TINYREFL_MEMBER(TINYREFL_STRING(slot), TINYREFL_STRING(wmip::testing::MyClass::slot), TINYREFL_TYPE(MyClass, wmip::testing::MyClass), TINYREFL_VALUE(&wmip::testing::MyClass::slot)))
TINYREFL_REFLECT_MEMBER(TINYREFL_MEMBER(TINYREFL_STRING(field), TINYREFL_STRING(wmip::testing::MyClass::field), TINYREFL_TYPE(MyClass, wmip::testing::MyClass), TINYREFL_VALUE(&wmip::testing::MyClass::field)))
TINYREFL_REFLECT_CLASS(TINYREFL_TYPE(MyClass, wmip::testing::MyClass), 
// Base classes:
TINYREFL_SEQUENCE((wmip::testing::MyInterface)),
// Members: 
TINYREFL_SEQUENCE((TINYREFL_MEMBER(TINYREFL_STRING(method), TINYREFL_STRING(wmip::testing::MyClass::method), TINYREFL_TYPE(MyClass, wmip::testing::MyClass), TINYREFL_VALUE(&wmip::testing::MyClass::method)), TINYREFL_MEMBER(TINYREFL_STRING(slot), TINYREFL_STRING(wmip::testing::MyClass::slot), TINYREFL_TYPE(MyClass, wmip::testing::MyClass), TINYREFL_VALUE(&wmip::testing::MyClass::slot)), TINYREFL_MEMBER(TINYREFL_STRING(field), TINYREFL_STRING(wmip::testing::MyClass::field), TINYREFL_TYPE(MyClass, wmip::testing::MyClass), TINYREFL_VALUE(&wmip::testing::MyClass::field)))),
// Member classes: 
TINYREFL_SEQUENCE(()),
// Member enums: 
TINYREFL_SEQUENCE(())
)

#endif // TINYREFL_GENERATED_FILE_16890161063312686347_INCLUDED
#include <QObject>

namespace wmip
{

namespace testing
{

class MyInterface : public QObject
{
    Q_OBJECT
public:
    virtual void method() = 0;

public slots:
    virtual void slot() = 0;

signals:
    void signal();
};

class MyClass : public MyInterface
{
public:
    void method() override {}
    void slot() override {}

    int field;
};

}

}