class floating_point_format


class floating_point_format

Description

A floating-point format is an object that provides the information that a formatter needs to turn a floating-point value into a string, and the information that a parser needs to turn a string into a floating-point value.

Public Member Functions

floating_point_format ()
noexcept

Construct a default floating-point format, where the radix is 10, the sign status is sign_status::only_when_negative, the thousands separator is thousands_separator::none, the radix character is radix_character::period, the radix place limit is radix_place_limit::none and the radix place count is 0.

floating_point_format (
    unsigned int initial_radix,
    sign_status initial_sign_status,
    thousands_separator initial_thousands_separator,
    radix_character initial_radix_character,
    radix_place_limit initial_radix_place_limit,
    unsigned int initial_radix_place_count
)

Construct a floating-point format with the given radix, sign status, thousands separator, radix character, radix place limit and radix place count.

Parameters:
  • initial_radix:

    The radix.

  • initial_sign_status:

    The sign status.

  • initial_thousands_separator:

    The thousands separator.

  • initial_radix_character:

    The radix character.

  • initial_radix_place_limit:

    The radix place limit.

  • initial_radix_place_count:

    The radix place count.

floating_point_format (
    const floating_point_format& other
)

Copy-constructs a floating_point_format from an existing one.

Parameters:
  • other:

    The floating_point_format to copy from.

floating_point_format&
operator = (
    const floating_point_format& other
)

Copy-assigns a floating_point_format into this one.

Parameters:
  • other:

    The floating_point_format to copy from.

floating_point_format (
    floating_point_format&& other
)
noexcept

Move-constructs a floating_point_format from an existing one.

Parameters:
  • other:

    The floating_point_format to move from.

floating_point_format&
operator = (
    floating_point_format&& other
)
noexcept

Move-assigns a floating_point_format into this one.

Parameters:
  • other:

    The floating_point_format to move from.

unsigned int
get_radix ()
const noexcept

Returns the radix of this floating-point format.

void
set_radix (
    unsigned int new_radix
)
noexcept

Sets the radix of this floating-point format.

Parameters:
  • new_radix:

    The new radix of this floating-point format.

sign_status
get_sign_status ()
const noexcept

Returns the sign status of this floating-point format.

void
set_sign_status (
    sign_status new_sign_status
)
noexcept

Sets the sign status of this floating-point format.

Parameters:
  • new_sign_status:

    The new sign status of this floating-point format.

thousands_separator
get_thousands_separator ()
const noexcept

Returns the thousands separator of this floating-point format.

void
set_thousands_separator (
    thousands_separator new_thousands_separator
)
noexcept

Sets the thousands separator of this floating-point format.

Parameters:
  • new_thousands_separator:

    The new thousands separator of this floating-point format.

radix_character
get_radix_character ()
const noexcept

Returns the radix character of this floating-point format.

void
set_radix_character (
    radix_character new_radix_character
)
noexcept

Sets the radix character of this floating-point format.

Parameters:
  • new_radix_character:

    The new radix character of this floating-point format.

radix_place_limit
get_radix_place_limit ()
const noexcept

Returns the radix place limit of this floating-point format.

void
set_radix_place_limit (
    radix_place_limit new_radix_place_limit
)
noexcept

Sets the radix place limit of this floating-point format.

Parameters:
  • new_radix_place_limit:

    The new radix place limit of this floating-point format.

unsigned int
get_radix_place_count ()
const noexcept

Returns the radix place count of this floating-point format.

void
set_radix_place_count (
    unsigned int new_radix_place_count
)
noexcept

Sets the radix place count of this floating-point format.

Parameters:
  • new_radix_place_count:

    The new radix place count of this floating-point format.



Copyright © 2022-2025 Daniel T. McGinnis

CCL was first published in 2022, and is still actively maintained.

This website was first published in 2022, and is still actively maintained.

This specific web page was first published in 2023.