| 28 | } |
| 29 | |
| 30 | bool 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 | |
| 51 | IAasFilePtr Doom3AasFileLoader::loadFromStream(std::istream& stream) |
| 52 | { |
no outgoing calls
no test coverage detected