mongo::Ordering Class Reference

#include <ordering.h>

List of all members.

Public Member Functions

unsigned descending (unsigned mask) const
int get (int i) const
 operator string () const

Static Public Member Functions

static Ordering make (const BSONObj &obj)

Private Member Functions

 Ordering (unsigned b, unsigned n)

Private Attributes

const unsigned bits
const unsigned nkeys

Detailed Description

A precomputation of a BSON key pattern. The constructor is private to make conversion more explicit so we notice where we call make(). Over time we should push this up higher and higher.

Definition at line 26 of file ordering.h.


Constructor & Destructor Documentation

mongo::Ordering::Ordering ( unsigned  b,
unsigned  n 
) [inline, private]

Definition at line 29 of file ordering.h.


Member Function Documentation

unsigned mongo::Ordering::descending ( unsigned  mask  )  const [inline]

Definition at line 40 of file ordering.h.

int mongo::Ordering::get ( int  i  )  const [inline]

so, for key pattern { a : 1, b : -1 } get(0) == 1 get(1) == -1

Definition at line 35 of file ordering.h.

static Ordering mongo::Ordering::make ( const BSONObj obj  )  [inline, static]

Definition at line 49 of file ordering.h.

mongo::Ordering::operator string (  )  const [inline]

Definition at line 42 of file ordering.h.


Member Data Documentation

const unsigned mongo::Ordering::bits [private]

Definition at line 27 of file ordering.h.

const unsigned mongo::Ordering::nkeys [private]

Definition at line 28 of file ordering.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:56 2013