MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / getLoaderForStream

Method getLoaderForStream

radiantcore/map/aas/AasFileManager.cpp:34–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34IAasFileLoaderPtr AasFileManager::getLoaderForStream(std::istream& stream)
35{
36 IAasFileLoaderPtr loader;
37
38 for (const IAasFileLoaderPtr& candidate : _loaders)
39 {
40 // Rewind the stream before passing it to the format for testing
41 stream.seekg(0, std::ios_base::beg);
42
43 if (candidate->canLoad(stream))
44 {
45 loader = candidate;
46 break;
47 }
48 }
49
50 // Rewind the stream when we're done
51 stream.seekg(0, std::ios_base::beg);
52
53 return loader;
54}
55
56void AasFileManager::ensureAasTypesLoaded()
57{

Callers 1

ensureAasFileLoadedMethod · 0.80

Calls 1

canLoadMethod · 0.45

Tested by

no test coverage detected