[Jsmooth-cvs] jsmooth/skeletons/consolewrapper description-normal.skel,1.2,1.3 main.cpp,1.8,1.9
Status: Beta
Brought to you by:
reyes
From: <re...@us...> - 2004-03-04 22:56:31
|
Update of /cvsroot/jsmooth/jsmooth/skeletons/consolewrapper In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2308/skeletons/consolewrapper Modified Files: description-normal.skel main.cpp Log Message: added option to enable or disable the debug console at runtime Index: description-normal.skel =================================================================== RCS file: /cvsroot/jsmooth/jsmooth/skeletons/consolewrapper/description-normal.skel,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** description-normal.skel 17 Nov 2003 19:15:50 -0000 1.2 --- description-normal.skel 4 Mar 2004 22:35:01 -0000 1.3 *************** *** 1,4 **** --- 1,5 ---- <?xml version="1.0" encoding="ISO-8859-1"?> <jsmoothskeleton> + <debug>false</debug> <description>This skeleton wraps console applications. - Standard Input/Output and Error streams are available *************** *** 27,29 **** --- 28,37 ---- <value>0</value> </skeletonProperties> + <skeletonProperties> + <description>Enable the jsmooth debug traces</description> + <idName>Debug</idName> + <label>Debug traces</label> + <type>boolean</type> + <value>0</value> + </skeletonProperties> </jsmoothskeleton> Index: main.cpp =================================================================== RCS file: /cvsroot/jsmooth/jsmooth/skeletons/consolewrapper/main.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main.cpp 4 Mar 2004 08:23:44 -0000 1.8 --- main.cpp 4 Mar 2004 22:35:01 -0000 1.9 *************** *** 32,39 **** using namespace std; void _debugOutput(const std::string& text) { ! std::cerr << text << "\r\n"; } --- 32,41 ---- using namespace std; + bool enableDebug = false; void _debugOutput(const std::string& text) { ! if (enableDebug) ! std::cerr << text << "\r\n"; } *************** *** 45,48 **** --- 47,56 ---- { ResourceManager* globalResMan = new ResourceManager("JAVA", PROPID, JARID); + std::string dodebug = globalResMan->getProperty("skel_Debug"); + if (StringUtils::parseInt(dodebug) != 0) + { + enableDebug = true; + } + char curdir[256]; GetCurrentDirectory(256, curdir); |