mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 16:31:10 +00:00
#2018 prevent select types to be serialized as booleans
This commit is contained in:
@@ -289,9 +289,9 @@ void IfcWriteArgument::set(const aggregate_of_aggregate_of_instance::ptr& v) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Overload to detect null values
|
// Overload to detect null values
|
||||||
void IfcWriteArgument::set(IfcUtil::IfcBaseClass*const& v) {
|
void IfcWriteArgument::set(IfcUtil::IfcBaseInterface*const& v) {
|
||||||
if (v) {
|
if (v) {
|
||||||
container = v;
|
container = v->as<IfcUtil::IfcBaseClass>();
|
||||||
} else {
|
} else {
|
||||||
container = boost::blank();
|
container = boost::blank();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ namespace IfcWrite {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename boost::disable_if<boost::is_base_of<IfcUtil::IfcBaseClass, typename boost::remove_pointer<T>::type>, void>::type
|
typename boost::disable_if<boost::is_base_of<IfcUtil::IfcBaseInterface, typename boost::remove_pointer<T>::type>, void>::type
|
||||||
set(const T& t) {
|
set(const T& t) {
|
||||||
container = t;
|
container = t;
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ namespace IfcWrite {
|
|||||||
void set(const aggregate_of_aggregate_of_instance::ptr& v);
|
void set(const aggregate_of_aggregate_of_instance::ptr& v);
|
||||||
|
|
||||||
// Overload to detect null values
|
// Overload to detect null values
|
||||||
void set(IfcUtil::IfcBaseClass*const & v);
|
void set(IfcUtil::IfcBaseInterface*const & v);
|
||||||
|
|
||||||
operator int() const;
|
operator int() const;
|
||||||
operator bool() const;
|
operator bool() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user