| 423 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 424 | |
| 425 | void cDbDebug::OutputResults(void) |
| 426 | { |
| 427 | TCOUT << _T("\nResults of Blockfile / Hierarchy congruency tests: \n") << std::endl; |
| 428 | |
| 429 | // Check to see if our error lists are empty. If so, output a message that indicates |
| 430 | // that the two databases checked clean. |
| 431 | if (mpData->mlMissingFromHierarchy.empty() && mpData->mlMissingFromBlockFile.empty()) |
| 432 | TCOUT << _T("The database representations match!\n") << std::endl; |
| 433 | else |
| 434 | { |
| 435 | // Check to see if there was anything in the hierarchy that was not accounted for by the |
| 436 | // blockfile (quantum database). |
| 437 | if (!mpData->mlMissingFromBlockFile.empty()) |
| 438 | { |
| 439 | TCOUT << _T(" Objects (referenced by address) found in the hierarchy that were not\n"); |
| 440 | TCOUT << _T(" accounted for by the underlying quantum database: \n"); |
| 441 | |
| 442 | cDbDebug_i::AddressList::iterator i = mpData->mlMissingFromBlockFile.begin(); |
| 443 | for (; i != mpData->mlMissingFromBlockFile.end(); ++i) |
| 444 | TCOUT << _T("(") << (*i).first << _T(",") << (*i).second << _T(")") << std::endl; |
| 445 | } |
| 446 | else |
| 447 | TCOUT << _T(" All objects in Blockfile accounted for!\n"); |
| 448 | |
| 449 | //check to see if there was anything in the blockfile that was not accounted for by the |
| 450 | // hierarchy: |
| 451 | if (!mpData->mlMissingFromHierarchy.empty()) |
| 452 | { |
| 453 | TCOUT << _T(" Database information (referenced by a <blocknumber, offset> address)\n"); |
| 454 | TCOUT << _T(" not accounted for by the hierarchy :\n"); |
| 455 | |
| 456 | cDbDebug_i::AddressList::iterator i = mpData->mlMissingFromHierarchy.begin(); |
| 457 | for (; i != mpData->mlMissingFromHierarchy.end(); ++i) |
| 458 | TCOUT << _T("(") << (*i).first << _T(",") << (*i).second << _T(")") << std::endl; |
| 459 | } |
| 460 | else |
| 461 | TCOUT << _T("All objects in Hierarchy accounted for!\n"); |
| 462 | } //else |
| 463 | } |
| 464 | |
| 465 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 466 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |