|
MongoDB
2.1.1-pre-
|
a page-aligned BufBuilder. More...
#include <alignedbuilder.h>
Classes | |
| struct | AllocationInfo |
Public Member Functions | |
| AlignedBuilder (unsigned init_size) | |
| void | reset (unsigned sz) |
| reset with a hint as to the upcoming needed size specified | |
| void | reset () |
| reset for a re-use. | |
| const char * | buf () const |
| note this may be deallocated (realloced) if you keep writing or reset(). | |
| size_t | skip (unsigned n) |
| leave room for some stuff later | |
| char * | atOfs (unsigned ofs) |
| if buffer grows pointer no longer valid | |
| char * | cur () |
| if buffer grows pointer no longer valid | |
| void | appendChar (char j) |
| void | appendNum (char j) |
| void | appendNum (short j) |
| void | appendNum (int j) |
| void | appendNum (unsigned j) |
| void | appendNum (bool j) |
| void | appendNum (double j) |
| void | appendNum (long long j) |
| void | appendNum (unsigned long long j) |
| void | appendBuf (const void *src, size_t len) |
| template<class T > | |
| void | appendStruct (const T &s) |
| void | appendStr (const StringData &str, bool includeEOO=true) |
| unsigned | len () const |
a page-aligned BufBuilder.
| const char* mongo::AlignedBuilder::buf | ( | ) | const [inline] |
note this may be deallocated (realloced) if you keep writing or reset().
| unsigned mongo::AlignedBuilder::len | ( | ) | const [inline] |
| void mongo::AlignedBuilder::reset | ( | ) |
reset for a re-use.
shrinks if > 128MB
| size_t mongo::AlignedBuilder::skip | ( | unsigned | n | ) | [inline] |
leave room for some stuff later
1.8.0