mongo::CachedBSONObj Class Reference

#include <curop.h>

List of all members.

Public Types

enum  { TOO_BIG_SENTINEL = 1 }

Public Member Functions

void append (BSONObjBuilder &b, const StringData &name)
 CachedBSONObj ()
BSONObj get ()
bool have () const
void reset (int sz=0)
void set (const BSONObj &o)
int size () const

Static Public Attributes

static BSONObj _tooBig

Private Member Functions

BSONObj _get ()
void _reset (int sz)

Private Attributes

char _buf [512]
SpinLock _lock
int * _size

Detailed Description

stores a copy of a bson obj in a fixed size buffer if its too big for the buffer, says "too big" useful for keeping a copy around indefinitely without wasting a lot of space or doing malloc

Definition at line 44 of file curop.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
TOO_BIG_SENTINEL 

Definition at line 46 of file curop.h.


Constructor & Destructor Documentation

mongo::CachedBSONObj::CachedBSONObj (  )  [inline]

Definition at line 49 of file curop.h.


Member Function Documentation

BSONObj mongo::CachedBSONObj::_get (  )  [inline, private]

you have to be locked when you call this

Definition at line 113 of file curop.h.

void mongo::CachedBSONObj::_reset ( int  sz  )  [inline, private]

you have to be locked when you call this

Definition at line 123 of file curop.h.

void mongo::CachedBSONObj::append ( BSONObjBuilder b,
const StringData name 
) [inline]

Definition at line 98 of file curop.h.

BSONObj mongo::CachedBSONObj::get (  )  [inline]

Definition at line 84 of file curop.h.

bool mongo::CachedBSONObj::have (  )  const [inline]

Definition at line 82 of file curop.h.

void mongo::CachedBSONObj::reset ( int  sz = 0  )  [inline]

Definition at line 54 of file curop.h.

void mongo::CachedBSONObj::set ( const BSONObj o  )  [inline]

Definition at line 60 of file curop.h.

int mongo::CachedBSONObj::size (  )  const [inline]

Definition at line 81 of file curop.h.


Member Data Documentation

char mongo::CachedBSONObj::_buf[512] [private]

Definition at line 127 of file curop.h.

Definition at line 125 of file curop.h.

Definition at line 126 of file curop.h.

Definition at line 47 of file curop.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:54 2013