19 precision_(8), buf_(0)
26 ostream_ = std::make_unique<std::ostringstream>();
28 buf_ =
static_cast<std::ostringstream *
>(
ostream_.get());
30 buf_->setf(ios::scientific);
31 buf_->precision(precision_);
42 return (
int)buf_->precision();
71 string_ = std::string(buf_->str());
72 return string_.c_str();
78 return (
int)buf_->tellp();
bool bin_
Is this a binary flux?
const char * str()
Returns a pointer to the beginning of the buffer.
Sortie & flush() override
Forces writing of buffered data to disk. Uses the ofstream implementation.
void put_null_char()
Appends a null character at the end of the buffer to make it a valid C string.
void precision(int) override
std::unique_ptr< ostream > ostream_