| 416 | } |
| 417 | |
| 418 | boost::logic::tribool TokenFunc::asLogical(const Token& token) { |
| 419 | if (token.type != Token_BOOL) { |
| 420 | throw IfcInvalidTokenException(token.startPos, toString(token), "boolean"); |
| 421 | } |
| 422 | if (token.value_int == 0) { |
| 423 | return false; |
| 424 | } |
| 425 | if (token.value_int == 1) { |
| 426 | return true; |
| 427 | } |
| 428 | return boost::logic::indeterminate; |
| 429 | } |
| 430 | |
| 431 | double TokenFunc::asFloat(const Token& token) { |
| 432 | #ifdef PERMISSIVE_FLOAT |
nothing calls this directly
no test coverage detected