FACT++  1.0
int main ( int  argc,
const char *  argv[] 
)

Definition at line 75 of file chatclient.cc.

References Configuration::DoParse(), Configuration::Get(), PrintHelp(), PrintUsage(), Configuration::SetPrintUsage(), Dim::Setup(), and SetupConfiguration().

76 {
77  Configuration conf(argv[0]);
78  conf.SetPrintUsage(PrintUsage);
79  SetupConfiguration(conf);
80 
81  if (!conf.DoParse(argc, argv, PrintHelp))
82  return 127;
83 
84  Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host"));
85 
86  if (conf.Get<int>("console")==0)
87  RunShell<ChatShell>(conf);
88  else
89  RunShell<ChatConsole>(conf);
90 
91 
92  return 0;
93 }
void PrintHelp()
Definition: chatclient.cc:69
void Setup(const std::string &dns="", const std::string &host="")
Definition: DimSetup.cc:160
void PrintUsage()
Definition: chatclient.cc:54
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9
void SetupConfiguration(Configuration &conf)
Definition: chatclient.cc:27

+ Here is the call graph for this function: