MongoDB C++ Driver  legacy-1.1.2
Public Member Functions | List of all members
mongo::_BufBuilder< Allocator > Class Template Reference

Public Member Functions

char * skip (int n)
 leave room for some stuff later More...
 
int len () const
 
int getSize () const
 
void reserveBytes (int bytes)
 Reserve room for some number of bytes to be claimed at a later time.
 
void claimReservedBytes (int bytes)
 Claim an earlier reservation of some number of bytes. More...
 

Member Function Documentation

template<class Allocator>
void mongo::_BufBuilder< Allocator >::claimReservedBytes ( int  bytes)
inline

Claim an earlier reservation of some number of bytes.

These bytes must already have been reserved. Appends of up to this many bytes immediately following a claim are guaranteed to succeed without a need to reallocate.

template<class Allocator>
int mongo::_BufBuilder< Allocator >::getSize ( ) const
inline
Returns
size of the buffer
template<class Allocator>
int mongo::_BufBuilder< Allocator >::len ( ) const
inline
Returns
length of current string
template<class Allocator>
char* mongo::_BufBuilder< Allocator >::skip ( int  n)
inline

leave room for some stuff later

Returns
point to region that was skipped. pointer may change later (on realloc), so for immediate use only

The documentation for this class was generated from the following file: