SoPlex Documentation
Loading...
Searching...
No Matches

#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)
 
std::size_t size () const
 
const char * data () const
 
const char * c_str () const
 
std::string str () const
 

Private Types

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

Private Member Functions

char * format_decimal (unsigned long long value)
 
void format_signed (long long value)
 

Private Attributes

char buffer_ [buffer_size]
 
char * str_
 

Detailed Description

Fast integer formatter.

Definition at line 2818 of file format.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
buffer_size 

Definition at line 2822 of file format.h.

Constructor & Destructor Documentation

◆ format_int() [1/6]

format_int ( int value)
explicit

Definition at line 2857 of file format.h.

◆ format_int() [2/6]

format_int ( long value)
explicit

Definition at line 2858 of file format.h.

◆ format_int() [3/6]

format_int ( long long value)
explicit

Definition at line 2859 of file format.h.

◆ format_int() [4/6]

format_int ( unsigned value)
explicit

Definition at line 2860 of file format.h.

◆ format_int() [5/6]

format_int ( unsigned long value)
explicit

Definition at line 2861 of file format.h.

◆ format_int() [6/6]

format_int ( unsigned long long value)
explicit

Definition at line 2862 of file format.h.

Member Function Documentation

◆ c_str()

const char * c_str ( ) const

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

Definition at line 2879 of file format.h.

◆ data()

const char * data ( ) const

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

Definition at line 2873 of file format.h.

◆ format_decimal()

char * format_decimal ( unsigned long long value)
private

Definition at line 2827 of file format.h.

References basic_data< T >::digits, and ptr().

◆ format_signed()

void format_signed ( long long value)
private

Definition at line 2848 of file format.h.

◆ size()

std::size_t size ( ) const

Returns the number of characters written to the output buffer.

Definition at line 2865 of file format.h.

References internal::to_unsigned().

◆ str()

std::string str ( ) const

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

Definition at line 2889 of file format.h.

Member Data Documentation

◆ buffer_

char buffer_[buffer_size]
mutableprivate

Definition at line 2823 of file format.h.

◆ str_

char* str_
private

Definition at line 2824 of file format.h.