Geant4  10.02
G4DNAPARSER::CommandLineParser Class Reference

#include <CommandLineParser.hh>

+ Collaboration diagram for G4DNAPARSER::CommandLineParser:

Public Member Functions

 CommandLineParser ()
 
 ~CommandLineParser ()
 
int Parse (int &argc, char **argv)
 
void PrintHelp ()
 
bool CheckIfNotHandledOptionsExists (int &argc, char **argv)
 
void CorrectRemainingOptions (int &argc, char **argv)
 
void AddCommand (const G4String &marker, Command::Type, const G4String &description="", const G4String &defaultOption="", const G4String &optionName="")
 
CommandFindCommand (const G4String &marker)
 
CommandGetCommandIfActive (const G4String &marker)
 
G4bool WereOptionsSetup ()
 
 CommandLineParser ()
 
 ~CommandLineParser ()
 
int Parse (int &argc, char **argv)
 
void PrintHelp ()
 
bool CheckIfNotHandledOptionsExists (int &argc, char **argv)
 
void CorrectRemainingOptions (int &argc, char **argv)
 
void AddCommand (const G4String &marker, Command::Type, const G4String &description="", const G4String &defaultOption="", const G4String &optionName="")
 
CommandFindCommand (const G4String &marker)
 
CommandGetCommandIfActive (const G4String &marker)
 
G4bool WereOptionsSetup ()
 
 CommandLineParser ()
 
 ~CommandLineParser ()
 
int Parse (int &argc, char **argv)
 
void PrintHelp ()
 
bool CheckIfNotHandledOptionsExists (int &argc, char **argv)
 
void CorrectRemainingOptions (int &argc, char **argv)
 
void AddCommand (const G4String &marker, Command::Type, const G4String &description="", const G4String &defaultOption="", const G4String &optionName="")
 
CommandFindCommand (const G4String &marker)
 
CommandGetCommandIfActive (const G4String &marker)
 
G4bool WereOptionsSetup ()
 
 CommandLineParser ()
 
 ~CommandLineParser ()
 
int Parse (int &argc, char **argv)
 
void PrintHelp ()
 
bool CheckIfNotHandledOptionsExists (int &argc, char **argv)
 
void CorrectRemainingOptions (int &argc, char **argv)
 
void AddCommand (const G4String &marker, Command::Type, const G4String &description="", const G4String &defaultOption="", const G4String &optionName="")
 
CommandFindCommand (const G4String &marker)
 
CommandGetCommandIfActive (const G4String &marker)
 
G4bool WereOptionsSetup ()
 
 CommandLineParser ()
 
 ~CommandLineParser ()
 
int Parse (int &argc, char **argv)
 
void PrintHelp ()
 
bool CheckIfNotHandledOptionsExists (int &argc, char **argv)
 
void CorrectRemainingOptions (int &argc, char **argv)
 
void AddCommand (const G4String &marker, Command::Type, const G4String &description="", const G4String &defaultOption="", const G4String &optionName="")
 
CommandFindCommand (const G4String &marker)
 
CommandGetCommandIfActive (const G4String &marker)
 
G4bool WereOptionsSetup ()
 
 CommandLineParser ()
 
 ~CommandLineParser ()
 
int Parse (int &argc, char **argv)
 
void PrintHelp ()
 
bool CheckIfNotHandledOptionsExists (int &argc, char **argv)
 
void CorrectRemainingOptions (int &argc, char **argv)
 
void AddCommand (const G4String &marker, Command::Type, const G4String &description="", const G4String &defaultOption="", const G4String &optionName="")
 
CommandFindCommand (const G4String &marker)
 
CommandGetCommandIfActive (const G4String &marker)
 
G4bool WereOptionsSetup ()
 
 CommandLineParser ()
 
 ~CommandLineParser ()
 
int Parse (int &argc, char **argv)
 
void PrintHelp ()
 
bool CheckIfNotHandledOptionsExists (int &argc, char **argv)
 
void CorrectRemainingOptions (int &argc, char **argv)
 
void AddCommand (const G4String &marker, Command::Type, const G4String &description="", const G4String &defaultOption="", const G4String &optionName="")
 
CommandFindCommand (const G4String &marker)
 
CommandGetCommandIfActive (const G4String &marker)
 
G4bool WereOptionsSetup ()
 

Static Public Member Functions

static CommandLineParserGetParser ()
 
static void DeleteInstance ()
 
