improve io::Appender functionality
authorAdam Simpkins <simpkins@fb.com>
Sun, 28 Sep 2014 01:24:18 +0000 (18:24 -0700)
committerdcsommer <dcsommer@fb.com>
Wed, 29 Oct 2014 23:06:11 +0000 (16:06 -0700)
commit1d33fd218811e52e59ccb5824422e5cc96feb581
tree9c79eb9ad0b93bdc733f75fcb640ede12d87a508
parent6ba489cbe04fbacc88e53e7f7faf79664b35c239
improve io::Appender functionality

Summary:
Add an operator()(StringPiece) method to Appender, so it can be used
directly with folly::Formatter objects.  Also add printf() and vprintf()
methods to Appender, for places that need to use existing printf-style
formatting.

This also includes versions of push() and pushAtMost() that accept
ByteRange objects.  Previously we only had push() implementations that
took separate buffer and size arguments.

Test Plan: Added new unit tests to IOBufCursorTest.cpp

Reviewed By: davejwatson@fb.com

Subscribers: trunkagent, doug, net-systems@, exa, njormrod

FB internal diff: D1583684
folly/io/Cursor-defs.h [new file with mode: 0644]
folly/io/Cursor.h
folly/io/test/IOBufCursorTest.cpp