20 using namespace Nymph;
23 KTLOGGER(testapplog,
"TestApplication");
29 int main(
int argc,
char** argv)
40 catch (std::exception& e)
42 KTERROR(testapplog,
"Exception caught from KTApplication constructor:\n" 66 KTINFO(testapplog,
"Test application option was not set");
75 KTINFO(testapplog,
"Test option <int-data> was not set");
89 KTINFO(testapplog,
"Configuration complete:\n" 90 <<
"\tInt data: " << testObj->
GetIntData() <<
'\n' 96 KTERROR(testapplog,
"Something went wrong during the configuration");
Interface for the command-line handler and the configurator.
bool IsCommandLineOptSet(const std::string &aCLOption)
Check if a command line option was set.
double GetDoubleData() const
const std::string & GetConfigFilename() const
Return the file name provided by the user on the command line for the config file.
static KTCommandLineOption< string > sTestAppOption("TestApplication", "Application-specific command-line option", "test-app-opt", 'a')
int main(int argc, char **argv)
bool Configure(const scarab::param_node &node)
Should perform parameter store and command-line configurations.
const std::string & GetStringData() const
XReturnType GetCommandLineValue(const std::string &aCLOption)
Return the value of a command line option; throws an exception if the value was not set...
KTLOGGER(applog, "KTApplication")
const std::string & GetExecutableName() const
const std::string & GetConfigName() const
const KTConfigurator * GetConfigurator() const
scarab::param_node & Config()
KTCommandLineHandler * GetCommandLineHandler() const