Check whether there is a metadata entry for the given key. \param [in] Key - the key value value to check for.
| 459 | /// Check whether there is a metadata entry for the given key. |
| 460 | /// \param [in] Key - the key value value to check for. |
| 461 | inline bool HasKey(const char *key) const { |
| 462 | if (nullptr == key) { |
| 463 | return false; |
| 464 | } |
| 465 | |
| 466 | // Search for the given key |
| 467 | for (unsigned int i = 0; i < mNumProperties; ++i) { |
| 468 | if (0 == strncmp(mKeys[i].C_Str(), key, mKeys[i].length)) { |
| 469 | return true; |
| 470 | } |
| 471 | } |
| 472 | return false; |
| 473 | } |
| 474 | |
| 475 | friend bool CompareKeys(const aiMetadata &lhs, const aiMetadata &rhs) { |
| 476 | if (lhs.mNumProperties != rhs.mNumProperties) { |