[*] SOO size is now pushed between module boundaries via a default ctor argument
This commit is contained in:
parent
2cc67786eb
commit
f037399ee3
@ -18,17 +18,12 @@
|
|||||||
|
|
||||||
#define _AUROXTL_INTERRFACE_SOO_THIS(FullType) (reinterpret_cast<FullType *>(this))
|
#define _AUROXTL_INTERRFACE_SOO_THIS(FullType) (reinterpret_cast<FullType *>(this))
|
||||||
|
|
||||||
// ??!?!
|
|
||||||
#if !defined(_ZAUFE_FE_1_FIRST)
|
|
||||||
#define _ZAUFE_FE_1_FIRST(a, b)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define _AUROXTL_INTERRFACE_SOO_EMITTER_0(a) AU_EMIT_FIRST a AU_EMIT_SECOND a
|
#define _AUROXTL_INTERRFACE_SOO_EMITTER_0(a) AU_EMIT_FIRST a AU_EMIT_SECOND a
|
||||||
#define _AUROXTL_INTERRFACE_SOO_EMITTER_1(a) , AU_EMIT_FIRST a AU_EMIT_SECOND a
|
#define _AUROXTL_INTERRFACE_SOO_EMITTER_1(a) , AU_EMIT_FIRST a AU_EMIT_SECOND a
|
||||||
#define _AUROXTL_INTERRFACE_SOO_EMITTER_2(a) AU_EMIT_SECOND a
|
#define _AUROXTL_INTERRFACE_SOO_EMITTER_2(a) AU_EMIT_SECOND a
|
||||||
#define _AUROXTL_INTERRFACE_SOO_EMITTER_3(a) , AU_EMIT_SECOND a
|
#define _AUROXTL_INTERRFACE_SOO_EMITTER_3(a) , AU_EMIT_SECOND a
|
||||||
|
|
||||||
#define AUROXTL_INTERFACE_SOO_HDR_(vis, type, maxSize, ...) \
|
#define AUROXTL_INTERFACE_SOO_HDR_(vis, type, maxSize, ...) \
|
||||||
protected: \
|
protected: \
|
||||||
char padding[maxSize] {}; \
|
char padding[maxSize] {}; \
|
||||||
inline type(std::nullptr_t) \
|
inline type(std::nullptr_t) \
|
||||||
@ -36,10 +31,10 @@
|
|||||||
public: \
|
public: \
|
||||||
static const AuUInt kSSOPaddedSize = maxSize; \
|
static const AuUInt kSSOPaddedSize = maxSize; \
|
||||||
static const AuUInt kSSORealSize; \
|
static const AuUInt kSSORealSize; \
|
||||||
vis type(AU_FOR_EACH_FIRST(_AUROXTL_INTERRFACE_SOO_EMITTER_0, _AUROXTL_INTERRFACE_SOO_EMITTER_1, ## __VA_ARGS__));\
|
vis type(AU_FOR_EACH_FIRST(_AUROXTL_INTERRFACE_SOO_EMITTER_0, _AUROXTL_INTERRFACE_SOO_EMITTER_1, ## __VA_ARGS__, (AuUInt32, uSOOSize = kSSOPaddedSize)));\
|
||||||
vis ~type();
|
vis ~type();
|
||||||
|
|
||||||
#define AUROXTL_INTERFACE_SOO_HDR_EX(vis, Type, extends, targetSize, ...) \
|
#define AUROXTL_INTERFACE_SOO_HDR_EX(vis, Type, extends, targetSize, ...)\
|
||||||
struct Type ## SOO \
|
struct Type ## SOO \
|
||||||
{ \
|
{ \
|
||||||
AUROXTL_INTERFACE_SOO_HDR_(vis, Type ## SOO, targetSize, ## __VA_ARGS__) \
|
AUROXTL_INTERFACE_SOO_HDR_(vis, Type ## SOO, targetSize, ## __VA_ARGS__) \
|
||||||
@ -83,10 +78,10 @@ using Type ## SOO_t = Type ## SOO;
|
|||||||
#define AUROXTL_INTERFACE_SOO_HDR(Type, extends, targetSize, ...) \
|
#define AUROXTL_INTERFACE_SOO_HDR(Type, extends, targetSize, ...) \
|
||||||
AUROXTL_INTERFACE_SOO_HDR_EX(, Type, extends, targetSize, ## __VA_ARGS__)
|
AUROXTL_INTERFACE_SOO_HDR_EX(, Type, extends, targetSize, ## __VA_ARGS__)
|
||||||
|
|
||||||
#define AUROXTL_INTERFACE_SOO_SRC_EX(vis, Type, FullType, ...) \
|
#define AUROXTL_INTERFACE_SOO_SRC_EX(vis, Type, FullType, ...) \
|
||||||
vis Type ## SOO::Type ## SOO(AU_FOR_EACH_FIRST(_AUROXTL_INTERRFACE_SOO_EMITTER_0, _AUROXTL_INTERRFACE_SOO_EMITTER_1, ## __VA_ARGS__)) \
|
vis Type ## SOO::Type ## SOO(AU_FOR_EACH_FIRST(_AUROXTL_INTERRFACE_SOO_EMITTER_0, _AUROXTL_INTERRFACE_SOO_EMITTER_1, ## __VA_ARGS__, (AuUInt32, uSize))) \
|
||||||
{ \
|
{ \
|
||||||
if (kSSORealSize > kSSOPaddedSize) \
|
if (kSSORealSize > uSize) \
|
||||||
{ \
|
{ \
|
||||||
AuMemoryPanic("SOO out of overhead: " \
|
AuMemoryPanic("SOO out of overhead: " \
|
||||||
_AUROXTL_INTERFACE_SOO_TYPE2NAME(Type)); \
|
_AUROXTL_INTERFACE_SOO_TYPE2NAME(Type)); \
|
||||||
|
Loading…
Reference in New Issue
Block a user