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

Method canLoad

radiantcore/map/aas/Doom3AasFileLoader.cpp:30–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30bool Doom3AasFileLoader::canLoad(std::istream& stream) const
31{
32 // Instantiate a tokeniser to read the first few tokens
33 parser::BasicDefTokeniser<std::istream> tok(stream);
34
35 try
36 {
37 parseVersion(tok);
38 }
39 catch (parser::ParseException&)
40 {
41 return false;
42 }
43 catch (std::invalid_argument&)
44 {
45 return false;
46 }
47
48 return true;
49}
50
51IAasFilePtr Doom3AasFileLoader::loadFromStream(std::istream& stream)
52{

Callers 2

getLoaderForStreamMethod · 0.45
determineMapFormatFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected