|
|
@ -56,6 +56,7 @@ Crawler::Crawler() |
|
|
|
std::cout<<cl<<std::endl; |
|
|
|
std::cout<<cl<<std::endl; |
|
|
|
utils::datafile::Read(DATA,CONFIG_PATH + "class_directory"_S + cl + ".txt"); |
|
|
|
utils::datafile::Read(DATA,CONFIG_PATH + "class_directory"_S + cl + ".txt"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
utils::datafile::DEBUG_ACCESS_OPTIONS="debug_access_options"_I; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool Crawler::OnUserCreate(){ |
|
|
|
bool Crawler::OnUserCreate(){ |
|
|
@ -1162,33 +1163,64 @@ int main() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
datafilestringdata operator ""_s(const char*key,std::size_t len){ |
|
|
|
datafilestringdata operator ""_s(const char*key,std::size_t len){ |
|
|
|
|
|
|
|
if(utils::datafile::DEBUG_ACCESS_OPTIONS){ |
|
|
|
|
|
|
|
std::cout<<"Reading "<<std::string(key,len)<<std::endl; |
|
|
|
|
|
|
|
} |
|
|
|
return {DATA,std::string(key,len)}; |
|
|
|
return {DATA,std::string(key,len)}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
datafileintdata operator ""_i(const char*key,std::size_t len){ |
|
|
|
datafileintdata operator ""_i(const char*key,std::size_t len){ |
|
|
|
|
|
|
|
if(utils::datafile::DEBUG_ACCESS_OPTIONS){ |
|
|
|
|
|
|
|
std::cout<<"Reading "<<std::string(key,len)<<std::endl; |
|
|
|
|
|
|
|
} |
|
|
|
return {DATA,std::string(key,len)}; |
|
|
|
return {DATA,std::string(key,len)}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
datafilefloatdata operator ""_f(const char*key,std::size_t len){ |
|
|
|
datafilefloatdata operator ""_f(const char*key,std::size_t len){ |
|
|
|
|
|
|
|
if(utils::datafile::DEBUG_ACCESS_OPTIONS){ |
|
|
|
|
|
|
|
std::cout<<"Reading "<<std::string(key,len)<<std::endl; |
|
|
|
|
|
|
|
} |
|
|
|
return {DATA,std::string(key,len)}; |
|
|
|
return {DATA,std::string(key,len)}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
datafiledoubledata operator ""_d(const char*key,std::size_t len){ |
|
|
|
datafiledoubledata operator ""_d(const char*key,std::size_t len){ |
|
|
|
|
|
|
|
if(utils::datafile::DEBUG_ACCESS_OPTIONS){ |
|
|
|
|
|
|
|
std::cout<<"Reading "<<std::string(key,len)<<std::endl; |
|
|
|
|
|
|
|
} |
|
|
|
return {DATA,std::string(key,len)}; |
|
|
|
return {DATA,std::string(key,len)}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Pixel operator ""_Pixel(const char*key,std::size_t len){ |
|
|
|
|
|
|
|
if(utils::datafile::DEBUG_ACCESS_OPTIONS){ |
|
|
|
|
|
|
|
std::cout<<"Reading "<<std::string(key,len)<<std::endl; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return {uint8_t(DATA.GetProperty(std::string(key,len)).GetInt(0)),uint8_t(DATA.GetProperty(std::string(key,len)).GetInt(1)),uint8_t(DATA.GetProperty(std::string(key,len)).GetInt(2)),uint8_t(DATA.GetProperty(std::string(key,len)).GetInt(3))}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
std::string operator ""_S(const char*key,std::size_t len){ |
|
|
|
std::string operator ""_S(const char*key,std::size_t len){ |
|
|
|
|
|
|
|
if(utils::datafile::DEBUG_ACCESS_OPTIONS){ |
|
|
|
|
|
|
|
std::cout<<"Reading "<<std::string(key,len)<<std::endl; |
|
|
|
|
|
|
|
} |
|
|
|
return DATA.GetProperty(std::string(key,len)).GetString(); |
|
|
|
return DATA.GetProperty(std::string(key,len)).GetString(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int operator ""_I(const char*key,std::size_t len){ |
|
|
|
int operator ""_I(const char*key,std::size_t len){ |
|
|
|
|
|
|
|
if(utils::datafile::DEBUG_ACCESS_OPTIONS){ |
|
|
|
|
|
|
|
std::cout<<"Reading "<<std::string(key,len)<<std::endl; |
|
|
|
|
|
|
|
} |
|
|
|
return DATA.GetProperty(std::string(key,len)).GetInt(); |
|
|
|
return DATA.GetProperty(std::string(key,len)).GetInt(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
float operator ""_F(const char*key,std::size_t len){ |
|
|
|
float operator ""_F(const char*key,std::size_t len){ |
|
|
|
|
|
|
|
if(utils::datafile::DEBUG_ACCESS_OPTIONS){ |
|
|
|
|
|
|
|
std::cout<<"Reading "<<std::string(key,len)<<std::endl; |
|
|
|
|
|
|
|
} |
|
|
|
return DATA.GetProperty(std::string(key,len)).GetReal(); |
|
|
|
return DATA.GetProperty(std::string(key,len)).GetReal(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
double operator ""_D(const char*key,std::size_t len){ |
|
|
|
double operator ""_D(const char*key,std::size_t len){ |
|
|
|
|
|
|
|
if(utils::datafile::DEBUG_ACCESS_OPTIONS){ |
|
|
|
|
|
|
|
std::cout<<std::string(key,len)<<std::endl; |
|
|
|
|
|
|
|
} |
|
|
|
return DATA.GetProperty(std::string(key,len)).GetReal(); |
|
|
|
return DATA.GetProperty(std::string(key,len)).GetReal(); |
|
|
|
} |
|
|
|
} |