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

Classes

class  BSONDotNotationDump
 Human readable BSON Object Dump. More...
 
class  BSONParserStackItem
 Container class for const references to mongo::BSONObj and mongo::BSONElement. More...
 
class  BSONParserStack
 Stack of BSONParserStackItem for storing the BSONObjectParser parse context. More...
 
interface  IBSONObjectVisitor
 Visitor interface for parsing nested BSON data objects. More...
 
class  BSONObjectParser
 The BSON Parser. More...
 
class  BSONObjectTypeDump
 Human readable BSON Object Dump. More...
 
class  BSONTypeFormatter
 BSON Element Type String Lookup. More...
 
class  BSONTypeElement
 Store the name and description of a single BSON data type. More...
 
class  BSONTypeMap
 BSON Element Type String Lookup. More...
 
class  IBSONRenderer
 
class  JSONDump
 BSON -> JSON Dump. More...
 
class  EnumMapper
 
class  Parameters
 

Typedefs

typedef map< BSONType, const
BSONTypeElement
BSONTypeStringsMap
 
typedef
BSONTypeStringsMap::value_type 
BSONTypeStringsMapPair
 

Enumerations

enum  StyleParam {
  STYLE_UNDEF = -1, STYLE_DOTTED = 0, STYLE_TREE = 1, STYLE_JSON = 2,
  STYLE_JSONPACKED = 3
}
 
enum  TypeParamMask {
  TYPE_UNDEF = -1, TYPE_NONE = 0, TYPE_NAME = 1, TYPE_DESC = 2,
  TYPE_CODE = 4, TYPE_ALL = 7
}
 

Functions

const string VERSION ("2.4.1")
 
const string COPYRIGHT ("Copyright (c) 2013 by Mark Deazley")
 
const string LICENSE ("Free Software Foundation’s GNU AGPL v3.0.\n""This program is free software: you can redistribute it and/or modify\n""it under the terms of the GNU Affero General Public License as\n""published by the Free Software Foundation, either version 3 of the\n""License, or (at your option) any later version.\n""\n""This program is distributed in the hope that it will be useful,\n""but WITHOUT ANY WARRANTY; without even the implied warranty of\n""MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n""GNU Affero General Public License for more details.\n""\n""You should have received a copy of the GNU Affero General Public License\n""along with this program. If not, see http://www.gnu.org/licenses/ .\n")
 
void dumpCollection (Parameters &params)
 
static void mapperInit ()
 
void validate (boost::any &v, const std::vector< std::string > &values, StyleParam *, int)
 
void validate (boost::any &v, const std::vector< std::string > &values, TypeParamMask *, int)
 
ostream & operator<< (ostream &os, Parameters &p)
 

Variables

static BSONTypeStringsMap BSONTypeLookupTable
 
static bool initMap = true
 
static EnumMapper< StyleParamstyleMapper
 
static EnumMapper< TypeParamMasktypeMapper
 
const string VERSION
 
const string COPYRIGHT
 
const string LICENSE
 

Detailed Description

All classes defined in the MongoType project are in C++ namespace mongotype.

Typedef Documentation

typedef map<BSONType, const BSONTypeElement> mongotype::BSONTypeStringsMap

Associative array used to look up BSON types containing BSONTypeElement data elements.

Definition at line 81 of file BSONTypeMap.hpp.

typedef BSONTypeStringsMap::value_type mongotype::BSONTypeStringsMapPair

Pair type for retrieving BSON type strings.

See Also
BSONTypeStringsMap

Definition at line 85 of file BSONTypeMap.hpp.

Enumeration Type Documentation

Enumeration of –style options.

Enumerator
STYLE_UNDEF 

UNDEFINED: Used to signal parsing errors

STYLE_DOTTED 

Dotted Output: see BSONDotNotationDump

STYLE_TREE 

Tree Output: see BSONObjectTypeDump

STYLE_JSON 

Pretty JSON Output: see JSONDump

STYLE_JSONPACKED 

Packed JSON Output: see JSONDump

Definition at line 47 of file Parameters.hpp.

Enumerator
TYPE_UNDEF 
TYPE_NONE 
TYPE_NAME 
TYPE_DESC 
TYPE_CODE 
TYPE_ALL 

Definition at line 55 of file Parameters.hpp.

Function Documentation

