MOS Source Code
Loading...
Searching...
No Matches
Specifier Struct Reference

#include <formatter.hpp>

Public Types

enum class  FormatAlignment { _DEFAULT , LEFT , RIGHT , CENTER }
 
enum class  FormatSign { _DEFAULT , BOTH , NEGATIVE , LEADING_SPACE }
 
enum class  WidthPrecisionOrder { _NOT_SPECIFIED , WIDTH , PRECISION }
 

Public Member Functions

consteval size_t n_dynamic_args () const
 number of runtime arguments required to print this item.
 

Public Attributes

FormatAlignment alignment = FormatAlignment::_DEFAULT
 
size_t width = 0
 
size_t precision = 0
 
WidthPrecisionOrder order = WidthPrecisionOrder::_NOT_SPECIFIED
 
FormatSign sign = FormatSign::_DEFAULT
 
char filler = '\0'
 
bool debug = false
 
bool alternative = false
 

Static Public Attributes

static constexpr auto DYNAMIC = std::numeric_limits<size_t>::max()
 

Detailed Description

Definition at line 13 of file formatter.hpp.

Member Enumeration Documentation

◆ FormatAlignment

enum class FormatAlignment
strong
Enumerator
_DEFAULT 

default, left

LEFT 

left

RIGHT 

right

CENTER 

center

Definition at line 15 of file formatter.hpp.

◆ FormatSign

enum class FormatSign
strong
Enumerator
_DEFAULT 

default, negative

BOTH 

both native and positive numbers are prefixed with a sign

NEGATIVE 

only negative numbers are prefixed with a sign

LEADING_SPACE 

positive numbers are prefixed with a leading space

Definition at line 23 of file formatter.hpp.

◆ WidthPrecisionOrder

enum class WidthPrecisionOrder
strong
Enumerator
_NOT_SPECIFIED 
WIDTH 
PRECISION 

Definition at line 31 of file formatter.hpp.

Member Function Documentation

◆ n_dynamic_args()

size_t n_dynamic_args ( ) const
inlineconsteval

number of runtime arguments required to print this item.

Definition at line 60 of file formatter.hpp.

Member Data Documentation

◆ DYNAMIC

auto DYNAMIC = std::numeric_limits<size_t>::max()
staticconstexpr

◆ alignment

Definition at line 40 of file formatter.hpp.

Referenced by FormatImpl::SetAlignment().

◆ width

size_t width = 0

Definition at line 42 of file formatter.hpp.

Referenced by n_dynamic_args(), and FormatImpl::SetWidth().

◆ precision

size_t precision = 0

Definition at line 43 of file formatter.hpp.

Referenced by n_dynamic_args(), and FormatImpl::SetPrecision().

◆ order

◆ sign

Definition at line 49 of file formatter.hpp.

Referenced by FormatImpl::SetSign().

◆ filler

char filler = '\0'

Definition at line 50 of file formatter.hpp.

Referenced by FormatImpl::SetFiller().

◆ debug

bool debug = false

Definition at line 51 of file formatter.hpp.

Referenced by FormatImpl::SetDebugFormat().

◆ alternative

bool alternative = false

Definition at line 55 of file formatter.hpp.

Referenced by FormatImpl::SetAlternativeForm().


The documentation for this struct was generated from the following file: