macro.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "meta/common/dep.hpp"
5
7
8// byeolMeta macro's sub-commands:
9// CLONE:
10// defines normal clone func. it have to be defined if you
11// just have declared non abstract class.
12#define __BY__DECL_CLONE(ME) \
13public: \
14 clonable* clone() const override { return new ME(*this); } \
15 \
16private:
17
19
20// TYPE:
21// defines super meta type.
22// for instance, if you set TYPE(type), then when you call getType() of your class,
23// it will returns instance of type of type.
24#define __BY__DECL_TYPE(METATYPE) \
25public: \
26 typedef METATYPE metaType; \
27 const ntype& getType() const override { return ttype<me>::get(); } \
28 \
29private: