| #pragma once |
| |
| #ifndef igs_resource_msg_from_err_h |
| #define igs_resource_msg_from_err_h |
| |
| #include <string> |
| #include "igs_os_type.h" |
| |
| #define igs_tostr(n) igs_tostr_(n) |
| #define igs_tostr_(n) #n |
| |
| #ifndef IGS_RESOURCE_LOG_EXPORT |
| #define IGS_RESOURCE_LOG_EXPORT |
| #endif |
| |
| |
| namespace igs { |
| namespace resource { |
| |
| IGS_RESOURCE_LOG_EXPORT void locale_to_jp(void); |
| |
| IGS_RESOURCE_LOG_EXPORT void mbs_to_wcs(const std::string &mbs, |
| std::wstring &wcs); |
| |
| IGS_RESOURCE_LOG_EXPORT void wcs_to_mbs(const std::wstring &wcs, |
| std::string &mbs); |
| |
| |
| |
| |
| |
| |
| const std::basic_string<TCHAR> ts_from_mbs(const std::string &mbs); |
| |
| const std::string mbs_from_ts(const std::basic_string<TCHAR> &ts); |
| |
| const std::string utf8_from_cp932_mb(const std::string &text); |
| |
| const std::string cp932_from_utf8_mb(const std::string &text); |
| } |
| } |
| |
| |
| namespace igs { |
| namespace resource { |
| const std::string msg_from_err_( |
| const std::basic_string<TCHAR> &tit, |
| const int erno, const std::string &file, |
| const std::string &line, |
| const std::string &pretty_function, |
| const std::string &comp_type, |
| const std::string &gnuc, |
| const std::string &gnuc_minor, |
| const std::string &gnuc_patchlevel, |
| const std::string &gnuc_rh_release, |
| const std::string &date, |
| const std::string &time); |
| } |
| } |
| |
| #define igs_resource_msg_from_err(tit, erno) \ |
| igs::resource::msg_from_err_( \ |
| tit, erno, __FILE__, igs_tostr(__LINE__), __PRETTY_FUNCTION__, \ |
| igs_tostr_(__GNUC__), igs_tostr(__GNUC__), igs_tostr(__GNUC_MINOR__), \ |
| igs_tostr(__GNUC_PATCHLEVEL__), igs_tostr(__GNUC_RH_RELEASE__), \ |
| __DATE__, __TIME__) |
| |
| #define igs_resource_msg_from_er(tit) \ |
| igs::resource::msg_from_err_( \ |
| tit, 0, __FILE__, igs_tostr(__LINE__), __PRETTY_FUNCTION__, \ |
| igs_tostr_(__GNUC__), igs_tostr(__GNUC__), igs_tostr(__GNUC_MINOR__), \ |
| igs_tostr(__GNUC_PATCHLEVEL__), igs_tostr(__GNUC_RH_RELEASE__), \ |
| __DATE__, __TIME__) |
| #endif |