1 #include <vtestbed/iges/stream.hh> 7 if (s == this->_section) {
12 this->_maxsize = (s == Section::ParameterData) ? 64 : 72;
20 vtb::iges::iges_ostreambuf::overflow(int_type ch) -> int_type {
22 if (!traits_type::eq_int_type(ch, traits_type::eof())) {
30 vtb::iges::iges_ostreambuf::xsputn(
const char_type* first,
std::streamsize n) {
31 if (epptr()-pptr() < n && n <= max_size()) {
35 auto last = first + n;
36 while (first != last) {
37 auto m = std::min(epptr()-pptr(), last-first);
38 traits_type::copy(pptr(), first, m);
41 if (pptr() == epptr()) {
49 vtb::iges::iges_ostreambuf::sync() -> int_type {
51 return this->_sink->pubsync();
55 vtb::iges::iges_ostreambuf::newline() {
56 auto n = this->epptr() - this->pptr();
58 traits_type::assign(this->pptr(), n,
' ');
60 auto line_no = line_number();
61 if (this->_section == Section::ParameterData) {
79 this->_sink->sputn(this->data(), 81);
void section(Section s)
Set section code to s.