"ScL Feature"
/
ScL Feature
0.0.1
C++20 composable proxy wrapper with pluggable executor strategy
Toggle main menu visibility
Loading...
Searching...
No Matches
reflect.h
Go to the documentation of this file.
1
#pragma once
2
47
48
#include <
scl/feature/reflection/method.h
>
49
#include <
scl/feature/reflection/operator.h
>
50
51
namespace
scl::feature
52
{
74
template
<
typename
Wrapper,
typename
Executor,
typename
Type>
75
class
reflect
76
{};
77
86
// NOLINTBEGIN(readability-function-cognitive-complexity, readability-inconsistent-ifelse-braces, cppcoreguidelines-missing-std-forward, cppcoreguidelines-rvalue-reference-param-not-moved)
87
template
<
typename
Wrapper,
typename
Executor>
88
class
reflect_operators
89
{
90
public
:
91
SCL_REFLECT_TYPE
(Wrapper, Executor)
92
93
SCL_REFLECT_PREFIX_UNARY_OPERATOR
(&, address_of)
94
SCL_REFLECT_PREFIX_UNARY_OPERATOR
(*, indirection)
95
SCL_REFLECT_OPERATOR_WITH_ARGUMENTS
(->*, arrow_to_pointer)
96
SCL_REFLECT_MEMBER_PREFIX_UNARY_OPERATOR
(->, arrow)
97
98
SCL_REFLECT_BINARY_OPERATOR
(SCL_FORWARD(, ), comma)
99
SCL_REFLECT_OPERATOR_WITH_ARGUMENTS
([], subscript)
100
SCL_REFLECT_OPERATOR_WITH_ARGUMENTS
((), call)
101
102
SCL_REFLECT_PREFIX_UNARY_OPERATOR
(+, unary_plus)
103
SCL_REFLECT_PREFIX_UNARY_OPERATOR
(-, unary_minus)
104
SCL_REFLECT_PREFIX_UNARY_OPERATOR
(++, prefix_increment)
105
SCL_REFLECT_PREFIX_UNARY_OPERATOR
(--, prefix_decrement)
106
SCL_REFLECT_PREFIX_UNARY_OPERATOR
(~, bitwise_not)
107
SCL_REFLECT_PREFIX_UNARY_OPERATOR
(!, logical_not)
108
109
SCL_REFLECT_POSTFIX_UNARY_OPERATOR
(++, postfix_increment)
110
SCL_REFLECT_POSTFIX_UNARY_OPERATOR
(--, postfix_decrement)
111
112
SCL_REFLECT_BINARY_OPERATOR
(==, equal_to)
113
SCL_REFLECT_BINARY_OPERATOR
(!=, not_equal_to)
114
SCL_REFLECT_BINARY_OPERATOR
(<, less)
115
SCL_REFLECT_BINARY_OPERATOR
(<=, less_equal)
116
SCL_REFLECT_BINARY_OPERATOR
(>, greater)
117
SCL_REFLECT_BINARY_OPERATOR
(>=, greater_equal)
118
119
SCL_REFLECT_BINARY_OPERATOR
(*, multiply)
120
SCL_REFLECT_BINARY_OPERATOR
(/, divide)
121
SCL_REFLECT_BINARY_OPERATOR
(%, modulo)
122
SCL_REFLECT_BINARY_OPERATOR
(+, plus)
123
SCL_REFLECT_BINARY_OPERATOR
(-, minus)
124
125
SCL_REFLECT_BINARY_OPERATOR
(<<, left_shift)
126
SCL_REFLECT_BINARY_OPERATOR
(>>, right_shift)
127
128
SCL_REFLECT_BINARY_OPERATOR
(&, bitwise_and)
129
SCL_REFLECT_BINARY_OPERATOR
(|, bitwise_or)
130
SCL_REFLECT_BINARY_OPERATOR
(^, bitwise_xor)
131
132
SCL_REFLECT_BINARY_OPERATOR
(&&, logical_and)
133
SCL_REFLECT_BINARY_OPERATOR
(||, logical_or)
134
135
SCL_REFLECT_MEMBER_BINARY_OPERATOR
(=, assign)
// NOLINT(cppcoreguidelines-c-copy-assignment-signature)
136
SCL_REFLECT_MEMBER_BINARY_OPERATOR
(*=, multiply_assign)
137
SCL_REFLECT_MEMBER_BINARY_OPERATOR
(/=, divide_assign)
138
SCL_REFLECT_MEMBER_BINARY_OPERATOR
(%=, modulo_assign)
139
SCL_REFLECT_MEMBER_BINARY_OPERATOR
(+=, plus_assign)
140
SCL_REFLECT_MEMBER_BINARY_OPERATOR
(-=, minus_assign)
141
SCL_REFLECT_MEMBER_BINARY_OPERATOR
(<<=, left_shift_assign)
142
SCL_REFLECT_MEMBER_BINARY_OPERATOR
(>>=, right_shift_assign)
143
SCL_REFLECT_MEMBER_BINARY_OPERATOR
(&=, bitwise_and_assign)
144
SCL_REFLECT_MEMBER_BINARY_OPERATOR
(|=, bitwise_or_assign)
145
SCL_REFLECT_MEMBER_BINARY_OPERATOR
(^=, bitwise_xor_assign)
146
};
147
// NOLINTEND(readability-function-cognitive-complexity, readability-inconsistent-ifelse-braces, cppcoreguidelines-missing-std-forward, cppcoreguidelines-rvalue-reference-param-not-moved)
148
149
}
// namespace scl::feature
scl::feature::reflect_operators
CRTP mixin that reflects all standard C++ operators through the executor.
Definition
reflect.h:89
scl::feature::reflect
Primary (terminal) template for the reflection mixin chain.
Definition
reflect.h:76
SCL_REFLECT_TYPE
#define SCL_REFLECT_TYPE(type, executor)
Declares the wrapper and executor types for use by SCL_REFLECT_METHOD.
Definition
type.h:27
SCL_REFLECT_PREFIX_UNARY_OPERATOR
#define SCL_REFLECT_PREFIX_UNARY_OPERATOR(op, name)
Generates proxy prefix-unary operators that reflect op from the wrapped object through the executor,...
Definition
operator.h:359
SCL_REFLECT_OPERATOR_WITH_ARGUMENTS
#define SCL_REFLECT_OPERATOR_WITH_ARGUMENTS(op, name)
Generates proxy call/subscript operators that reflect op from the wrapped object through the executor...
Definition
operator.h:567
SCL_REFLECT_BINARY_OPERATOR
#define SCL_REFLECT_BINARY_OPERATOR(op, name)
Generates proxy binary operators that reflect op from the wrapped object through the executor,...
Definition
operator.h:526
SCL_REFLECT_POSTFIX_UNARY_OPERATOR
#define SCL_REFLECT_POSTFIX_UNARY_OPERATOR(op, name)
Generates proxy postfix-unary operators that reflect op from the wrapped object through the executor,...
Definition
operator.h:418
SCL_REFLECT_MEMBER_PREFIX_UNARY_OPERATOR
#define SCL_REFLECT_MEMBER_PREFIX_UNARY_OPERATOR(op, name)
Generates member-only proxy prefix-unary operators (no hidden-friend variants).
Definition
operator.h:385
SCL_REFLECT_MEMBER_BINARY_OPERATOR
#define SCL_REFLECT_MEMBER_BINARY_OPERATOR(op, name)
Generates member-only proxy binary operators (no hidden-friend variants).
Definition
operator.h:548
method.h
Compile-time method reflection macros for wrapper types.
scl::feature
Namespace of the ScL Feature module.
operator.h
Compile-time operator reflection macros for wrapper types.
src
scl
feature
reflection
reflect.h
Generated by
1.18.0