A four character label/tag/id.
More...
#include <label_type.hpp>
|
| constexpr | Label () |
| | Create an empty label, i.e.
|
| constexpr | Label (const char(&label)[5]) |
| | Create a label with the given 4 letter character string.
|
| constexpr | Label (const uint8_t(&label)[4]) |
| | Create a label with the given 4 bytes.
|
| constexpr std::strong_ordering | operator<=> (const Label< Tag > &other) const =default |
| | Default spaceship operator.
|
| constexpr bool | Empty () const |
| | Check whether the label is empty.
|
| std::string | AsString () const |
| | Get the label as a std::string.
|
template<typename Tag>
struct Label< Tag >
A four character label/tag/id.
- Template Parameters
-
| Tag | Type to distinguish labels/tags/ids of different types. |
Definition at line 38 of file label_type.hpp.
◆ Label() [1/3]
Create an empty label, i.e.
all zeros.
Definition at line 40 of file label_type.hpp.
◆ Label() [2/3]
template<typename Tag>
| Label< Tag >::Label |
( |
const char(&) | label[5] | ) |
|
|
inlineconstexpr |
Create a label with the given 4 letter character string.
- Parameters
-
- Note
- This defines 5 characters, but the 5th character is assumed to null-terminator.
Definition at line 50 of file label_type.hpp.
◆ Label() [3/3]
template<typename Tag>
| Label< Tag >::Label |
( |
const uint8_t(&) | label[4] | ) |
|
|
inlineconstexpr |
Create a label with the given 4 bytes.
- Parameters
-
Definition at line 59 of file label_type.hpp.
◆ operator<=>()
template<typename Tag>
| std::strong_ordering Label< Tag >::operator<=> |
( |
const Label< Tag > & | other | ) |
const |
|
constexprdefault |
Default spaceship operator.
- Parameters
-
| other | The label to compare to. |
- Returns
- The comparison ordering.
The documentation for this struct was generated from the following file: