| 43 | } |
| 44 | |
| 45 | bool mitk::BaseDataCompare::AreSameClasses(const BaseData *left, const BaseData *right, bool verbose) |
| 46 | { |
| 47 | if (left == nullptr && right == nullptr) |
| 48 | return true; |
| 49 | |
| 50 | if (left == nullptr && right != nullptr) |
| 51 | { |
| 52 | if (verbose) |
| 53 | MITK_WARN << "Left data is nullptr, right data is not (type " << right->GetNameOfClass() << ")"; |
| 54 | return false; |
| 55 | } |
| 56 | |
| 57 | if (left != nullptr && right == nullptr) |
| 58 | { |
| 59 | if (verbose) |
| 60 | MITK_WARN << "Right data is nullptr, left data is not (type " << left->GetNameOfClass() << ")"; |
| 61 | return false; |
| 62 | } |
| 63 | |
| 64 | // two real BaseData objects, need to really compare |
| 65 | if (left->GetNameOfClass() != right->GetNameOfClass()) |
| 66 | { |
| 67 | if (verbose) |
| 68 | MITK_WARN << "Mismatch: Left data is '" << left->GetNameOfClass() << "', " |
| 69 | << "right data is '" << right->GetNameOfClass() << "'"; |
| 70 | return false; |
| 71 | } |
| 72 | |
| 73 | return true; |
| 74 | } |
| 75 | |
| 76 | void mitk::BaseDataCompare::RegisterCoreEquals() |
| 77 | { |
nothing calls this directly
no test coverage detected