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

#include <Parameters.hpp>

Details:

Command Line Parameter parser and read-only access member functions.

  • Uses boost::program_options for parsing of command line options.
  • Provides a read-only interface to parsed parameters.

Definition at line 98 of file Parameters.hpp.

Collaboration diagram for mongotype::Parameters:

Public Member Functions

 Parameters ()
 
virtual ~Parameters ()
 
int parse (int ac, char *av[])
 
bool isValid ()
 
bool isDebug ()
 
bool isStackDebug ()
 
const string & getConfigFile () const
 
const string & getDbCollection () const
 
const string & getHost () const
 
int getPort () const
 
bool isScalarFirst () const
 
StyleParam getStyle () const
 
TypeParamMask getTypeMask () const
 

Private Attributes

bool valid
 
string config_file
 
string host
 
int port
 
bool scalarFirst
 
StyleParam style
 
TypeParamMask typeMask
 
string dbCollection
 
boost::program_options::variables_map vm
 

Friends

ostream & operator<< (ostream &os, Parameters &p)
 

Constructor & Destructor Documentation

mongotype::Parameters::Parameters ( )

Definition at line 57 of file Parameters.cpp.

References mongotype::mapperInit().

Here is the call graph for this function:

mongotype::Parameters::~Parameters ( )
virtual

Definition at line 61 of file Parameters.cpp.

Member Function Documentation

const string& mongotype::Parameters::getConfigFile ( ) const
inline

Definition at line 125 of file Parameters.hpp.

References config_file.

const string& mongotype::Parameters::getDbCollection ( ) const
inline

Definition at line 129 of file Parameters.hpp.

References dbCollection.

Referenced by mongotype::dumpCollection().

Here is the caller graph for this function:

const string& mongotype::Parameters::getHost ( ) const
inline

Definition at line 133 of file Parameters.hpp.

References host.

Referenced by mongotype::dumpCollection().

Here is the caller graph for this function:

int mongotype::Parameters::getPort ( ) const
inline

Definition at line 137 of file Parameters.hpp.

References port.

Referenced by mongotype::dumpCollection().

Here is the caller graph for this function:

StyleParam mongotype::Parameters::getStyle ( ) const
inline

Definition at line 153 of file Parameters.hpp.

References style.

Referenced by mongotype::dumpCollection().

Here is the caller graph for this function:

TypeParamMask mongotype::Parameters::getTypeMask ( ) const
inline

Definition at line 157 of file Parameters.hpp.

References typeMask.

Referenced by mongotype::BSONTypeFormatter::to_string().

Here is the caller graph for this function:

bool mongotype::Parameters::isDebug ( )
inline

Definition at line 121 of file Parameters.hpp.

References vm.

Referenced by mongotype::dumpCollection(), parse(), and mongotype::JSONDump::tstr().

Here is the caller graph for this function:

bool mongotype::Parameters::isScalarFirst ( ) const
inline

Definition at line 149 of file Parameters.hpp.

References scalarFirst.

bool mongotype::Parameters::isStackDebug ( )
inline

Definition at line 123 of file Parameters.hpp.

References vm.

Referenced by mongotype::JSONDump::nextLine().

Here is the caller graph for this function:

bool mongotype::Parameters::isValid ( )
inline

Definition at line 119 of file Parameters.hpp.

References valid.

int mongotype::Parameters::parse ( int  ac,
char *  av[] 
)

Definition at line 92 of file Parameters.cpp.

References config_file, dbCollection, DEFAULT_CONFIGURATION_FILE, DEFAULT_HOST, DEFAULT_PORT, host, isDebug(), port, scalarFirst, style, mongotype::STYLE_DOTTED, mongotype::TYPE_ALL, typeMask, valid, mongotype::VERSION, and vm.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
Parameters p 
)
friend

Definition at line 196 of file Parameters.cpp.

Member Data Documentation

string mongotype::Parameters::config_file
private

Definition at line 100 of file Parameters.hpp.

Referenced by getConfigFile(), mongotype::operator<<(), and parse().

string mongotype::Parameters::dbCollection
private

Definition at line 106 of file Parameters.hpp.

Referenced by getDbCollection(), mongotype::operator<<(), and parse().

string mongotype::Parameters::host
private

Definition at line 101 of file Parameters.hpp.

Referenced by getHost(), mongotype::operator<<(), and parse().

int mongotype::Parameters::port
private

Definition at line 102 of file Parameters.hpp.

Referenced by getPort(), mongotype::operator<<(), and parse().

bool mongotype::Parameters::scalarFirst
private

Definition at line 103 of file Parameters.hpp.

Referenced by isScalarFirst(), mongotype::operator<<(), and parse().

StyleParam mongotype::Parameters::style
private

Definition at line 104 of file Parameters.hpp.

Referenced by getStyle(), mongotype::operator<<(), and parse().

TypeParamMask mongotype::Parameters::typeMask
private

Definition at line 105 of file Parameters.hpp.

Referenced by getTypeMask(), mongotype::operator<<(), and parse().

bool mongotype::Parameters::valid
private

Definition at line 99 of file Parameters.hpp.

Referenced by isValid(), mongotype::operator<<(), and parse().

boost::program_options::variables_map mongotype::Parameters::vm
private

Definition at line 110 of file Parameters.hpp.

Referenced by isDebug(), isStackDebug(), and parse().


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