Agora  1.2.0
Agora project
fmt::v8::format_int Class Reference

#include <format.h>

Public Member Functions

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

Private Types

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

Private Member Functions

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

Private Attributes

char buffer_ [buffer_size]
 
char * str_
 

Detailed Description

Fast integer formatter.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
buffer_size 

Constructor & Destructor Documentation

◆ format_int() [1/6]

fmt::v8::format_int::format_int ( int  value)
inlineexplicit

◆ format_int() [2/6]

fmt::v8::format_int::format_int ( long  value)
inlineexplicit

◆ format_int() [3/6]

fmt::v8::format_int::format_int ( long long  value)
inlineexplicit

◆ format_int() [4/6]

fmt::v8::format_int::format_int ( unsigned  value)
inlineexplicit

◆ format_int() [5/6]

fmt::v8::format_int::format_int ( unsigned long  value)
inlineexplicit

◆ format_int() [6/6]

fmt::v8::format_int::format_int ( unsigned long long  value)
inlineexplicit

Member Function Documentation

◆ c_str()

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

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

◆ data()

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

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

◆ format_signed()

template<typename Int >
auto fmt::v8::format_int::format_signed ( Int  value) -> char*
inlineprivate
Here is the call graph for this function:

◆ format_unsigned()

template<typename UInt >
auto fmt::v8::format_int::format_unsigned ( UInt  value) -> char*
inlineprivate
Here is the call graph for this function:

◆ size()

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

Returns the number of characters written to the output buffer.

Here is the call graph for this function:

◆ str()

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

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

Member Data Documentation

◆ buffer_

char fmt::v8::format_int::buffer_[buffer_size]
mutableprivate

◆ str_

char* fmt::v8::format_int::str_
private

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