1 #ifndef VTESTBED_IGES_STREAM_HH 2 #define VTESTBED_IGES_STREAM_HH 7 #include <vtestbed/iges/section.hh> 28 using std::streambuf::int_type;
29 using std::streambuf::char_type;
30 using std::streambuf::traits_type;
31 typedef char_type* pointer;
32 typedef const char_type* const_pointer;
37 Section _section = Section::Start;
41 char _parameter_delimiter =
',';
42 char _record_delimiter =
';';
51 _sink{sink}, _parameter_delimiter{d1}, _record_delimiter{d2} {
56 parameter_delimiter()
const noexcept {
57 return this->_parameter_delimiter;
61 record_delimiter()
const noexcept {
62 return this->_record_delimiter;
82 next_entity_number() {
83 return ++this->_number;
92 overflow(int_type ch)
override;
108 data()
const noexcept {
114 return sizeof(_line);
118 max_size() noexcept {
119 return this->_maxsize;
123 section_character()
const noexcept {
124 return static_cast<char_type>(_section);
129 this->
setp(this->data(), this->data() + this->max_size());
157 _buffer(sink, d1, d2) {
162 parameter_delimiter()
const noexcept {
163 return this->_buffer.parameter_delimiter();
167 record_delimiter()
const noexcept {
168 return this->_buffer.record_delimiter();
172 next_entity_number() {
173 return this->_buffer.next_entity_number();
177 line_number()
const {
178 return this->_buffer.line_number();
188 this->_buffer.finish();
193 this->_buffer.sink(sink);
203 #endif // vim:filetype=cpp
Stream buffer that automatically wraps text for IGES files.
Output stream that automatically wraps text for IGES files.
void section(Section s)
Set section code to s.