static CommandLineParserGetParser ()
 
static void DeleteInstance ()
 
static CommandLineParserGetParser ()
 
static void DeleteInstance ()
 
static CommandLineParserGetParser ()
 
static void DeleteInstance ()
 
static CommandLineParserGetParser ()
 
static void DeleteInstance ()
 
static CommandLineParserGetParser ()
 
static void DeleteInstance ()
 
static CommandLineParserGetParser ()
 
static void DeleteInstance ()
 

Private Attributes

std::map< G4String, Command * > fCommandMap
 
G4bool fOptionsWereSetup
 
G4int fMaxMarkerLength
 
G4int fMaxOptionNameLength
 
G4int fVerbose
 

Static Private Attributes

static CommandLineParserfpInstance
 

Detailed Description

Definition at line 106 of file CommandLineParser.hh.

Constructor & Destructor Documentation

CommandLineParser::CommandLineParser ( )

Definition at line 59 of file CommandLineParser.cc.

CommandLineParser::~CommandLineParser ( )

Definition at line 83 of file CommandLineParser.cc.

G4DNAPARSER::CommandLineParser::CommandLineParser ( )
G4DNAPARSER::CommandLineParser::~CommandLineParser ( )
G4DNAPARSER::CommandLineParser::CommandLineParser ( )
G4DNAPARSER::CommandLineParser::~CommandLineParser ( )
G4DNAPARSER::CommandLineParser::CommandLineParser ( )
G4DNAPARSER::CommandLineParser::~CommandLineParser ( )
G4DNAPARSER::CommandLineParser::CommandLineParser ( )
G4DNAPARSER::CommandLineParser::~CommandLineParser ( )
G4DNAPARSER::CommandLineParser::CommandLineParser ( )
G4DNAPARSER::CommandLineParser::~CommandLineParser ( )
G4DNAPARSER::CommandLineParser::CommandLineParser ( )
G4DNAPARSER::CommandLineParser::~CommandLineParser ( )

Member Function Documentation

void G4DNAPARSER::CommandLineParser::AddCommand ( const G4String marker,
Command::Type  ,
const G4String description = "",
const G4String defaultOption = "",
const G4String optionName = "" 
)
void CommandLineParser::AddCommand ( const G4String marker,
Command::Type  type,
const G4String description = "",
const G4String defaultOption = "",
const G4String optionName = "" 
)

Definition at line 274 of file CommandLineParser.cc.

References fCommandMap, fMaxMarkerLength, fMaxOptionNameLength, and G4DNAPARSER::Command::WithoutOption.

Referenced by Parse().

+ Here is the caller graph for this function:

void G4DNAPARSER::CommandLineParser::AddCommand ( const G4String marker,
Command::Type  ,
const G4String description = "",
const G4String defaultOption = "",
const G4String optionName = "" 
)
void G4DNAPARSER::CommandLineParser::AddCommand ( const G4String marker,
Command::Type  ,
const G4String description = "",
const G4String defaultOption = "",
const G4String optionName = "" 
)
void G4DNAPARSER::CommandLineParser::AddCommand ( const G4String marker,
Command::Type  ,
const G4String description = "",
const G4String defaultOption = "",
const G4String optionName = "" 
)
void G4DNAPARSER::CommandLineParser::AddCommand ( const G4String marker,
Command::Type  ,
const G4String description = "",
const G4String defaultOption = "",
const G4String optionName = "" 
)
void G4DNAPARSER::CommandLineParser::AddCommand ( const G4String marker,
Command::Type  ,
const G4String description = "",
const G4String defaultOption = "",
const G4String optionName = "" 
)
bool G4DNAPARSER::CommandLineParser::CheckIfNotHandledOptionsExists ( int &  argc,
char **  argv 
)
bool G4DNAPARSER::CommandLineParser::CheckIfNotHandledOptionsExists ( int &  argc,
char **  argv 
)
bool G4DNAPARSER::CommandLineParser::CheckIfNotHandledOptionsExists ( int &  argc,
char **  argv 
)
bool CommandLineParser::CheckIfNotHandledOptionsExists ( int &  argc,
char **  argv 
)

Definition at line 375 of file CommandLineParser.cc.

References G4cerr, G4cout, G4endl, and PrintHelp().

