![]() |
KSquare Utilities
|
Expands command line parameters, by parsing for special parameters and expanding them to their full value. More...
#include <CmdLineExpander.h>
Public Member Functions | |
| CmdLineExpander (const KKStr &_applicationName, RunLog &_log, kkint32 argc, char **argv) | |
| Constructor using the parameters passed through on the command line into main(). More... | |
| CmdLineExpander (const KKStr &_applicationName, RunLog &_log, const KKStr &_cmdLine) | |
| Pass in the command line as a single string. Will parse first before processing. More... | |
| ~CmdLineExpander () | |
| void | ExpandCmdLine (kkint32 argc, char **argv) |
| const vector< KKStrPair > & | ExpandedParameterPairs () const |
| const VectorKKStr & | ExpandedParameters () const |
| const KKStr & | LogFileName () const |
| bool | ParmsGood () const |
Expands command line parameters, by parsing for special parameters and expanding them to their full value.
A couple of parameters are specifically searched for and processed. The "-log" and "-CmdFile" parameters. The "-log" parameter is provides the name of a file where logging messages are to be written to via the "RunLog" class. The "-CmdFile" parameter provides the name of a text file that contains more command-line parameters that are to be processed along with all other parameters; the text in this file will be inserted where the original -"CmdLine" parameter appeared.
Definition at line 31 of file CmdLineExpander.h.
| CmdLineExpander::CmdLineExpander | ( | const KKStr & | _applicationName, |
| RunLog & | _log, | ||
| kkint32 | argc, | ||
| char ** | argv | ||
| ) |
Constructor using the parameters passed through on the command line into main().
Definition at line 38 of file CmdLineExpander.cpp.
References ExpandCmdLine(), and KKB::KKStr::KKStr().
| CmdLineExpander::CmdLineExpander | ( | const KKStr & | _applicationName, |
| RunLog & | _log, | ||
| const KKStr & | _cmdLine | ||
| ) |
Pass in the command line as a single string. Will parse first before processing.
Definition at line 54 of file CmdLineExpander.cpp.
References KKB::KKStr::Concat(), KKB::KKStr::Empty(), KKB::KKStr::ExtractQuotedStr(), KKB::KKStr::KKStr(), KKB::KKStr::TrimLeft(), and KKB::KKStr::TrimRight().
| CmdLineExpander::~CmdLineExpander | ( | ) |
Definition at line 84 of file CmdLineExpander.cpp.
| void CmdLineExpander::ExpandCmdLine | ( | kkint32 | argc, |
| char ** | argv | ||
| ) |
Definition at line 92 of file CmdLineExpander.cpp.
Referenced by CmdLineExpander().
|
inline |
Definition at line 59 of file CmdLineExpander.h.
|
inline |
Definition at line 58 of file CmdLineExpander.h.
|
inline |
Definition at line 60 of file CmdLineExpander.h.
|
inline |
Definition at line 61 of file CmdLineExpander.h.