Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
format_int Class Reference

#include <format.h>

Public Member Functions

auto c_str () const -> const char *
 
auto data () const -> const char *
 
 format_int (int value)
 
 format_int (long long value)
 
 format_int (long value)
 
 format_int (unsigned long long value)
 
 format_int (unsigned long value)
 
 format_int (unsigned value)
 
auto size () const -> size_t
 
auto str () const -> std::string
 

Private Types

enum  { buffer_size = std::numeric_limits<unsigned long long>::digits10 + 3 }
 

Private Member Functions

template<typename Int >
auto format_signed (Int value) -> char *
 
template<typename UInt >
auto format_unsigned (UInt value) -> char *
 

Private Attributes

char buffer_ [buffer_size]
 
char * str_
 

Detailed Description

Fast integer formatter.

Definition at line 3970 of file format.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
buffer_size 

Definition at line 3974 of file format.h.

Constructor & Destructor Documentation

◆ format_int() [1/6]

format_int::format_int ( int  value)
inlineexplicit

Definition at line 3993 of file format.h.

◆ format_int() [2/6]

format_int::format_int ( long  value)
inlineexplicit

Definition at line 3994 of file format.h.

◆ format_int() [3/6]

format_int::format_int ( long long  value)
inlineexplicit

Definition at line 3995 of file format.h.

◆ format_int() [4/6]

format_int::format_int ( unsigned  value)
inlineexplicit

Definition at line 3996 of file format.h.

◆ format_int() [5/6]

format_int::format_int ( unsigned long  value)
inlineexplicit

Definition at line 3997 of file format.h.

◆ format_int() [6/6]

format_int::format_int ( unsigned long long  value)
inlineexplicit

Definition at line 3998 of file format.h.

Member Function Documentation

◆ c_str()

auto format_int::c_str ( ) const -> const char*
inline

Returns a pointer to the output buffer content with terminating null character appended.

Definition at line 4016 of file format.h.

◆ data()

auto format_int::data ( ) const -> const char*
inline

Returns a pointer to the output buffer content. No terminating null character is appended.

Definition at line 4010 of file format.h.

◆ format_signed()

template<typename Int >
auto format_int::format_signed ( Int  value) -> char*
inlineprivate

Definition at line 3983 of file format.h.

◆ format_unsigned()

template<typename UInt >
auto format_int::format_unsigned ( UInt  value) -> char*
inlineprivate

Definition at line 3978 of file format.h.

◆ size()

auto format_int::size ( ) const -> size_t
inline

Returns the number of characters written to the output buffer.

Definition at line 4002 of file format.h.

◆ str()

auto format_int::str ( ) const -> std::string
inline

\rst Returns the content of the output buffer as an std::string. \endrst

Definition at line 4026 of file format.h.

Member Data Documentation

◆ buffer_

char format_int::buffer_[buffer_size]
mutableprivate

Definition at line 3975 of file format.h.

◆ str_

char* format_int::str_
private

Definition at line 3976 of file format.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:50