MCPcopy Create free account
hub / github.com/assimp/assimp / AddLoadRequest

Method AddLoadRequest

code/Common/BaseImporter.cpp:583–607  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

581
582// ------------------------------------------------------------------------------------------------
583unsigned 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// ------------------------------------------------------------------------------------------------
610aiScene *BatchLoader::GetImport(unsigned int which) {

Callers 3

ParseNodeAttributesMethod · 0.80
ReadMultipartFileMethod · 0.80
InternReadFileMethod · 0.80

Calls 5

emplace_backMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
ComparePathsMethod · 0.45

Tested by

no test coverage detected