rename
parent
56a3c2f836
commit
cd9ec507d6
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 3.20)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
include(cmake/color.cmake)
|
include(cmake/color.cmake)
|
||||||
set(BLT_VERSION 0.20.1)
|
set(BLT_VERSION 0.20.2)
|
||||||
set(BLT_TEST_VERSION 0.0.1)
|
set(BLT_TEST_VERSION 0.0.1)
|
||||||
|
|
||||||
set(BLT_TARGET BLT)
|
set(BLT_TARGET BLT)
|
||||||
|
|
|
@ -24,21 +24,21 @@
|
||||||
namespace blt
|
namespace blt
|
||||||
{
|
{
|
||||||
#define BLT_MAKE_VARIABLE(TYPE, NAME) \
|
#define BLT_MAKE_VARIABLE(TYPE, NAME) \
|
||||||
TYPE _##NAME{};
|
TYPE NAME{};
|
||||||
|
|
||||||
#define INTERNAL_BLT_MAKE_GETTER(TYPE, NAME) \
|
#define BLT_INTERNAL_MAKE_GETTER(TYPE, NAME) \
|
||||||
TYPE& get_##NAME() { return _##NAME; } \
|
TYPE& get_##NAME() { return NAME; } \
|
||||||
const TYPE& get_##NAME() const { return _##NAME; }
|
const TYPE& get_##NAME() const { return NAME; }
|
||||||
|
|
||||||
#define INTERNAL_BLT_MAKE_SETTER(TYPE, NAME) \
|
#define BLT_INTERNAL_MAKE_GETTER(TYPE, NAME) \
|
||||||
auto& set_##NAME(const TYPE& new_##NAME) \
|
auto& set_##NAME(const TYPE& new_##NAME) \
|
||||||
{ \
|
{ \
|
||||||
_##NAME = new_##NAME; \
|
NAME = new_##NAME; \
|
||||||
return *this; \
|
return *this; \
|
||||||
} \
|
} \
|
||||||
auto& set_##NAME(TYPE new_##NAME) \
|
auto& set_##NAME(TYPE new_##NAME) \
|
||||||
{ \
|
{ \
|
||||||
_##NAME = std::move(new_##NAME); \
|
NAME = std::move(new_##NAME); \
|
||||||
return *this; \
|
return *this; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,13 +46,13 @@ namespace blt
|
||||||
private: \
|
private: \
|
||||||
BLT_MAKE_VARIABLE(TYPE, NAME) \
|
BLT_MAKE_VARIABLE(TYPE, NAME) \
|
||||||
public: \
|
public: \
|
||||||
INTERNAL_BLT_MAKE_GETTER(TYPE, NAME)
|
BLT_INTERNAL_MAKE_GETTER(TYPE, NAME)
|
||||||
|
|
||||||
#define BLT_MAKE_SETTER(TYPE, NAME) \
|
#define BLT_MAKE_SETTER(TYPE, NAME) \
|
||||||
private: \
|
private: \
|
||||||
BLT_MAKE_VARIABLE(TYPE, NAME) \
|
BLT_MAKE_VARIABLE(TYPE, NAME) \
|
||||||
public: \
|
public: \
|
||||||
INTERNAL_BLT_MAKE_SETTER(TYPE, NAME)
|
BLT_INTERNAL_MAKE_GETTER(TYPE, NAME)
|
||||||
|
|
||||||
#define BLT_MAKE_FRIEND(FRIEND) friend FRIEND;
|
#define BLT_MAKE_FRIEND(FRIEND) friend FRIEND;
|
||||||
|
|
||||||
|
@ -65,8 +65,8 @@ namespace blt
|
||||||
private: \
|
private: \
|
||||||
BLT_MAKE_VARIABLE(TYPE, NAME) \
|
BLT_MAKE_VARIABLE(TYPE, NAME) \
|
||||||
public: \
|
public: \
|
||||||
INTERNAL_BLT_MAKE_GETTER(TYPE, NAME) \
|
BLT_INTERNAL_MAKE_GETTER(TYPE, NAME) \
|
||||||
INTERNAL_BLT_MAKE_SETTER(TYPE, NAME)
|
BLT_INTERNAL_MAKE_GETTER(TYPE, NAME)
|
||||||
|
|
||||||
#define BLT_MAKE_CONFIG_TYPE(OBJECT, ...) \
|
#define BLT_MAKE_CONFIG_TYPE(OBJECT, ...) \
|
||||||
class OBJECT { \
|
class OBJECT { \
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8a889d3699b3c09ade435641fb034427f3fd12b6
|
Subproject commit d88c5e15079047777b418132ece5879e7c9aaa2b
|
Loading…
Reference in New Issue