/* ---------------------------------------------------------------------- */ bool PHRQ_io:: error_open(const char *file_name, std::ios_base::openmode mode) /* ---------------------------------------------------------------------- */ { if (file_name != NULL) { if (!ofstream_open(&error_ostream, file_name, mode)) { error_ostream = &std::cerr; return false; } } else { error_ostream = &std::cerr; } return true; }
/* ---------------------------------------------------------------------- */ bool PHRQ_io:: error_open(const char *file_name, std::ios_base::openmode mode) /* ---------------------------------------------------------------------- */ { if (file_name != NULL) { if (!ofstream_open(&error_ostream, file_name, mode)) { #if !defined(R_SO) error_ostream = &std::cerr; #endif return false; } } else { #if !defined(R_SO) error_ostream = &std::cerr; #endif } return true; }
/* ---------------------------------------------------------------------- */ bool PHRQ_io:: output_open(const char *file_name, std::ios_base::openmode mode) /* ---------------------------------------------------------------------- */ { return ofstream_open(&output_ostream, file_name, mode); }
/* ---------------------------------------------------------------------- */ { if (log_ostream != NULL && log_on) { (*log_ostream) << str; } } // ---------------------------------------------------------------------- */ // punch ostream methods // ---------------------------------------------------------------------- */ bool PHRQ_io:: punch_open(const char *file_name, std::ios_base::openmode mode, int n_user) /* ---------------------------------------------------------------------- */ { return ofstream_open(&punch_ostream, file_name, mode); }