6 #ifndef TURI_GLOBALS_GLOBALS_HPP 7 #define TURI_GLOBALS_GLOBALS_HPP 17 extern std::string GLOBALS_MAIN_PROCESS_PATH;
18 extern std::string GLOBALS_PYTHON_EXECUTABLE;
23 struct register_global;
54 struct register_global<int64_t>{
55 register_global(std::string name,
57 bool runtime_modifiable,
58 std::function<
bool(int64_t)> value_check =
nullptr);
83 struct register_global<double>{
84 register_global(std::string name,
86 bool runtime_modifiable,
87 std::function<
bool(
double)> value_check =
nullptr);
112 struct register_global<
std::string>{
113 register_global(std::string name,
115 bool runtime_modifiable,
116 std::function<
bool(std::string)> value_check =
nullptr);
126 std::vector<std::pair<std::string, flexible_type> > list_globals(
bool runtime_modifiable);
144 NOT_RUNTIME_MODIFIABLE = 2,
188 #define REGISTER_GLOBAL(type, varname, runtime_modifiable) \ 189 static auto __ ## varname ## __register__ ## instance = \ 190 ::turi::globals::register_global \ 191 <type>("TURI_" #varname, \ 227 #define REGISTER_GLOBAL_WITH_CHECKS(type, varname, runtime_modifiable, lambda) \ 228 static auto __ ## varname ## __register__ ## instance = \ 229 ::turi::globals::register_global \ 230 <type>("TURI_" #varname, \ 232 runtime_modifiable, \
set_global_error_codes set_global(std::string name, flexible_type val)
void initialize_globals_from_environment(std::string root_path)
flexible_type get_global(std::string name)