Changeset 21046
- Timestamp:
- 02/23/08 10:42:23 (9 months ago)
- Files:
-
- juggler/trunk/modules/vapor/vpr/Util/Debug.cpp (modified) (29 diffs)
- juggler/trunk/modules/vapor/vpr/Util/Debug.h (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
juggler/trunk/modules/vapor/vpr/Util/Debug.cpp
r21044 r21046 36 36 #include <vpr/vprConfig.h> 37 37 38 #include < stdlib.h>38 #include <cstdlib> 39 39 #include <iostream> 40 40 #include <fstream> 41 41 #include <sstream> 42 42 #include <vector> 43 #include <utility> 43 44 #include <boost/concept_check.hpp> 44 45 … … 81 82 82 83 Debug::Debug() 83 : mFile(NULL) 84 : mDebugEnabled(true) 85 , mDebugLevel(2) 86 , mIndentLevel(0) // Initialy don't indent 87 , mFile(NULL) 84 88 , mStreamPtr(&std::cout) 85 { 86 indentLevel = 0; // Initialy don't indent 87 debugLevel = 2; // Should actually try to read env variable 88 mUseThreadLocal = false; // Initially set to false 89 89 , mUseThreadLocal(false) 90 { 90 91 std::string debug_lev; 91 92 vpr::System::getenv("VPR_DEBUG_NFY_LEVEL", debug_lev); … … 93 94 if ( ! debug_lev.empty() ) 94 95 { 95 debugLevel = atoi(debug_lev.c_str()); 96 std::cout << "VPR_DEBUG_NFY_LEVEL: Set to " << debugLevel << std::endl 97 << std::flush; 96 mDebugLevel = std::atoi(debug_lev.c_str()); 97 std::cout << "VPR_DEBUG_NFY_LEVEL set to " << mDebugLevel << std::endl; 98 98 } 99 99 else 100 100 { 101 std::cout << "VPR_DEBUG_NFY_LEVEL: Not found. " << std::endl 102 << std::flush; 103 std::cout << "VPR_DEBUG_NFY_LEVEL: Defaults to " << debugLevel 104 << std::endl << std::flush; 105 } 106 107 std::cout << "--------------------------------------------------------" << std::endl; 108 std::cout << "For more or less debug output change VPR_DEBUG_NFY_LEVEL" << std::endl; 109 std::cout << "--------------------------------------------------------" << std::endl; 101 std::cout << "VPR_DEBUG_NFY_LEVEL not found; defaults to " 102 << mDebugLevel << std::endl; 103 } 104 105 std::cout << "---------------------------------------------------------\n" 106 << "For more or less debug output, change VPR_DEBUG_NFY_LEVEL\n" 107 << "---------------------------------------------------------" 108 << std::endl; 110 109 111 110 std::string debug_enable; … … 114 113 if ( ! debug_enable.empty() ) 115 114 { 116 unsigned int debug_enable_val = atoi(debug_enable.c_str()); 117 if ( debug_enable_val != 0 ) 118 { 119 mDebugEnabled = true; 120 } 121 else 122 { 123 mDebugEnabled = false; 124 } 125 std::cout << "VPR_DEBUG_ENABLE: Set to " << mDebugEnabled << std::endl 126 << std::flush; 115 const unsigned int debug_enable_val(std::atoi(debug_enable.c_str())); 116 mDebugEnabled = debug_enable_val != 0; 117 std::cout << "VPR_DEBUG_ENABLE set to " << mDebugEnabled << std::endl; 127 118 } 128 119 else 129 120 { 130 121 mDebugEnabled = true; 131 std::cout << "VPR_DEBUG_ENABLE: Not found. " << std::endl 132 << std::flush; 133 std::cout << "VPR_DEBUG_ENABLE: Defaults to " << mDebugEnabled 134 << std::endl << std::flush; 122 std::cout << "VPR_DEBUG_ENABLE not found; defaults to " << mDebugEnabled 123 << std::endl; 135 124 } 136 125 137 126 // Check to see if there is a default Debug target 138 std::string debug_file_ptr; 139 vpr::System::getenv("VPR_DEBUG_FILE", debug_file_ptr); 140 141 if ( ! debug_file_ptr.empty() ) 142 { 143 std::string debug_file(debug_file_ptr); 144 if ("stderr" == debug_file) 127 std::string debug_file; 128 vpr::System::getenv("VPR_DEBUG_FILE", debug_file); 129 130 if ( ! debug_file.empty() ) 131 { 132 if ( "stderr" == debug_file ) 145 133 { 146 134 mStreamPtr = &std::cerr; 147 135 } 148 else if ( "stdout" != debug_file)136 else if ( "stdout" != debug_file ) 149 137 { 150 138 setOutputFile(debug_file); … … 156 144 } 157 145 } 146 } 147 148 Debug::~Debug() 149 { 150 /* Do nothing. */ ; 158 151 } 159 152 … … 192 185 193 186 std::ostream& Debug::getStream(const vpr::DebugCategory& cat, const int level, 194 const bool show _thread_info,195 const bool use _indent, const int indentChange,187 const bool showThreadInfo, 188 const bool useIndent, const int indentChange, 196 189 const bool lockStream) 197 190 { … … 200 193 // Lock the stream 201 194 #ifdef LOCK_DEBUG_STREAM 202 if (lockStream)195 if ( lockStream ) 203 196 { 204 197 debugLock().acquire(); // Get the lock … … 208 201 // this allows us to avoid pointer dereferences until necessary 209 202 std::ostream& os = *mStreamPtr; 210 if (indentChange < 0) // If decreasing indent211 { 212 indentLevel += indentChange;213 } 214 215 vprASSERT( indentLevel >= 0 && "Decreased indent below 0, look for bad code");203 if ( indentChange < 0 ) // If decreasing indent 204 { 205 mIndentLevel += indentChange; 206 } 207 208 vprASSERT(mIndentLevel >= 0 && "Decreased indent below 0, look for bad code"); 216 209 217 210 // --- Create stream header --- // 218 211 // If we have thread local stuff to do 219 if (mUseThreadLocal)220 { 221 if( (*gVprDebugCurColor).size() == 0)212 if ( mUseThreadLocal ) 213 { 214 if( (*gVprDebugCurColor).size() == 0 ) 222 215 { 223 216 os << clrRESET; … … 230 223 231 224 // Autoregister 232 if (mCategories.find(cat.mGuid) == mCategories.end())225 if ( mCategories.find(cat.mGuid) == mCategories.end() ) 233 226 { 234 227 addCategory(cat); 235 228 } 236 229 237 vprASSERT(mCategories.find(cat.mGuid) != mCategories.end() && "Failed to auto-register"); 238 239 std::stringstream sstream; 230 vprASSERT(mCategories.find(cat.mGuid) != mCategories.end() && 231 "Failed to auto-register"); 232 233 std::ostringstream sstream; 240 234 sstream << "[" << vpr::Thread::self() << "] " 241 235 << (*mCategories.find(cat.mGuid)).second.mPrefix; … … 244 238 // If not, then output space if we are also using indent (assume this means 245 239 // new line used) 246 if (show_thread_info)240 if ( showThreadInfo ) 247 241 { 248 242 os << sstream.str(); 249 243 } 250 else if (use_indent)244 else if ( useIndent ) 251 245 { 252 246 os << std::string(sstream.str().length(), ' '); … … 254 248 255 249 // Insert the correct number of tabs into the stream for indenting 256 if (use_indent)257 { 258 for (int i=0;i<indentLevel;i++)250 if ( useIndent ) 251 { 252 for ( int i = 0; i < mIndentLevel; ++i ) 259 253 { 260 254 os << "\t"; … … 263 257 264 258 // If we have thread local stuff to do 265 if (mUseThreadLocal)259 if ( mUseThreadLocal ) 266 260 { 267 261 const int column_width(3); 268 262 int column(0); 269 if ( (*gVprDebugCurColumn).size() > 0)263 if ( (*gVprDebugCurColumn).size() > 0 ) 270 264 { 271 265 column = (*gVprDebugCurColumn).back(); 272 266 } 273 267 274 for ( int i = 0; i < (column * column_width); ++i )268 for ( int i = 0; i < column * column_width; ++i ) 275 269 { 276 270 os << "\t"; 277 271 } 278 279 } 280 281 if(indentChange > 0) // If increasing indent 282 { 283 indentLevel += indentChange; 272 } 273 274 if ( indentChange > 0 ) // If increasing indent 275 { 276 mIndentLevel += indentChange; 284 277 } 285 278 … … 289 282 void Debug::addCategory(const vpr::DebugCategory& catId) 290 283 { 291 if (getLevel() >= vprDBG_VERB_LVL)292 { 293 std::cout << "\n Adding category named [" << catId.mName294 << " ] -- prefix: " << catId.mPrefix295 << " -- guid: " << catId.mGuid296 << " to debug categories:" << &mCategories297 << " size: " << mCategories.size()<< std::endl;298 } 299 mCategories.insert(std::pair<vpr::GUID,CategoryInfo>(catId.mGuid, 300 CategoryInfo(catId.mName,301 catId.mPrefix,302 false,303 false))); 304 305 if(getLevel() >= vprDBG_HVERB_LVL)306 {307 std::cout << "new size: " << mCategories.size()<< std::endl;284 if ( getLevel() >= vprDBG_VERB_LVL ) 285 { 286 std::cout << "\n[vpr::Debug] Adding category named '" << catId.mName 287 << "' (prefix='" << catId.mPrefix << "', GUID=" 288 << catId.mGuid << ")\n" 289 << " to debug categories: " << &mCategories 290 << " (size=" << mCategories.size() << ")" << std::endl; 291 } 292 293 mCategories.insert(std::make_pair(catId.mGuid, 294 CategoryInfo(catId.mName, catId.mPrefix, 295 false, false))); 296 297 if ( getLevel() >= vprDBG_HVERB_LVL ) 298 { 299 std::cout << " new size=" << mCategories.size() 300 << std::endl; 308 301 debugDump(); 309 302 } 303 310 304 updateAllowedCategories(); 311 if(getLevel() >= vprDBG_HVERB_LVL) 305 306 if ( getLevel() >= vprDBG_HVERB_LVL ) 312 307 { 313 308 debugDump(); … … 321 316 322 317 // Make sure category is in the vector 323 Debug::category_map_t::iterator cat = mCategories.find(catId.mGuid);324 325 if (cat == mCategories.end())318 category_map_t::iterator cat = mCategories.find(catId.mGuid); 319 320 if ( cat == mCategories.end() ) 326 321 { 327 322 // Autoregister … … 332 327 vprASSERT(cat != mCategories.end() && "Auto-register failed"); // ASSERT: We have a valid category 333 328 334 Debug::category_map_t::iterator cat_all = mCategories.find(vprDBG_ALL.mGuid);329 category_map_t::iterator cat_all = mCategories.find(vprDBG_ALL.mGuid); 335 330 vprASSERT(cat_all != mCategories.end()); // ASSERT: We have a valid category 336 331 337 332 // If I specified to listen to all OR 338 333 // If it has category of ALL 339 bool cat_is_all =(catId.mGuid == vprDBG_ALL.mGuid);340 bool allow_all =((*cat_all).second.mAllowed == true);341 342 if (cat_is_all || allow_all)334 const bool cat_is_all(catId.mGuid == vprDBG_ALL.mGuid); 335 const bool allow_all((*cat_all).second.mAllowed == true); 336 337 if ( cat_is_all || allow_all ) 343 338 { 344 339 allow_category = true; … … 351 346 // Check dis-allowing 352 347 // - If a category is disallowed, then set it false 353 if (allow_category) // Only worry about it if it is already enabled354 { 355 if ( (*cat).second.mDisallowed) // If disallowed348 if ( allow_category ) // Only worry about it if it is already enabled 349 { 350 if ( (*cat).second.mDisallowed ) // If disallowed 356 351 { 357 352 allow_category = false; // Dis-allow it … … 373 368 vpr::System::getenv(disallow_var, dbg_disallow_cats); 374 369 375 if (getLevel() >= vprDBG_VERB_LVL)376 { 377 std::cout << " updateAllowedCategories" << std::endl;378 std::cout << " updateAllowedCat: Trying to find vprDBG_ALL. guid ["379 << vprDBG_ALL.mGuid << "]" << std::endl;370 if ( getLevel() >= vprDBG_VERB_LVL ) 371 { 372 std::cout << "[vpr::Debug::updateAllowedCategories()] " 373 << "Trying to find vprDBG_ALL (guid=" << vprDBG_ALL.mGuid 374 << ")" << std::endl; 380 375 } 381 376 382 377 // Get cat info for vprDBG_ALL 383 378 // Auto-register vprDBG_ALL if needed 384 Debug::category_map_t::iterator cat_all = mCategories.find(vprDBG_ALL.mGuid);385 386 if (cat_all == mCategories.end())379 category_map_t::iterator cat_all = mCategories.find(vprDBG_ALL.mGuid); 380 381 if ( cat_all == mCategories.end() ) 387 382 { 388 383 addCategory(vprDBG_ALL); 389 384 cat_all = mCategories.find(vprDBG_ALL.mGuid); 390 385 } 391 vprASSERT(!mCategories.empty() && "Empty category list"); 392 vprASSERT((cat_all != mCategories.end()) && "Could not find vprDBG_ALL in category list"); // ASSERT: We have a valid category 386 387 vprASSERT(! mCategories.empty() && "Empty category list"); 388 // ASSERT: We have a valid category 389 vprASSERT(cat_all != mCategories.end() && 390 "Could not find vprDBG_ALL in category list"); 393 391 394 392 // --- Setup allowed categories --- // … … 401 399 (*cat_all).second.mAllowed = false; // Disable the showing of all for now 402 400 403 if(getLevel() >= vprDBG_VERB_LVL) 404 { 405 std::cout << " vprDEBUG::Found VPR_DEBUG_ALLOW_CATEGORIES: " 406 << "Updating allowed categories. (If blank, then none allowed.)" 407 << std::endl; 401 if ( getLevel() >= vprDBG_VERB_LVL ) 402 { 403 std::cout << "[vpr::Debug] Found VPR_DEBUG_ALLOW_CATEGORIES; " 404 << "updating allowed categories.\n" 405 << " (If the list is empty, then none are " 406 << "allowed.)" << std::endl; 408 407 } 409 408 410 409 // For each currently known category name 411 category_map_t::iterator i;412 for ( i = mCategories.begin(); i != mCategories.end(); ++i )413 { 414 std::stringcat_name = (*i).second.mName;415 if ( dbg_allow_cats.find(cat_name) != std::string::npos ) // Found one410 typedef category_map_t::iterator iter_type; 411 for ( iter_type i = mCategories.begin(); i != mCategories.end(); ++i ) 412 { 413 const std::string& cat_name = (*i).second.mName; 414 if ( dbg_allow_cats.find(cat_name) != std::string::npos ) // Found one 416 415 { 417 if (getLevel() >= vprDBG_CONFIG_LVL)416 if ( getLevel() >= vprDBG_CONFIG_LVL ) 418 417 { 419 std::cout << " vprDEBUG::updateAllowedCategories: Allowing:"420 << (*i).second.mName.c_str() << " val:"421 << (*i).first.toString()<< std::endl;418 std::cout << "[vpr::Debug::updateAllowedCategories()] " 419 << "Allowing " << (*i).second.mName 420 << " (GUID=" << (*i).first << ")" << std::endl; 422 421 } 423 422 (*i).second.mAllowed = true; … … 425 424 else 426 425 { 427 if (getLevel() >= vprDBG_HVERB_LVL)426 if ( getLevel() >= vprDBG_HVERB_LVL ) 428 427 { 429 std::cout << "vprDEBUG::updateAllowedCategories: Not found (to allow):"430 << (*i).second.mName.c_str() << " val:"431 << (*i).first.toString()<< std::endl;428 std::cout << "[vpr::Debug::updateAllowedCategories()] " 429 << "Not found (to allow) " << (*i).second.mName 430 << " (GUID=" << (*i).first << ")" << std::endl; 432 431 } 433 432 } … … 436 435 else 437 436 { 438 if (getLevel() >= vprDBG_CONFIG_LVL)439 { 440 std::cout << " vprDEBUG::VPR_DEBUG_ALLOW_CATEGORIES not found:\n"441 << " Setting to:vprDBG_ALL!" << std::endl;437 if ( getLevel() >= vprDBG_CONFIG_LVL ) 438 { 439 std::cout << "[vpr::Debug] VPR_DEBUG_ALLOW_CATEGORIES not found; " 440 << "setting to vprDBG_ALL!" << std::endl; 442 441 } 443 442 (*cat_all).second.mAllowed = true; // Enable the showing of all for now … … 447 446 if ( ! dbg_disallow_cats.empty() ) 448 447 { 449 if(getLevel() >= vprDBG_CONFIG_LVL) 450 { 451 std::cout << " vprDEBUG::Found VPR_DEBUG_DISALLOW_CATEGORIES: " 452 << "Updating dis-allowed categories. (If blank, then none dis-allowed.)" 453 << std::endl; 448 if ( getLevel() >= vprDBG_CONFIG_LVL ) 449 { 450 std::cout << "[vpr::Debug] Found VPR_DEBUG_DISALLOW_CATEGORIES; " 451 << "updating disallowed categories.\n" 452 << " (If the list is empty, then none are " 453 << "disallowed.)" << std::endl; 454 454 } 455 455 456 456 // For each currently known category name 457 category_map_t::iterator i;458 for ( i = mCategories.begin(); i != mCategories.end(); ++i )459 { 460 std::stringcat_name = (*i).second.mName;461 if ( dbg_disallow_cats.find(cat_name) != std::string::npos ) // Found one457 typedef category_map_t::iterator iter_type; 458 for ( iter_type i = mCategories.begin(); i != mCategories.end(); ++i ) 459 { 460 const std::string& cat_name = (*i).second.mName; 461 if ( dbg_disallow_cats.find(cat_name) != std::string::npos ) // Found one 462 462 { 463 if (getLevel() >= vprDBG_CONFIG_LVL)463 if ( getLevel() >= vprDBG_CONFIG_LVL ) 464 464 { 465 std::cout << " vprDEBUG::updateAllowedCategories: Disallowing:"466 << (*i).second.mName.c_str() << " val:"467 << (*i).first .toString()<< std::endl;465 std::cout << "[vpr::Debug::updateAllowedCategories()] " 466 << "Disallowing " << (*i).second.mName << " (GUID=" 467 << (*i).first << ")" << std::endl; 468 468 } 469 469 (*i).second.mDisallowed = true; … … 471 471 else 472 472 { 473 if (getLevel() >= vprDBG_VERB_LVL)473 if ( getLevel() >= vprDBG_VERB_LVL ) 474 474 { 475 std::cout << " vprDEBUG::updateAllowedCategories: Not found (to allow):"476 << (*i).second.mName.c_str() << " val:"477 << (*i).first.toString()<< std::endl;475 std::cout << "[vpr::Debug::updateAllowedCategories()] " 476 << "Not found (to disallow): " << (*i).second.mName 477 << " (GUID=" << (*i).first << ")" << std::endl; 478 478 } 479 479 } … … 482 482 else 483 483 { 484 if (getLevel() >= vprDBG_VERB_LVL)485 { 486 std::cout << " vprDEBUG::VPR_DEBUG_DISALLOW_CATEGORIES not found.\n"487 << std:: flush;488 } 489 } 490 491 } 492 493 void Debug::pushThreadLocalColumn( int column)484 if ( getLevel() >= vprDBG_VERB_LVL ) 485 { 486 std::cout << "[vpr::Debug] VPR_DEBUG_DISALLOW_CATEGORIES not found." 487 << std::endl; 488 } 489 } 490 491 } 492 493 void Debug::pushThreadLocalColumn(const int column) 494 494 { 495 495 (*gVprDebugCurColumn).push_back(column); … … 498 498 void Debug::popThreadLocalColumn() 499 499 { 500 if ( (*gVprDebugCurColumn).size() > 0)500 if ( (*gVprDebugCurColumn).size() > 0 ) 501 501 { 502 502 (*gVprDebugCurColumn).pop_back(); … … 511 511 void Debug::popThreadLocalColor() 512 512 { 513 if ( (*gVprDebugCurColor).size() > 0)513 if ( (*gVprDebugCurColor).size() > 0 ) 514 514 { 515 515 (*gVprDebugCurColor).pop_back(); … … 517 517 } 518 518 519 void Debug::debugDump() 519 void Debug::debugDump() const 520 520 { 521 521 std::cout << "--- vpr::Debug Status ----" << std::endl; 522 Debug::category_map_t::iterator i;523 524 for (i=mCategories.begin(); i != mCategories.end(); ++i)522 typedef category_map_t::const_iterator iter_type; 523 524 for ( iter_type i = mCategories.begin(); i != mCategories.end(); ++i ) 525 525 { 526 526 CategoryInfo cat_info = (*i).second; 527 std::cout << " cat [" << (*i).first << "]"528 << " name [" << cat_info.mName << "]"529 << " prefix [" << cat_info.mPrefix << "]"530 << " allowed [" << cat_info.mAllowed << "]"531 << " disallowed [" << cat_info.mDisallowed << "] " << std::endl;532 }533 527 std::cout << " cateogry=" << (*i).first << " " 528 << " name='" << cat_info.mName << "' " 529 << " prefix='" << cat_info.mPrefix << "' " 530 << " allowed=" << cat_info.mAllowed << " " 531 << " disallowed=" << cat_info.mDisallowed << " " 532 << std::endl; 533 } 534 534 } 535 535 536 536 void Debug::decrementIndentLevel() 537 537 { 538 vprASSERT(indentLevel > 0 && "Attempt to decrrement indent level below 0, check for bad code"); 539 indentLevel--; 538 vprASSERT(mIndentLevel > 0 && 539 "Attempt to decrrement indent level below 0, check for bad code"); 540 --mIndentLevel; 540 541 } 541 542 542 543 void Debug::incrementIndentLevel() 543 544 { 544 indentLevel++; 545 ++mIndentLevel; 546 } 547 548 Debug::CategoryInfo::CategoryInfo(const std::string& name, 549 const std::string& prefix, 550 const bool allowed, const bool disallowed) 551 : mName(name) 552 , mPrefix(prefix) 553 , mAllowed(allowed) 554 , mDisallowed(disallowed) 555 { 556 /* Do nothing. */ ; 545 557 } 546 558 … … 556 568 , mIndent(indent) 557 569 { 558 if (mIndent)570 if ( mIndent ) 559 571 { 560 572 vprDEBUG_BEGIN(mCat, mLevel) << mEntryText << vprDEBUG_FLUSH; … … 568 580 DebugOutputGuard::~DebugOutputGuard() 569 581 { 570 if (mIndent)582 if ( mIndent ) 571 583 { 572 584 // Don't bother printing anything if mExitText is an empty string. 573 if (mExitText == std::string(""))585 if ( mExitText.empty() ) 574 586 { 575 587 vprDEBUG_DECREMENT_INDENT(mCat, mLevel); … … 583 595 { 584 596 // Don't bother printing anything if mExitText is an empty string. 585 if (mExitText != std::string(""))597 if ( ! mExitText.empty() ) 586 598 { 587 599 vprDEBUG(mCat, mLevel) << mExitText << vprDEBUG_FLUSH; juggler/trunk/modules/vapor/vpr/Util/Debug.h
r21044 r21046 42 42 #include <string> 43 43 #include <map> 44 #include <boost/noncopyable.hpp> 44 45 45 46 #include <vpr/Sync/Mutex.h> … … 50 51 51 52 52 // Suggested use of val/ debugLevel53 // Suggested use of val/ebugLevel 53 54 // 54 55 // 0 - Critical messages (always need to be seen) … … 211 212 * Class to support debug output. 212 213 */ 213 class VPR_CLASS_API Debug 214 class VPR_CLASS_API Debug : private boost::noncopyable 214 215 { 215 216 protected: … … 220 221 Debug(); 221 222 222 // These two have to be here because Visual C++ will try to make them223 // exported public symbols. This causes problems because copying224 // vpr::Mutex objects is not allowed.225 Debug(const Debug&) {;}226 void operator= (const Debug&) {;}227 228 223 /** Initialize the system */ 229 224 void init(); … … 231 226 public: 232 227 233 ~Debug() 234 { 235 } 228 ~Debug(); 236 229 237 230 /** … … 257 250 /** Gets the debug stream to use */ 258 251 std::ostream& getStream(const vpr::DebugCategory& cat, const int level, 259 const bool show _thread_info = true,260 const bool use _indent = true,252 const bool showThreadInfo = true, 253 const bool useIndent = true, 261 254 const int indentChange = 0, 262 255 const bool lockStream = true); 263 256 264 int getLevel() 265 { 266 return debugLevel;257 int getLevel() const 258 { 259 return mDebugLevel; 267 260 } 268 261 … … 301 294 */ 302 295 //@{ 303 void pushThreadLocalColumn( int column);296 void pushThreadLocalColumn(const int column); 304 297 void popThreadLocalColumn(); 305 298 void pushThreadLocalColor(const std::string& color); … … 310 303 //@{ 311 304 /** Is debugging enabled? */ 312 bool isDebugEnabled() 305 bool isDebugEnabled() const 313 306 { 314 307 return mDebugEnabled; … … 329 322 330 323 /** Dumps the current status to screen. */ 331 void debugDump() ;324 void debugDump() const; 332 325 333 326 /** Decrements the level of indention. */ … … 338 331 339 332 private: 340 bool mDebugEnabled; /**< Is debug output enabled? */341 int debugLevel; /**< Debug level to use */342 int indentLevel; /**< Amount to indent */333 bool mDebugEnabled; /**< Is debug output enabled? */ 334 int mDebugLevel; /**< Debug level to use */ 335 int mIndentLevel; /**< Amount to indent */ 343 336 344 337 std::ofstream* mFile; /**< File we are using for all output. */ … … 350 343 Mutex mDebugLock; 351 344 352 struct CategoryInfo 353 { 354 /*CategoryInfo() 355 : mName("un-named"), mPrefix("unset"), mAllowed(false) 356 {;}*/ 357 345 struct VPR_CLASS_API CategoryInfo 346 { 358 347 CategoryInfo(const std::string& name, const std::string& prefix, 359 const bool allowed, const bool disallowed) 360 : mName(name) 361 , mPrefix(prefix) 362 , mAllowed(allowed) 363 , mDisallowed(disallowed) 364 {;} 348 const bool allowed, const bool disallowed); 365 349 366 350 std::string mName; /**< What is the name of the category */
