logical handling in python and small fixes

This commit is contained in:
Thomas Krijnen
2021-07-29 16:32:45 +02:00
parent 7c3fcc26f4
commit 0d49c89943
8 changed files with 48 additions and 0 deletions
+5
View File
@@ -1212,6 +1212,11 @@ void IfcEntityInstanceData::setArgument(size_t i, Argument* a, IfcUtil::Argument
case IfcUtil::Argument_BOOL:
copy->set(static_cast<bool>(*a));
break;
case IfcUtil::Argument_LOGICAL: {
boost::logic::tribool tb = *a;
copy->set(tb);
break;
}
case IfcUtil::Argument_DOUBLE:
copy->set(static_cast<double>(*a));
break;
+1
View File
@@ -229,6 +229,7 @@ void StringBuilderVisitor::operator()(const std::vector< std::vector<double> >&
IfcWriteArgument::operator int() const { return as<int>(); }
IfcWriteArgument::operator bool() const { return as<bool>(); }
IfcWriteArgument::operator boost::logic::tribool() const { return as<boost::logic::tribool>(); }
IfcWriteArgument::operator double() const { return as<double>(); }
IfcWriteArgument::operator std::string() const {
if (type() == IfcUtil::Argument_ENUMERATION) {
+2
View File
@@ -145,6 +145,8 @@ namespace IfcWrite {
operator int() const;
operator bool() const;
operator boost::logic::tribool() const;
operator double() const;
operator std::string() const;
operator boost::dynamic_bitset<>() const;