Referenced by Parse().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool G4DNAPARSER::CommandLineParser::CheckIfNotHandledOptionsExists ( int &  argc,
char **  argv 
)
bool G4DNAPARSER::CommandLineParser::CheckIfNotHandledOptionsExists ( int &  argc,
char **  argv 
)
bool G4DNAPARSER::CommandLineParser::CheckIfNotHandledOptionsExists ( int &  argc,
char **  argv 
)
void G4DNAPARSER::CommandLineParser::CorrectRemainingOptions ( int &  argc,
char **  argv 
)
void G4DNAPARSER::CommandLineParser::CorrectRemainingOptions ( int &  argc,
char **  argv 
)
void G4DNAPARSER::CommandLineParser::CorrectRemainingOptions ( int &  argc,
char **  argv 
)
void G4DNAPARSER::CommandLineParser::CorrectRemainingOptions ( int &  argc,
char **  argv 
)
void G4DNAPARSER::CommandLineParser::CorrectRemainingOptions ( int &  argc,
char **  argv 
)
void G4DNAPARSER::CommandLineParser::CorrectRemainingOptions ( int &  argc,
char **  argv 
)
void CommandLineParser::CorrectRemainingOptions ( int &  argc,
char **  argv 
)

Definition at line 257 of file CommandLineParser.cc.

Referenced by Parse().

+ Here is the caller graph for this function:

static void G4DNAPARSER::CommandLineParser::DeleteInstance ( )
static
void CommandLineParser::DeleteInstance ( )
static

Definition at line 94 of file CommandLineParser.cc.

Referenced by main(), and Parse().

+ Here is the caller graph for this function:

static void G4DNAPARSER::CommandLineParser::DeleteInstance ( )
static
static void G4DNAPARSER::CommandLineParser::DeleteInstance ( )
static
static void G4DNAPARSER::CommandLineParser::DeleteInstance ( )
static
static void G4DNAPARSER::CommandLineParser::DeleteInstance ( )
static
static void G4DNAPARSER::CommandLineParser::DeleteInstance ( )
static
Command* G4DNAPARSER::CommandLineParser::FindCommand ( const G4String marker)
Command* G4DNAPARSER::CommandLineParser::FindCommand ( const G4String marker)
Command * CommandLineParser::FindCommand ( const G4String marker)

Definition at line 332 of file CommandLineParser.cc.

References fCommandMap.

Referenced by GetCommandIfActive(), and Parse().

+ Here is the caller graph for this function:

Command* G4DNAPARSER::CommandLineParser::FindCommand ( const G4String marker)
Command* G4DNAPARSER::CommandLineParser::FindCommand ( const G4String marker)
Command* G4DNAPARSER::CommandLineParser::FindCommand ( const G4String marker)
Command* G4DNAPARSER::CommandLineParser::FindCommand ( const G4String marker)
Command* G4DNAPARSER::CommandLineParser::GetCommandIfActive ( const G4String marker)
Command * CommandLineParser::GetCommandIfActive ( const G4String marker)

Definition at line 345 of file CommandLineParser.cc.

References G4DNAPARSER::Command::fActive, FatalException, FindCommand(), G4endl, and G4Exception().

Referenced by RunAction::CreateNtuple(), main(), Parse(), and RunAction::WriteNtuple().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Command* G4DNAPARSER::CommandLineParser::GetCommandIfActive ( const G4String marker)
Command* G4DNAPARSER::CommandLineParser::GetCommandIfActive ( const G4String marker)
Command* G4DNAPARSER::CommandLineParser::GetCommandIfActive ( const G4String marker)
Command* G4DNAPARSER::CommandLineParser::GetCommandIfActive ( const G4String marker)
Command* G4DNAPARSER::CommandLineParser::GetCommandIfActive ( const G4String marker)
static CommandLineParser* G4DNAPARSER::CommandLineParser::GetParser ( )
static
static CommandLineParser* G4DNAPARSER::CommandLineParser::GetParser ( )
static
static CommandLineParser* G4DNAPARSER::CommandLineParser::GetParser ( )
static
CommandLineParser * CommandLineParser::GetParser ( )
static

Definition at line 75 of file CommandLineParser.cc.

Referenced by Parse().

+ Here is the caller graph for this function:

