My Project
Classes | Enumerations | Variables
fmt_options.hpp File Reference
#include "char_type.hpp"
#include "cstr_type.hpp"
#include "cstdint.hpp"
#include "cstring.hpp"
#include "npos.hpp"

Go to the source code of this file.

Classes

class  bsl::fmt_options
 Used by fmt to determine how to format the output of an fmt command. See the documentation fo bsl::fmt for more information. More...
 

Enumerations

enum  bsl::details::fmt_fsm : bsl::uint32 {
  fmt_fsm_align = 0U, fmt_fsm_sign = 1U, fmt_fsm_alternate_form = 2U, fmt_fsm_sign_aware = 3U,
  fmt_fsm_width = 4U, fmt_fsm_type = 5U
}
 Used to define a finite state machine that is used to parse the {fmt} style syntax for formatting. Although there are many ways to implement a parser, the FSM proved to be a really simple approach, even though the FSM in this case is overly simplified. What makes this approach so simple is each field is accounted for in the FSM, yet each parser is optional based on what the user provides, so everything is accounted for.
 
enum  bsl::fmt_align : bsl::uint32 { fmt_align_default = 0U, fmt_align_left = 1U, fmt_align_right = 2U, fmt_align_center = 3U }
 Used to determine what the alignment of the output should be. If the width is not defined, this field does nothing.
 
enum  bsl::fmt_sign : bsl::uint32 { fmt_sign_neg_only = 0U, fmt_sign_pos_neg = 1U, fmt_sign_space_for_pos = 3U }
 Used to determine how an integral's sign field is handled. This only has an effect on signed types.
 
enum  bsl::fmt_type : bsl::uint32 {
  fmt_type_default = 0U, fmt_type_b = 1U, fmt_type_c = 2U, fmt_type_d = 3U,
  fmt_type_s = 4U, fmt_type_x = 5U
}
 Used to determine how to output an unsigned integer type (either as hex or dec). All ofther {fmt} types are currently not supported and this has no effect on signed integer types.
 

Variables

constexpr fmt_options bsl::nullops {""}
 defines no formatting.
 
constexpr fmt_options bsl::ptrops
 defines how to format a ptr like type. More...
 

Detailed Description

Variable Documentation

◆ ptrops

constexpr fmt_options bsl::ptrops
Initial value:
{
(sizeof(bsl::uintptr) == sizeof(bsl::uint32)) ? "#010x" : "#018x"}
::uint32_t uint32
defines an 32bit unsigned integer
Definition: cstdint.hpp:49
::uintptr_t uintptr
defines a unsigned integer the size of a void *
Definition: cstdint.hpp:92

defines how to format a ptr like type.