Confdump Agent  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
Confdump::Options Class Reference

Configuration class affecting the behaviour of Confdump. More...

#include <Options.hpp>

List of all members.

Public Types

enum  LogLevel {
  Trace, Debug, Info, Warning,
  Error
}
enum  OutputFormat { TextFormat, XmlFormat }
enum  OperatingMode { NormalMode, HelpMode, HelpTablesMode }
typedef QList< std::pair
< QString, QString > > 
TableList

Public Member Functions

 Options (int argc, char **argv, std::ostream &out)
 ~Options ()
TableList tables () const
LogLevel logLevel () const
OutputFormat outputFormat () const
QString outputFile () const
OperatingMode operatingMode () const
std::map< QString,
DumperSpecification
dumperSpecifications () const

Private Types

typedef std::map< QString,
QString > 
DumperAliases
 Pair: alias => implementation name.
typedef std::map< QString,
std::map< QString, QString > > 
DumperArguments
 Pair: alias => ( map name => value )

Private Member Functions

 Options ()
void setVerbosity (const std::string &value)
void setOutputFormat (const std::string &format)
void setOutputFile (const std::string &file)
void setTables (const std::vector< std::string > &tables)
void readTablesFrom (const std::string &file)
void setDumpers (const std::vector< std::string > &raw_dumpers)
void setDumperArgs (const std::vector< std::string > &raw_args)

Private Attributes

TableList tables_
LogLevel logLevel_
OutputFormat outputFormat_
QString outputFile_
OperatingMode operatingMode_
DumperAliases dumperAliases_
DumperArguments dumperArguments_

Detailed Description

Configuration class affecting the behaviour of Confdump.

This immutable object is constructed from the command-line and then provides easy access to the command-line-requested behavior for the rest of the program.

Definition at line 39 of file Options.hpp.


Member Typedef Documentation

typedef std::map<QString, QString> Confdump::Options::DumperAliases [private]

Pair: alias => implementation name.

Definition at line 93 of file Options.hpp.

typedef std::map<QString, std::map<QString, QString> > Confdump::Options::DumperArguments [private]

Pair: alias => ( map name => value )

Definition at line 96 of file Options.hpp.

typedef QList< std::pair<QString, QString> > Confdump::Options::TableList

Definition at line 70 of file Options.hpp.


Member Enumeration Documentation

Enumerator:
Trace 
Debug 
Info 
Warning 
Error 

Definition at line 45 of file Options.hpp.

Enumerator:
NormalMode 
HelpMode 
HelpTablesMode 

Definition at line 60 of file Options.hpp.

Enumerator:
TextFormat 
XmlFormat 

Definition at line 54 of file Options.hpp.


Constructor & Destructor Documentation

Confdump::Options::Options ( int  argc,
char **  argv,
std::ostream &  out 
)

Definition at line 130 of file Options.cpp.


Member Function Documentation

Definition at line 72 of file Options.hpp.

References logLevel_.

Definition at line 75 of file Options.hpp.

References operatingMode_.

Referenced by main().

QString Confdump::Options::outputFile ( ) const [inline]

Definition at line 74 of file Options.hpp.

References outputFile_.

Referenced by main().

Definition at line 73 of file Options.hpp.

References outputFormat_.

Referenced by main().

void Confdump::Options::readTablesFrom ( const std::string &  file) [private]

Definition at line 249 of file Options.cpp.

References tables_.

Referenced by Options().

void Confdump::Options::setDumperArgs ( const std::vector< std::string > &  raw_args) [private]

Definition at line 210 of file Options.cpp.

References dumperArguments_.

Referenced by Options().

void Confdump::Options::setDumpers ( const std::vector< std::string > &  raw_dumpers) [private]

Definition at line 197 of file Options.cpp.

References dumperAliases_.

Referenced by Options().

void Confdump::Options::setOutputFile ( const std::string &  file) [private]

Definition at line 162 of file Options.cpp.

References outputFile_.

Referenced by Options().

void Confdump::Options::setOutputFormat ( const std::string &  format) [private]

Definition at line 151 of file Options.cpp.

References outputFormat_, TextFormat, and XmlFormat.

Referenced by Options().

void Confdump::Options::setTables ( const std::vector< std::string > &  tables) [private]

Definition at line 186 of file Options.cpp.

References tables(), and tables_.

Referenced by Options().

void Confdump::Options::setVerbosity ( const std::string &  value) [private]

Definition at line 134 of file Options.cpp.

References Debug, Error, Info, logLevel_, Trace, and Warning.

Definition at line 265 of file Options.cpp.

References tables_.

Referenced by main(), and setTables().


Member Data Documentation

Definition at line 94 of file Options.hpp.

Referenced by dumperSpecifications(), and setDumpers().

Definition at line 97 of file Options.hpp.

Referenced by dumperSpecifications(), and setDumperArgs().

Definition at line 88 of file Options.hpp.

Referenced by logLevel(), and setVerbosity().

Definition at line 91 of file Options.hpp.

Referenced by operatingMode(), and Options().

QString Confdump::Options::outputFile_ [private]

Definition at line 90 of file Options.hpp.

Referenced by outputFile(), and setOutputFile().

Definition at line 89 of file Options.hpp.

Referenced by outputFormat(), and setOutputFormat().

Definition at line 87 of file Options.hpp.

Referenced by readTablesFrom(), setTables(), and tables().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends