Flutter Engine
The Flutter Engine
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
size_t length
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126

◆ 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: