Flutter Engine
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 103 of file icu_util.cc.

References InitializeICUOnce().

Referenced by benchmarking::Main(), main(), flutter::PerformInitializationTasks(), and flutter_runner::Runner::~Runner().

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

◆ InitializeICUFromMapping()

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

Definition at line 114 of file icu_util.cc.

References InitializeICUFromMappingOnce().

Referenced by flutter::PerformInitializationTasks().

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

◆ InitializeICUFromMappingOnce()

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

Definition at line 108 of file icu_util.cc.

References FML_CHECK, fml::icu::ICUContext::ICUContext(), and fml::icu::ICUContext::IsValid().

Referenced by InitializeICUFromMapping().

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

◆ InitializeICUOnce()

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

Definition at line 96 of file icu_util.cc.

References FML_CHECK, fml::icu::ICUContext::ICUContext(), and fml::icu::ICUContext::IsValid().

Referenced by InitializeICU().

96  {
97  static ICUContext* context = new ICUContext(icu_data_path);
98  FML_CHECK(context->IsValid())
99  << "Must be able to initialize the ICU context. Tried: " << icu_data_path;
100 }
#define FML_CHECK(condition)
Definition: logging.h:68

Variable Documentation

◆ g_icu_init_flag

std::once_flag fml::icu::g_icu_init_flag

Definition at line 102 of file icu_util.cc.