Refureku v2.2.0
C++17 runtime reflection library.
TypePart.h
1
8#pragma once
9
10#include "Refureku/Config.h"
11#include "Refureku/TypeInfo/ETypePartDescriptor.h"
12#include "Refureku/Misc/DisableWarningMacros.h"
13
14namespace rfk
15{
17 {
18 public:
19 using AdditionalDataType = uint32;
20
21 REFUREKU_INTERNAL TypePart() noexcept;
22 REFUREKU_INTERNAL TypePart(ETypePartDescriptor descriptor,
23 AdditionalDataType additionalData) noexcept;
24
30 REFUREKU_API void addDescriptorFlag(ETypePartDescriptor flag) noexcept;
31
32 REFUREKU_API bool isPointer() const noexcept;
33 REFUREKU_API bool isLValueReference() const noexcept;
34 REFUREKU_API bool isRValueReference() const noexcept;
35 REFUREKU_API bool isCArray() const noexcept;
36 REFUREKU_API bool isValue() const noexcept;
37 REFUREKU_API bool isConst() const noexcept;
38 REFUREKU_API bool isVolatile() const noexcept;
39 REFUREKU_API AdditionalDataType getCArraySize() const noexcept;
40
46 REFUREKU_API void setAdditionalData(AdditionalDataType data) noexcept;
47
48 private:
50 AdditionalDataType _additionalData = 0u;
51
53 ETypePartDescriptor _descriptor = ETypePartDescriptor::Undefined;
54
55__RFK_DISABLE_WARNING_PUSH
56__RFK_DISABLE_WARNING_UNUSED_PRIVATE_FIELD
57
62 uint16 _padding = 0u;
63
64__RFK_DISABLE_WARNING_POP
65 };
66
67 static_assert(sizeof(TypePart) == 8u, "TypePart must takes 8 bytes of fully initialized memory to allow the use of std::memcmp.");
68}
Definition: TypePart.h:17
REFUREKU_API void addDescriptorFlag(ETypePartDescriptor flag) noexcept
Add a flag to the descriptor field.
REFUREKU_API void setAdditionalData(AdditionalDataType data) noexcept
Setter for the field _additionalData.
Definition: Allocator.h:16
ETypePartDescriptor
Definition: ETypePartDescriptor.h:16