MongoType
MongoDB Collection Data Dump with BSON Types
|
BSON Element Type String Lookup. More...
#include <BSONTypeMap.hpp>
BSON Element Type String Lookup.
Provides conversion from BSON integer element type codes to human readable strings.
Definition at line 95 of file BSONTypeMap.hpp.
Public Member Functions | |
BSONTypeMap (const BSONElement &e) | |
Construct a type lookup instance. More... | |
const BSONTypeElement & | lookup (BSONType type) |
const BSONTypeElement & | lookup () |
string | to_string () |
Stringize BSON Object Type. More... | |
OSTREAM_FRIEND (BSONTypeMap &bstn) | |
BSON Object Type Strings Stream Output Operator. More... | |
Protected Attributes | |
const BSONElement & | element |
|
inline |
Construct a type lookup instance.
[in] | e | The BSONElement whose type string will be looked up. |
Definition at line 109 of file BSONTypeMap.hpp.
const BSONTypeElement & mongotype::BSONTypeMap::lookup | ( | BSONType | type | ) |
Lookup the given BSONType. Intended for repeated lookup calls without construction overhead.
Look up the given type.
[in] | type | The BSON type to convert to string(s). |
Definition at line 76 of file BSONTypeMap.cpp.
References mongotype::BSONTypeLookupTable.
|
inline |
Lookup the given BSONType for this instance.
Definition at line 121 of file BSONTypeMap.hpp.
References element.
Referenced by mongotype::BSONTypeFormatter::to_string(), and to_string().
|
inline |
BSON Object Type Strings Stream Output Operator.
[in] | bstn | The BSONTypeMap object to write to the output stream. |
Definition at line 143 of file BSONTypeMap.hpp.
References to_string().
|
inline |
Stringize BSON Object Type.
Definition at line 129 of file BSONTypeMap.hpp.
References mongotype::BSONTypeElement::getDesc(), mongotype::BSONTypeElement::getName(), and lookup().
Referenced by OSTREAM_FRIEND().
|
protected |
The BSON element supplying the type information.
Definition at line 101 of file BSONTypeMap.hpp.
Referenced by lookup(), and mongotype::BSONTypeFormatter::to_string().