Visibility
class VisibilityHelper
Helper class for working with Visibility.
method from_tokenstatic
Converts a token to a Visibility value.
It supports both the visibility directive tokens (e.g., .public) and the visibility name tokens (e.g., public).
If the token does not represent a visibility, returns {}.
| static std::optional< Visibility > from_token | ( | const Token & token | ); |
| PARAMETER | DESCRIPTION |
|---|---|
token |
The token to convert. |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< Visibility > |
The corresponding Visibility value, or {} if the token does not represent a visibility. |
method namestatic
Get the name of a visibility.
| static Symbol name | ( | Visibility visibility | ); |
| PARAMETER | DESCRIPTION |
|---|---|
visibility |
The visibility to convert. |
| RETURNS | DESCRIPTION |
|---|---|
Symbol |
The corresponding name. |
method to_tokenstatic
Converts a Visibility value to a token.
| static Token to_token | ( | Visibility visibility, | |
| bool directive = true | ); |
| PARAMETER | DESCRIPTION |
|---|---|
visibility |
The visibility value to convert. |
directive |
If true, returns the corresponding directive token (e.g., |
| RETURNS | DESCRIPTION |
|---|---|
Token |
The corresponding token. |
member argument_namestatic
The name of the ARGUMENT visibility (argument).
member entity_namestatic
The name of the ENTITY scope type (entity).
member file_literalstatic
The name for the FILE visibility and scope type (local).
member file_namestatic
The name of the FILE scope type (file).
member namesstatic private
The names of the visibilities.
member private_literalstatic
The name for the PRIVATE visibility and scope type (private).
member public_literalstatic
The name for the PUBLIC visibility and scope type (public).
member token_file_directivestatic
The token for directive for the FILE visibility (.local).
member token_file_namestatic
The token for name for the FILE visibility (local).
member token_private_directivestatic
The token for directive for the PRIVATE visibility (.private).
member token_private_namestatic
The token for name for the PRIVATE visibility (private).
member token_public_directivestatic
The token for directive for the PUBLIC visibility (.public).
member token_public_namestatic
The token for name for the PUBLIC visibility (public).
class formatter< Visibility >
method formatconst
| auto format | ( | const Visibility & visibility, | |
| format_context & ctx | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
visibility |
|
ctx |
| RETURNS | DESCRIPTION |
|---|---|
auto |