Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
double_conversion::StringToDoubleConverter Class Reference

#include <string-to-double.h>

Public Types

enum  Flags {
  NO_FLAGS = 0 , ALLOW_HEX = 1 , ALLOW_OCTALS = 2 , ALLOW_TRAILING_JUNK = 4 ,
  ALLOW_LEADING_SPACES = 8 , ALLOW_TRAILING_SPACES = 16 , ALLOW_SPACES_AFTER_SIGN = 32 , ALLOW_CASE_INSENSITIVITY = 64 ,
  ALLOW_CASE_INSENSIBILITY = 64 , ALLOW_HEX_FLOATS = 128
}
 

Public Member Functions

 StringToDoubleConverter (int flags, double empty_string_value, double junk_string_value, const char *infinity_symbol, const char *nan_symbol, uc16 separator=kNoSeparator)
 
double StringToDouble (const char *buffer, int length, int *processed_characters_count) const
 
double StringToDouble (const uc16 *buffer, int length, int *processed_characters_count) const
 
float StringToFloat (const char *buffer, int length, int *processed_characters_count) const
 
float StringToFloat (const uc16 *buffer, int length, int *processed_characters_count) const
 
template<typename T >
T StringTo (const char *buffer, int length, int *processed_characters_count) const
 
template<typename T >
T StringTo (const uc16 *buffer, int length, int *processed_characters_count) const
 
template<>
double StringTo (const char *buffer, int length, int *processed_characters_count) const
 
template<>
float StringTo (const char *buffer, int length, int *processed_characters_count) const
 
template<>
double StringTo (const uc16 *buffer, int length, int *processed_characters_count) const
 
template<>
float StringTo (const uc16 *buffer, int length, int *processed_characters_count) const
 

Static Public Attributes

static const uc16 kNoSeparator = '\0'
 

Detailed Description

Definition at line 35 of file string-to-double.h.

Member Enumeration Documentation

◆ Flags

Enumerator
NO_FLAGS 
ALLOW_HEX 
ALLOW_OCTALS 
ALLOW_TRAILING_JUNK 
ALLOW_LEADING_SPACES 
ALLOW_TRAILING_SPACES 
ALLOW_SPACES_AFTER_SIGN 
ALLOW_CASE_INSENSITIVITY 
ALLOW_CASE_INSENSIBILITY 
ALLOW_HEX_FLOATS 

Definition at line 39 of file string-to-double.h.

Constructor & Destructor Documentation

◆ StringToDoubleConverter()

double_conversion::StringToDoubleConverter::StringToDoubleConverter ( int  flags,
double  empty_string_value,
double  junk_string_value,
const char *  infinity_symbol,
const char *  nan_symbol,
uc16  separator = kNoSeparator 
)
inline

Definition at line 167 of file string-to-double.h.

173 : flags_(flags),
174 empty_string_value_(empty_string_value),
175 junk_string_value_(junk_string_value),
176 infinity_symbol_(infinity_symbol),
177 nan_symbol_(nan_symbol),
178 separator_(separator) {
179 }
FlutterSemanticsFlag flags

Member Function Documentation

◆ StringTo() [1/6]

template<>
double double_conversion::StringToDoubleConverter::StringTo ( const char *  buffer,
int  length,
int processed_characters_count 
) const

Definition at line 784 of file string-to-double.cc.

787 {
788 return StringToDouble(buffer, length, processed_characters_count);
789}
double StringToDouble(const char *buffer, int length, int *processed_characters_count) const
static const uint8_t buffer[]
size_t length

◆ StringTo() [2/6]

template<>
float double_conversion::StringToDoubleConverter::StringTo ( const char *  buffer,
int  length,
int processed_characters_count 
) const

Definition at line 793 of file string-to-double.cc.

796 {
797 return StringToFloat(buffer, length, processed_characters_count);
798}
float StringToFloat(const char *buffer, int length, int *processed_characters_count) const

◆ StringTo() [3/6]

template<typename T >
T double_conversion::StringToDoubleConverter::StringTo ( const char *  buffer,
int  length,
int processed_characters_count 
) const

◆ StringTo() [4/6]

template<>
double double_conversion::StringToDoubleConverter::StringTo ( const uc16 buffer,
int  length,
int processed_characters_count 
) const

Definition at line 802 of file string-to-double.cc.

805 {
806 return StringToDouble(buffer, length, processed_characters_count);
807}

◆ StringTo() [5/6]

template<>
float double_conversion::StringToDoubleConverter::StringTo ( const uc16 buffer,
int  length,
int processed_characters_count 
) const

Definition at line 811 of file string-to-double.cc.

814 {
815 return StringToFloat(buffer, length, processed_characters_count);
816}

◆ StringTo() [6/6]

template<typename T >
T double_conversion::StringToDoubleConverter::StringTo ( const uc16 buffer,
int  length,
int processed_characters_count 
) const

◆ StringToDouble() [1/2]

double double_conversion::StringToDoubleConverter::StringToDouble ( const char *  buffer,
int  length,
int processed_characters_count 
) const

Definition at line 749 of file string-to-double.cc.

752 {
753 return StringToIeee(buffer, length, true, processed_characters_count);
754}

◆ StringToDouble() [2/2]

double double_conversion::StringToDoubleConverter::StringToDouble ( const uc16 buffer,
int  length,
int processed_characters_count 
) const

Definition at line 757 of file string-to-double.cc.

760 {
761 return StringToIeee(buffer, length, true, processed_characters_count);
762}

◆ StringToFloat() [1/2]

float double_conversion::StringToDoubleConverter::StringToFloat ( const char *  buffer,
int  length,
int processed_characters_count 
) const

Definition at line 765 of file string-to-double.cc.

768 {
769 return static_cast<float>(StringToIeee(buffer, length, false,
770 processed_characters_count));
771}

◆ StringToFloat() [2/2]

float double_conversion::StringToDoubleConverter::StringToFloat ( const uc16 buffer,
int  length,
int processed_characters_count 
) const

Definition at line 774 of file string-to-double.cc.

777 {
778 return static_cast<float>(StringToIeee(buffer, length, false,
779 processed_characters_count));
780}

Member Data Documentation

◆ kNoSeparator

const uc16 double_conversion::StringToDoubleConverter::kNoSeparator = '\0'
static

Definition at line 52 of file string-to-double.h.


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