MongoType
MongoDB Collection Data Dump with BSON Types
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mongotype::BSONTypeFormatter Class Reference

BSON Element Type String Lookup. More...

#include <BSONTypeFormatter.hpp>

Details:

BSON Element Type String Lookup.

Provides conversion from BSON integer element type codes to human readable strings.

Definition at line 25 of file BSONTypeFormatter.hpp.

Inheritance diagram for mongotype::BSONTypeFormatter:
Collaboration diagram for mongotype::BSONTypeFormatter:

Public Member Functions

 BSONTypeFormatter (Parameters &pparams, const BSONElement &e)
 Construct a type lookup instance. More...
 
string to_string ()
 Stringize the BSON type per the mask. More...
 
 OSTREAM_FRIEND (BSONTypeFormatter &bstf)
 BSON Object Type Strings Stream Output Operator. More...
 
- Public Member Functions inherited from mongotype::BSONTypeMap
 BSONTypeMap (const BSONElement &e)
 Construct a type lookup instance. More...
 
const BSONTypeElementlookup (BSONType type)
 
const BSONTypeElementlookup ()
 
string to_string ()
 Stringize BSON Object Type. More...
 
 OSTREAM_FRIEND (BSONTypeMap &bstn)
 BSON Object Type Strings Stream Output Operator. More...
 

Private Attributes

Parametersparams
 

Additional Inherited Members

- Protected Attributes inherited from mongotype::BSONTypeMap
const BSONElement & element
 

Constructor & Destructor Documentation

mongotype::BSONTypeFormatter::BSONTypeFormatter ( Parameters pparams,
const BSONElement &  e 
)
inline

Construct a type lookup instance.

Parameters
[in]pparamsThe command line parameters object.
[in]eThe BSONElement whose type string will be looked up.

Definition at line 36 of file BSONTypeFormatter.hpp.

Member Function Documentation

mongotype::BSONTypeFormatter::OSTREAM_FRIEND ( BSONTypeFormatter bstf)
inline

BSON Object Type Strings Stream Output Operator.

Parameters
[in]bstfThe BSONTypeFormatter object to write to the output stream.

Definition at line 73 of file BSONTypeFormatter.hpp.

References to_string().

Here is the call graph for this function:

string mongotype::BSONTypeFormatter::to_string ( )
inline

Stringize the BSON type per the mask.

Returns
A string representation of the BSON type.

Definition at line 44 of file BSONTypeFormatter.hpp.

References mongotype::BSONTypeMap::element, mongotype::BSONTypeElement::getDesc(), mongotype::BSONTypeElement::getName(), mongotype::Parameters::getTypeMask(), mongotype::BSONTypeMap::lookup(), params, mongotype::TYPE_CODE, mongotype::TYPE_DESC, and mongotype::TYPE_NAME.

Referenced by mongotype::BSONDotNotationDump::onElement(), and OSTREAM_FRIEND().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Parameters& mongotype::BSONTypeFormatter::params
private

Definition at line 27 of file BSONTypeFormatter.hpp.

Referenced by to_string().


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