MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / findAsyncObjectLoadFilter

Function findAsyncObjectLoadFilter

source/MRMesh/MRSceneLoad.cpp:22–32  ·  view source on GitHub ↗

find corresponding filter in the async object loader registry

Source from the content-addressed store, hash-verified

20
21// find corresponding filter in the async object loader registry
22std::optional<IOFilter> findAsyncObjectLoadFilter( const std::filesystem::path& path )
23{
24 // TODO: resolve GCC bug
25 //auto ext = std::string( "*" ) + utf8string( path.extension().u8string() );
26 auto ext = utf8string( path.extension().u8string() );
27 ext = std::string( "*" ) + ext;
28 for ( auto& c : ext )
29 c = (char)std::tolower( c );
30 const auto asyncFilters = AsyncObjectLoad::getFilters();
31 return findFilter( asyncFilters, ext );
32}
33
34// helper class to unify scene construction process
35class SceneConstructor

Callers 1

Calls 2

utf8stringFunction · 0.85
findFilterFunction · 0.85

Tested by

no test coverage detected