MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / asLogical

Method asLogical

src/ifcparse/IfcParse.cpp:418–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416}
417
418boost::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
431double TokenFunc::asFloat(const Token& token) {
432#ifdef PERMISSIVE_FLOAT

Callers

nothing calls this directly

Calls 1

IfcInvalidTokenExceptionFunction · 0.85

Tested by

no test coverage detected