MCPcopy Create free account
hub / github.com/dmlc/dmlc-core / MemoryStringStream

Method MemoryStringStream

include/dmlc/memory_io.h:72–75  ·  view source on GitHub ↗

! * \brief constructor * \param p_buffer the pointer to the string. */

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected