mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 17:57:02 +00:00
Correctly cast writable enumeration attributes to string, as reported in: https://sourceforge.net/p/ifcopenshell/discussion/1782717/thread/53b70ea0
This commit is contained in:
@@ -271,7 +271,12 @@ public:
|
|||||||
IfcWriteArgument::operator int() const { return as<int>(); }
|
IfcWriteArgument::operator int() const { return as<int>(); }
|
||||||
IfcWriteArgument::operator bool() const { return as<bool>(); }
|
IfcWriteArgument::operator bool() const { return as<bool>(); }
|
||||||
IfcWriteArgument::operator double() const { return as<double>(); }
|
IfcWriteArgument::operator double() const { return as<double>(); }
|
||||||
IfcWriteArgument::operator std::string() const { return as<std::string>(); }
|
IfcWriteArgument::operator std::string() const {
|
||||||
|
if (argumentType() == argument_type_enumeration) {
|
||||||
|
return as<EnumerationReference>().enumeration_value;
|
||||||
|
}
|
||||||
|
return as<std::string>();
|
||||||
|
}
|
||||||
IfcWriteArgument::operator std::vector<double>() const { return as<std::vector<double> >(); }
|
IfcWriteArgument::operator std::vector<double>() const { return as<std::vector<double> >(); }
|
||||||
IfcWriteArgument::operator std::vector<int>() const { return as<std::vector<int> >(); }
|
IfcWriteArgument::operator std::vector<int>() const { return as<std::vector<int> >(); }
|
||||||
IfcWriteArgument::operator std::vector<std::string>() const { return as<std::vector<std::string > >(); }
|
IfcWriteArgument::operator std::vector<std::string>() const { return as<std::vector<std::string > >(); }
|
||||||
|
|||||||
Reference in New Issue
Block a user