xtd
0.2.0
Loading...
Searching...
No Matches
◆
operator auto()
template<typename enum_t >
xtd::enum_register
< enum_t >::operator auto
(
)
const
inline
explicit
noexcept
Allows to register an enumeration that can be used by
xtd::enum_object
.
Returns
An
xtd::enum_collection
collection that represent enumeration.
Remarks
To register an enumeration just override
xtd::enum_register
.
Examples
The following code show how to register the values enum class.
enum class
values {
value_one,
value_two
};
template
<>
xtd::enum_register<values>
{
explicit
operator
auto
()
const
noexcept
{
return
xtd::enum_collection<values>
{{values::value_one,
"value_one"
}, {values::value_two,
"value_two"
}};}
};
xtd::enum_collection
std::vector< xtd::collections::generic::key_value_pair< enum_t, xtd::string > > enum_collection
Represents a pair of an enum_t value and a string of an enum of type enum_t.
Definition
enum_collection.h:22
xtd::enum_register
Provides the registration struct for enumerations.
Definition
enum_register.h:38
xtd
enum_register
Generated on Sat Sep 14 2024 21:25:17 for xtd by
Gammasoft
. All rights reserved.