Refureku v2.2.0
C++17 runtime reflection library.
NonTypeTemplateArgument.h
1
8#pragma once
9
10#include "Refureku/TypeInfo/Archetypes/Template/TemplateArgument.h"
11#include "Refureku/TypeInfo/Archetypes/GetArchetype.h"
12
13namespace rfk
14{
15 //Forward declaration
16 class Archetype;
17
19 {
20 public:
21 template <typename T>
22 NonTypeTemplateArgument(T const& value) noexcept;
23
24 REFUREKU_API NonTypeTemplateArgument(Archetype const* valueArchetype,
25 void const* valuePtr) noexcept;
26 REFUREKU_API ~NonTypeTemplateArgument() noexcept;
27
33 RFK_NODISCARD REFUREKU_API
34 Archetype const* getArchetype() const noexcept;
35
45 template <typename T>
46 RFK_NODISCARD T const& getValue() const noexcept;
47
53 RFK_NODISCARD REFUREKU_API
54 void const* getValuePtr() const noexcept;
55
64 RFK_NODISCARD REFUREKU_API bool operator==(NonTypeTemplateArgument const& other) const noexcept;
65 RFK_NODISCARD REFUREKU_API bool operator!=(NonTypeTemplateArgument const& other) const noexcept;
66
67 protected:
68 //Forward declaration
69 class NonTypeTemplateArgumentImpl;
70
71 RFK_GEN_GET_PIMPL(NonTypeTemplateArgumentImpl, TemplateArgument::getPimpl())
72 };
73
74 #include "Refureku/TypeInfo/Archetypes/Template/NonTypeTemplateArgument.inl"
75}
Definition: Archetype.h:16
Definition: NonTypeTemplateArgument.h:19
RFK_NODISCARD REFUREKU_API Archetype const * getArchetype() const noexcept
Get the archetype of the argument.
RFK_NODISCARD REFUREKU_API void const * getValuePtr() const noexcept
Get a pointer to the argument value.
RFK_NODISCARD T const & getValue() const noexcept
Get the value of the non-type template argument. If the provided type is not the original type of the...
Definition: TemplateArgument.h:19
Definition: Allocator.h:16