| 519 | } |
| 520 | |
| 521 | bool GetString(std::string* value) { |
| 522 | if (type_ != kString && type_ != kEmptyString) { |
| 523 | return false; |
| 524 | } |
| 525 | if (fsize_ == 0) { |
| 526 | value->assign(EMPTY_STRING); |
| 527 | return true; |
| 528 | } |
| 529 | if (offset_ + fsize_ > bsize_) { |
| 530 | return false; |
| 531 | } |
| 532 | value->resize(fsize_); |
| 533 | memcpy(static_cast<void*>(&((*value)[0])), buffer_, fsize_); |
| 534 | buffer_ += fsize_; |
| 535 | offset_ += fsize_; |
| 536 | return true; |
| 537 | } |
| 538 | |
| 539 | ColType GetType() { return type_; } |
| 540 |
nothing calls this directly
no outgoing calls
no test coverage detected