std::string BOOST_WAVETEST_GETSTRING(std::ostrstream& ss)
{
    ss << ends;
    std::string rval = ss.str();
    ss.freeze(false);
    return rval;
}
Пример #2
0
inline std::string HPX_PLUGIN_OSSTREAM_GETSTRING(std::ostrstream& ss)
{
    ss << std::ends;
    std::string rval = ss.str();
    ss.freeze(false);
    return rval;
}
Пример #3
0
void log::save(std::string filename) {
//	FILE *fp = fopen_s(filename.c_str(), "w");
	FILE *fp;
	fopen_s(&fp, filename.c_str(), "w");

	if (!fp) throw FatalException("unable to open logfile!");

	char *string = new char[logstream.pcount() + 1];
	memcpy(string, logstream.str(), logstream.pcount() + 1);
	string[logstream.pcount()] = '\0';
	fprintf(fp, "%s", string);
	delete string;

	fclose(fp);
}
Пример #4
0
void log::clear(void) {
	logstream.clear();
}