|
dxFeed Graal CXX API v9.0.0
|
A base of the enums that emulate Java enums. More...
#include <Enum.hpp>
Public Member Functions | |
| constexpr Code | getCode () const noexcept |
| Returns code that is used in flag bits. | |
| std::string | getName () const |
| Returns the enum element name. | |
| std::string | toString () const |
| Returns a string representation of an enum element. | |
Static Public Member Functions | |
| template<Integral OtherCodeType> | |
| static const Child & | valueOf (OtherCodeType code) noexcept |
| Returns enum element by integer code bit pattern. | |
Protected Member Functions | |
| template<Integral OtherCodeType> | |
| constexpr | Enum (OtherCodeType code, std::string_view name) noexcept |
| Creates an element of the enum. | |
Friends | |
| template<dxfcpp::ConvertibleTo< Enum< Child, Code > > E> | |
| bool | operator== (const E &e1, const E &e2) |
| Compares two elements of an enum. | |
| template<typename OStream, dxfcpp::ConvertibleTo< Enum< Child, Code > > E> | |
| OStream & | operator<< (OStream &os, const E &e) |
| Puts the string representation of an enum element to the output stream. | |
A base of the enums that emulate Java enums.
The elements are constant-initialized (constinit), so they and valueOf() can be used in the dynamic initialization of global variables.
| Child | The enum type: declares static const std::span<const std::reference_wrapper<const Child>> ALL, all elements of the enum, one of them with code 0 (the default of the bit field of an event). |
| Code | The type of the element code. |
|
inlineconstexprprotectednoexcept |
Creates an element of the enum.
| code | The element code. |
| name | The element name with static storage duration (a string literal). |
|
inlinenodiscardconstexprnoexcept |
Returns code that is used in flag bits.
|
inlinenodiscard |
Returns the enum element name.
|
inlinenodiscard |
Returns a string representation of an enum element.
|
inlinestaticnoexcept |
Returns enum element by integer code bit pattern.
| code | integer code. |
|
friend |
Puts the string representation of an enum element to the output stream.
| OStream | A type of the output stream |
| E | Type convertible to enum Enum<Child, Code> |
| os | The output stream |
| e | The element of the enum |
|
friend |
Compares two elements of an enum.
| E | Type convertible to enum Enum<Child, Code> |
| e1 | The first element of the enum to be compared |
| e2 | The second element of the enum to be compared |