Flutter Engine
The Flutter Engine
Classes | Functions | Variables
fml::icu Namespace Reference

Classes

class  ICUContext
 

Functions

void InitializeICUOnce (const std::string &icu_data_path)
 
void InitializeICU (const std::string &icu_data_path)
 
void InitializeICUFromMappingOnce (std::unique_ptr< Mapping > mapping)
 
void InitializeICUFromMapping (std::unique_ptr< Mapping > mapping)
 

Variables

std::once_flag g_icu_init_flag
 

Function Documentation

◆ InitializeICU()

void fml::icu::InitializeICU ( const std::string &  icu_data_path)

Definition at line 102 of file icu_util.cc.

102 {
103 std::call_once(g_icu_init_flag,
104 [&icu_data_path]() { InitializeICUOnce(icu_data_path); });
105}
void InitializeICUOnce(const std::string &icu_data_path)
Definition: icu_util.cc:95
std::once_flag g_icu_init_flag
Definition: icu_util.cc:101

◆ InitializeICUFromMapping()

void fml::icu::InitializeICUFromMapping ( std::unique_ptr< Mapping mapping)

Definition at line 113 of file icu_util.cc.

113 {
114 std::call_once(g_icu_init_flag, [mapping = std::move(mapping)]() mutable {
115 InitializeICUFromMappingOnce(std::move(mapping));
116 });
117}
void InitializeICUFromMappingOnce(std::unique_ptr< Mapping > mapping)
Definition: icu_util.cc:107

◆ InitializeICUFromMappingOnce()

void fml::icu::InitializeICUFromMappingOnce ( std::unique_ptr< Mapping mapping)

Definition at line 107 of file icu_util.cc.

107 {
108 static ICUContext* context = new ICUContext(std::move(mapping));
109 FML_CHECK(context->IsValid())
110 << "Unable to initialize the ICU context from a mapping.";
111}
bool IsValid() const
Definition: icu_util.cc:86
#define FML_CHECK(condition)
Definition: logging.h:85

◆ InitializeICUOnce()

void fml::icu::InitializeICUOnce ( const std::string &  icu_data_path)

Definition at line 95 of file icu_util.cc.

95 {
96 static ICUContext* context = new ICUContext(icu_data_path);
97 FML_CHECK(context->IsValid())
98 << "Must be able to initialize the ICU context. Tried: " << icu_data_path;
99}

Variable Documentation

◆ g_icu_init_flag

std::once_flag fml::icu::g_icu_init_flag

Definition at line 101 of file icu_util.cc.