const string mongotype::COPYRIGHT ( "Copyright (c) 2013 by Mark Deazley"  )
const string mongotype::LICENSE ( "Free Software Foundation’s GNU AGPL v3.0.\n""This program is free software: you can redistribute it and/or modify\n""it under the terms of the GNU Affero General Public License as\n""published by the Free Software  Foundation,
either version 3 of the\n""  License,
or(at your option) any later version.\n""\n""This program is distributed in the hope that it will be  useful,
\n""but WITHOUT ANY WARRANTY;without even the implied warranty of\n""MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the\n""GNU Affero General Public License for more details.\n""\n""You should have received a copy of the GNU Affero General Public License\n""along with this program.If  not,
see http://www.gnu.org/licenses/.\n"   
)
static void mongotype::mapperInit ( )
static

Definition at line 42 of file Parameters.cpp.

References initMap, STYLE_DOTTED, STYLE_JSON, STYLE_JSONPACKED, STYLE_TREE, styleMapper, TYPE_ALL, TYPE_CODE, TYPE_DESC, TYPE_NAME, TYPE_NONE, and typeMapper.

Referenced by mongotype::Parameters::Parameters().

Here is the caller graph for this function:

void mongotype::validate ( boost::any &  v,
const std::vector< std::string > &  values,
StyleParam *  ,
int   
)

Definition at line 64 of file Parameters.cpp.

References STYLE_UNDEF, and styleMapper.

void mongotype::validate ( boost::any &  v,
const std::vector< std::string > &  values,
TypeParamMask *  ,
int   
)

Definition at line 78 of file Parameters.cpp.

References TYPE_UNDEF, and typeMapper.

const string mongotype::VERSION ( "2.4.1"  )

Variable Documentation

BSONTypeStringsMap mongotype::BSONTypeLookupTable
static
Initial value:
{
make_pair(MinKey, BSONTypeElement("MinKey", "MinKey")),
make_pair(EOO, BSONTypeElement("EOO", "EOO")),
make_pair(NumberDouble, BSONTypeElement("NumberDouble", "Double")),
make_pair(String, BSONTypeElement("String", "UTF8")),
make_pair(Object, BSONTypeElement("Object", "BSON")),
make_pair(Array, BSONTypeElement("Array", "BSON Array")),
make_pair(BinData, BSONTypeElement("BinData", "Binary")),
make_pair(Undefined, BSONTypeElement("Undefined", "Undefined")),
make_pair(jstOID, BSONTypeElement("jstOID", "ObjectId")),
make_pair(Bool, BSONTypeElement("Bool", "Boolean")),
make_pair(Date, BSONTypeElement("Date", "Date")),
make_pair(jstNULL, BSONTypeElement("jstNULL", "NULL")),
make_pair(RegEx, BSONTypeElement("RegEx", "Regex")),
make_pair(DBRef, BSONTypeElement("DBRef", "deprecated")),
make_pair(Code, BSONTypeElement("Code", "deprecated")),
make_pair(Symbol, BSONTypeElement("Symbol", "Symbol")),
make_pair(CodeWScope, BSONTypeElement("CodeWScope", "Javascript")),
make_pair(NumberInt, BSONTypeElement("NumberInt", "int32")),
make_pair(Timestamp, BSONTypeElement("Timestamp", "Timestamp")),
make_pair(NumberLong, BSONTypeElement("NumberLong", "int64")),
make_pair(JSTypeMax, BSONTypeElement("JSTypeMax", "Max Object Value Used")),
make_pair(MaxKey, BSONTypeElement("MaxKey", "MaxKey"))
}

BSON Type lookup table initialization.

Definition at line 43 of file BSONTypeMap.cpp.

Referenced by mongotype::BSONTypeMap::lookup().

const string mongotype::COPYRIGHT
bool mongotype::initMap = true
static

Definition at line 38 of file Parameters.cpp.

Referenced by mapperInit().

const string mongotype::LICENSE
EnumMapper<StyleParam> mongotype::styleMapper
static

Definition at line 39 of file Parameters.cpp.

Referenced by mapperInit(), and validate().

EnumMapper<TypeParamMask> mongotype::typeMapper
static

Definition at line 40 of file Parameters.cpp.

Referenced by mapperInit(), and validate().

const string mongotype::VERSION