1 #ifndef LIBJMMCG_CORE_TEMP_FILE_HPP
2 #define LIBJMMCG_CORE_TEMP_FILE_HPP
39 inline temp_file(
const std::ios_base::openmode &om = (
std::ios_base::openmode)0);
45 static inline tstring get_file_name();
50 :
file<E, API, Mdl>(get_file_name(), om|
std::ios_base::in|
std::ios_base::out|
std::ios_base::trunc) {
55 :
file<E, API, Mdl>(get_file_name(),
std::ios_base::in|
std::ios_base::out|
std::ios_base::trunc) {
56 file<E, API, Mdl>::operator<<(tf.rdbuf());
65 file<E, API, Mdl>::remove();
67 file<E, API, Mdl>::file_type::operator<<(tf.rdbuf());
72 temp_file<E, API, Mdl>::get_file_name()
noexcept(
false) {
74 JMMCG_SYSCALL_WRAPPER(
"Failed to create the temporary name.", _T(LIBJMMCG_VERSION_NUMBER), ::tmpnam, n);
75 return StringToTString(n);