static CommandLineParser* G4DNAPARSER::CommandLineParser::GetParser ( )
static
static CommandLineParser* G4DNAPARSER::CommandLineParser::GetParser ( )
static
static CommandLineParser* G4DNAPARSER::CommandLineParser::GetParser ( )
static
int G4DNAPARSER::CommandLineParser::Parse ( int &  argc,
char **  argv 
)
int G4DNAPARSER::CommandLineParser::Parse ( int &  argc,
char **  argv 
)
int G4DNAPARSER::CommandLineParser::Parse ( int &  argc,
char **  argv 
)
int G4DNAPARSER::CommandLineParser::Parse ( int &  argc,
char **  argv 
)
int G4DNAPARSER::CommandLineParser::Parse ( int &  argc,
char **  argv 
)
int CommandLineParser::Parse ( int &  argc,
char **  argv 
)

Definition at line 127 of file CommandLineParser.cc.

References buffer, CorrectRemainingOptions(), G4DNAPARSER::Command::fActive, FindCommand(), fOptionsWereSetup, G4DNAPARSER::Command::fType, fVerbose, G4cerr, G4cout, G4endl, GetCommandIfActive(), G4DNAPARSER::Command::OptionNotCompulsory, PrintHelp(), G4DNAPARSER::Command::SetOption(), and G4DNAPARSER::Command::WithOption.

Referenced by Parse().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int G4DNAPARSER::CommandLineParser::Parse ( int &  argc,
char **  argv 
)
void G4DNAPARSER::CommandLineParser::PrintHelp ( )
void G4DNAPARSER::CommandLineParser::PrintHelp ( )
void CommandLineParser::PrintHelp ( )

Definition at line 216 of file CommandLineParser.cc.

References fCommandMap, G4String::first(), fMaxMarkerLength, fMaxOptionNameLength, G4cout, G4endl, G4DNAPARSER::Command::GetDefaultOption(), G4DNAPARSER::Command::GetDescription(), and left.

Referenced by CheckIfNotHandledOptionsExists(), and Parse().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4DNAPARSER::CommandLineParser::PrintHelp ( )
void G4DNAPARSER::CommandLineParser::PrintHelp ( )
void G4DNAPARSER::CommandLineParser::PrintHelp ( )
void G4DNAPARSER::CommandLineParser::PrintHelp ( )
G4bool G4DNAPARSER::CommandLineParser::WereOptionsSetup ( )
inline

Definition at line 123 of file CommandLineParser.hh.

References fOptionsWereSetup.

G4bool G4DNAPARSER::CommandLineParser::WereOptionsSetup ( )
inline

Definition at line 130 of file CommandLineParser.hh.

References fOptionsWereSetup.

G4bool G4DNAPARSER::CommandLineParser::WereOptionsSetup ( )
inline

Definition at line 130 of file CommandLineParser.hh.

References fOptionsWereSetup.

G4bool G4DNAPARSER::CommandLineParser::WereOptionsSetup ( )
inline

Definition at line 130 of file CommandLineParser.hh.

References fOptionsWereSetup.

G4bool G4DNAPARSER::CommandLineParser::WereOptionsSetup ( )
inline

Definition at line 130 of file CommandLineParser.hh.

References fOptionsWereSetup.

G4bool G4DNAPARSER::CommandLineParser::WereOptionsSetup ( )
inline

Definition at line 130 of file CommandLineParser.hh.

References fOptionsWereSetup.

G4bool G4DNAPARSER::CommandLineParser::WereOptionsSetup ( )
inline

Definition at line 130 of file CommandLineParser.hh.

References fOptionsWereSetup.

Member Data Documentation

std::map< G4String, Command * > G4DNAPARSER::CommandLineParser::fCommandMap
private

Definition at line 109 of file CommandLineParser.hh.

Referenced by AddCommand(), FindCommand(), and PrintHelp().

G4int G4DNAPARSER::CommandLineParser::fMaxMarkerLength
private

Definition at line 111 of file CommandLineParser.hh.

Referenced by AddCommand(), and PrintHelp().

G4int G4DNAPARSER::CommandLineParser::fMaxOptionNameLength
private

Definition at line 112 of file CommandLineParser.hh.

Referenced by AddCommand(), and PrintHelp().

G4bool G4DNAPARSER::CommandLineParser::fOptionsWereSetup
private

Definition at line 110 of file CommandLineParser.hh.

Referenced by Parse(), and WereOptionsSetup().

CommandLineParser * CommandLineParser::fpInstance
staticprivate

Definition at line 108 of file CommandLineParser.hh.

G4int G4DNAPARSER::CommandLineParser::fVerbose
private

Definition at line 113 of file CommandLineParser.hh.

Referenced by Parse().


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