#include <ordering.h>
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 |
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.
mongo::Ordering::Ordering | ( | unsigned | b, | |
unsigned | n | |||
) | [inline, private] |
Definition at line 29 of file ordering.h.
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.
Definition at line 49 of file ordering.h.
mongo::Ordering::operator string | ( | ) | const [inline] |
Definition at line 42 of file ordering.h.
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.