| 592 | } |
| 593 | |
| 594 | short |
| 595 | SerialStream::GetVMin() |
| 596 | try |
| 597 | { |
| 598 | auto my_buffer = dynamic_cast<SerialStreamBuf *>(this->rdbuf()) ; |
| 599 | |
| 600 | // Make sure that we are dealing with a SerialStreamBuf before |
| 601 | // proceeding. This check also makes sure that we have a non-NULL |
| 602 | // buffer associated with this stream. |
| 603 | if (my_buffer != nullptr) |
| 604 | { |
| 605 | // Try to get the vMin number of characters. |
| 606 | return my_buffer->GetVMin() ; |
| 607 | } |
| 608 | // If the dynamic_cast above failed then we either have a NULL |
| 609 | // streambuf associated with this stream or we have a buffer of |
| 610 | // class other than SerialStreamBuf. In either case, we have a |
| 611 | // problem and we should stop all I/O using this stream. |
| 612 | setstate(badbit) ; |
| 613 | return -1; |
| 614 | } |
| 615 | catch (const std::exception&) |
| 616 | { |
| 617 | setstate(std::ios_base::failbit) ; |
| 618 | throw ; |
| 619 | } |
| 620 | |
| 621 | void |
| 622 | SerialStream::SetVTime(const short vtime) |
nothing calls this directly
no outgoing calls
no test coverage detected