Pyrogenesis  trunk
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
fmt::FormatInt Class Reference

Fast integer formatter. More...

#include <format.h>

Public Member Functions

 FormatInt (int value)
 
 FormatInt (long value)
 
 FormatInt (LongLong value)
 
 FormatInt (unsigned value)
 
 FormatInt (unsigned long value)
 
 FormatInt (ULongLong value)
 
std::size_t size () const
 Returns the number of characters written to the output buffer. More...
 
const char * data () const
 Returns a pointer to the output buffer content. More...
 
const char * c_str () const
 Returns a pointer to the output buffer content with terminating null character appended. More...
 
std::string str () const
 Returns the content of the output buffer as an std::string. More...
 

Private Types

enum  { BUFFER_SIZE = std::numeric_limits<ULongLong>::digits10 + 3 }
 

Private Member Functions

char * format_decimal (ULongLong value)
 
void FormatSigned (LongLong value)
 

Private Attributes

char buffer_ [BUFFER_SIZE]
 
char * str_
 

Detailed Description

Fast integer formatter.

Member Enumeration Documentation

anonymous enum
private
Enumerator
BUFFER_SIZE 

Constructor & Destructor Documentation

fmt::FormatInt::FormatInt ( int  value)
inlineexplicit
fmt::FormatInt::FormatInt ( long  value)
inlineexplicit
fmt::FormatInt::FormatInt ( LongLong  value)
inlineexplicit
fmt::FormatInt::FormatInt ( unsigned  value)
inlineexplicit
fmt::FormatInt::FormatInt ( unsigned long  value)
inlineexplicit
fmt::FormatInt::FormatInt ( ULongLong  value)
inlineexplicit

Member Function Documentation

const char* fmt::FormatInt::c_str ( ) const
inline

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

const char* fmt::FormatInt::data ( ) const
inline

Returns a pointer to the output buffer content.

No terminating null character is appended.

char* fmt::FormatInt::format_decimal ( ULongLong  value)
inlineprivate
void fmt::FormatInt::FormatSigned ( LongLong  value)
inlineprivate
std::size_t fmt::FormatInt::size ( ) const
inline

Returns the number of characters written to the output buffer.

std::string fmt::FormatInt::str ( ) const
inline

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

Member Data Documentation

char fmt::FormatInt::buffer_[BUFFER_SIZE]
mutableprivate
char* fmt::FormatInt::str_
private

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