! * \brief constructor * \param p_buffer the pointer to the string. */
| 70 | * \param p_buffer the pointer to the string. |
| 71 | */ |
| 72 | explicit MemoryStringStream(std::string *p_buffer) |
| 73 | : p_buffer_(p_buffer) { |
| 74 | curr_ptr_ = 0; |
| 75 | } |
| 76 | virtual size_t Read(void *ptr, size_t size) { |
| 77 | CHECK(curr_ptr_ <= p_buffer_->length()); |
| 78 | size_t nread = std::min(p_buffer_->length() - curr_ptr_, size); |
nothing calls this directly
no outgoing calls
no test coverage detected