------------------------------------------------------------------------------------------------
| 581 | |
| 582 | // ------------------------------------------------------------------------------------------------ |
| 583 | unsigned int BatchLoader::AddLoadRequest(const std::string &file, |
| 584 | unsigned int steps /*= 0*/, const PropertyMap *map /*= nullptr*/) { |
| 585 | ai_assert(!file.empty()); |
| 586 | |
| 587 | // check whether we have this loading request already |
| 588 | for (LoadReqIt it = m_data->requests.begin(); it != m_data->requests.end(); ++it) { |
| 589 | // Call IOSystem's path comparison function here |
| 590 | if (m_data->pIOSystem->ComparePaths((*it).file, file)) { |
| 591 | if (map) { |
| 592 | if (!((*it).map == *map)) { |
| 593 | continue; |
| 594 | } |
| 595 | } else if (!(*it).map.empty()) { |
| 596 | continue; |
| 597 | } |
| 598 | |
| 599 | (*it).refCnt++; |
| 600 | return (*it).id; |
| 601 | } |
| 602 | } |
| 603 | |
| 604 | // no, we don't have it. So add it to the queue ... |
| 605 | m_data->requests.emplace_back(file, steps, map, m_data->next_id); |
| 606 | return m_data->next_id++; |
| 607 | } |
| 608 | |
| 609 | // ------------------------------------------------------------------------------------------------ |
| 610 | aiScene *BatchLoader::GetImport(unsigned int which) { |
no test coverage detected