Skip to content

Visibility

INCLUDE FILE
#include "Visibility.h"

class VisibilityHelper

Helper class for working with Visibility.

DEFINITION
class VisibilityHelper;

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 {}.

DEFINITION
static std::optional< Visibility >  from_token ( const Token & token );
PARAMETERDESCRIPTION
token

The token to convert.

RETURNSDESCRIPTION
std::optional< Visibility >

The corresponding Visibility value, or {} if the token does not represent a visibility.

method namestatic

Get the name of a visibility.

DEFINITION
static Symbol  name ( Visibility  visibility );
PARAMETERDESCRIPTION
visibility

The visibility to convert.

RETURNSDESCRIPTION
Symbol

The corresponding name.

method to_tokenstatic

Converts a Visibility value to a token.

DEFINITION
static Token  to_token ( Visibility  visibility,
bool  directive = true );
PARAMETERDESCRIPTION
visibility

The visibility value to convert.

directive

If true, returns the corresponding directive token (e.g., .public). If false, returns the corresponding name token (e.g., public).

RETURNSDESCRIPTION
Token

The corresponding token.

member argument_namestatic

The name of the ARGUMENT visibility (argument).

DEFINITION
static const char  argument_name;

member entity_namestatic

The name of the ENTITY scope type (entity).

DEFINITION
static const char  entity_name;

member file_literalstatic

The name for the FILE visibility and scope type (local).

DEFINITION
static const char  file_literal;

member file_namestatic

The name of the FILE scope type (file).

DEFINITION
static const char  file_name;

member namesstatic private

The names of the visibilities.

DEFINITION
static Symbol  names;

member private_literalstatic

The name for the PRIVATE visibility and scope type (private).

DEFINITION
static const char  private_literal;

member public_literalstatic

The name for the PUBLIC visibility and scope type (public).

DEFINITION
static const char  public_literal;

member token_file_directivestatic

The token for directive for the FILE visibility (.local).

DEFINITION
static const Token  token_file_directive;

member token_file_namestatic

The token for name for the FILE visibility (local).

DEFINITION
static const Token  token_file_name;

member token_private_directivestatic

The token for directive for the PRIVATE visibility (.private).

DEFINITION
static const Token  token_private_directive;

member token_private_namestatic

The token for name for the PRIVATE visibility (private).

DEFINITION
static const Token  token_private_name;

member token_public_directivestatic

The token for directive for the PUBLIC visibility (.public).

DEFINITION
static const Token  token_public_directive;

member token_public_namestatic

The token for name for the PUBLIC visibility (public).

DEFINITION
static const Token  token_public_name;

class formatter< Visibility >

DEFINITION
class formatter< Visibility >;

method formatconst

DEFINITION
auto  format ( const Visibility & visibility,
format_context & ctx ) const;
PARAMETERDESCRIPTION
visibility
ctx
RETURNSDESCRIPTION
auto