Example #1
0
/* ---------------------------------------------------------------------- */
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;
}
Example #2
0
/* ---------------------------------------------------------------------- */
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;
}
Example #3
0
/* ---------------------------------------------------------------------- */
bool PHRQ_io::
output_open(const char *file_name, std::ios_base::openmode mode)
/* ---------------------------------------------------------------------- */
{
	return ofstream_open(&output_ostream, file_name, mode);
}
Example #4
0
/* ---------------------------------------------------------------------- */
{
	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);
}