ClientApplication and ServerApplication are now Singletons

This commit is contained in:
Kayne Ruse
2014-08-04 00:45:09 +10:00
parent fd320767c5
commit 908f91d674
4 changed files with 22 additions and 10 deletions
+3 -1
View File
@@ -32,16 +32,18 @@ using namespace std;
int main(int argc, char** argv) {
try {
//create the singletons
ClientApplication::Create();
ConfigUtility::Create();
//call the server's routines
ClientApplication app;
ClientApplication& app = ClientApplication::GetSingleton();
app.Init(argc, argv);
app.Proc();
app.Quit();
//delete the singletons
ConfigUtility::Delete();
ClientApplication::Delete();
}
catch(exception& e) {
cerr << "Fatal exception thrown: " << e.what() << endl;