[Jsmooth-cvs] jsmooth/skeletons/simplewrap main.cpp,1.16,1.17
Status: Beta
Brought to you by:
reyes
From: <re...@us...> - 2004-03-04 22:35:26
|
Update of /cvsroot/jsmooth/jsmooth/skeletons/simplewrap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29990/skeletons/simplewrap Modified Files: main.cpp Log Message: added option to enable or disable the debug console at runtime Index: main.cpp =================================================================== RCS file: /cvsroot/jsmooth/jsmooth/skeletons/simplewrap/main.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** main.cpp 4 Mar 2004 21:04:49 -0000 1.16 --- main.cpp 4 Mar 2004 22:13:55 -0000 1.17 *************** *** 40,45 **** --- 40,49 ---- ResourceManager* globalResMan; + DebugConsole *DEBUGCONSOLE = NULL; + void lastExit() { + delete DEBUGCONSOLE; + DEBUGCONSOLE = 0; delete globalResMan; globalResMan = 0; *************** *** 54,67 **** // debug(text); // } - DebugConsole DEBUGCONSOLE("JSmooth Debug"); void _debugOutput(const std::string& text) { ! DEBUGCONSOLE.writeline(text); } void _debugWaitKey() { ! DEBUGCONSOLE.waitKey(); } --- 58,72 ---- // debug(text); // } void _debugOutput(const std::string& text) { ! if (DEBUGCONSOLE != NULL) ! DEBUGCONSOLE->writeline(text); } void _debugWaitKey() { ! if (DEBUGCONSOLE != NULL) ! DEBUGCONSOLE->waitKey(); } *************** *** 119,122 **** --- 124,134 ---- globalResMan = new ResourceManager("JAVA", PROPID, JARID); + + std::string dodebug = globalResMan->getProperty("skel_Debug"); + if (StringUtils::parseInt(dodebug) != 0) + { + DEBUGCONSOLE = new DebugConsole("JSmooth Debug"); + } + DEBUG(string("Main class: ") + globalResMan->getMainName()); *************** *** 175,178 **** --- 187,192 ---- // MessageBox(hwnd, "AFTER GETMESSAGE", "DEBUG", MB_OKCANCEL|MB_ICONQUESTION|MB_APPLMODAL); + delete DEBUGCONSOLE; + /* The program return-value is 0 - The value that PostQuitMessage() gave */ return messages.wParam; |