52 abort (_application.abort),
54 logFileName
(_application.logFileName
),
55 ourLog (_application.ourLog)
73 ProcessCmdLineParameters (argc, argv);
82 return "No-Application-Name-Provided";
105 bool allParmsGood =
true;
115 expandedParameterPairs = cmdLineExpander.ExpandedParameterPairs ();
117 vector<KKStrPair>::const_iterator idx;
119 for (idx = expandedParameterPairs.begin (); idx != expandedParameterPairs.end (); ++idx)
121 const KKStr& parmSwitch = idx->first;
122 const KKStr& parmValue = idx->second;
125 allParmsGood =
false;
136 cout << ApplicationName () << endl
138 <<
" -LogFile <FileName> File that logging messages will be written to; if left will" << endl
139 <<
" be written to Standard-Out (cout)." << endl
141 <<
" -CmdFile <File-Name> Filename where additional command line options are stored;" << endl
142 <<
" This file can also specify additional '-CmdFile parameters." << endl
150 const KKStr& parmValue
153 log.Level (-1) << endl
154 <<
"Application::ProcessCmdLineParameter ***ERROR*** Unrecognized Parameter [" << parmSwitch <<
"] Value [" << parmValue <<
"]" << endl
Application(const Application &_application)
Copy Constructor for Application class.
virtual void DisplayCommandLineParameters()
Will display Command Lone parameters that the 'Application' class will manage.
CmdLineExpander(const KKStr &_applicationName, RunLog &_log, kkint32 argc, char **argv)
Constructor using the parameters passed through on the command line into main().
void Abort(bool _abort)
Used to specify that the application is been aborted.
virtual const char * ApplicationName()
KKStr YYYY_MM_DD() const
Convert into displayable string; ex: 20011/05/17.
KKStr operator+(const char *right) const
Application()
Constructor for Application class that will start with a default logger(RunLog),. ...
virtual void InitalizeApplication(kkint32 argc, char **argv)
Initialized Application Instance; 1st method to be called after instance construction.
Application(RunLog &_log)
Constructor for Application class where we already have an existing logger '_log'.
virtual bool ProcessCmdLineParameter(const KKStr &parmSwitch, const KKStr &parmValue)
This method will get called once for each parameter specified in the command line.
Expands command line parameters, by parsing for special parameters and expanding them to their full v...
KKStr(const KKStr &str)
Copy Constructor.
RunLog()
Creates an instance were logging will go to the console.
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of 'std::string' strings.
virtual KKStr BuildDate() const
Represents a Time, consisting of three fields, Hour, Minute, and Second. summary>Represents Date and ...
The base class for all standalone application.
KKStr operator+(const KKStr &right) const
void AttachFile(const KKStr &_fileName)
Call this method to start logging messages to a different file.
KKStr & operator=(const KKStr &src)
Used for logging messages.
void AssignLog(RunLog &_log)
Replaces the Log file to write to.
const KKStr & LogFileName() const
Represents a calendar date consisting of three fields, Year, Month, and Day.