mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Fix serialization of simple type attributes
This commit is contained in:
@@ -891,7 +891,9 @@ std::ostream& operator<< (std::ostream& os, const IfcParse::IfcFile& f) {
|
||||
|
||||
for ( MapEntityById::const_iterator it = f.begin(); it != f.end(); ++ it ) {
|
||||
const IfcEntity e = it->second;
|
||||
os << e->entity->toString(true) << ";" << std::endl;
|
||||
if (!IfcSchema::Type::IsSimple(e->type())) {
|
||||
os << e->entity->toString(true) << ";" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
os << "ENDSEC;" << std::endl;
|
||||
|
||||
@@ -84,8 +84,10 @@ std::string IfcWritableEntity::toString(bool upper) {
|
||||
if ( upper ) {
|
||||
for (std::string::iterator p = dt.begin(); p != dt.end(); ++p ) *p = toupper(*p);
|
||||
}
|
||||
if ( _id ) ss << "#" << *_id;
|
||||
ss << "=" << dt << "(";
|
||||
if ( _id && !IfcSchema::Type::IsSimple(_type) ) {
|
||||
ss << "#" << *_id << "=";
|
||||
}
|
||||
ss << dt << "(";
|
||||
for ( std::map<int,ArgumentPtr>::const_iterator it = args.begin(); it != args.end(); ++ it ) {
|
||||
if ( it != args.begin() ) ss << ",";
|
||||
const ArgumentPtr a = it->second;
|
||||
|
||||
Reference in New Issue
Block a user