mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +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 ) {
|
for ( MapEntityById::const_iterator it = f.begin(); it != f.end(); ++ it ) {
|
||||||
const IfcEntity e = it->second;
|
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;
|
os << "ENDSEC;" << std::endl;
|
||||||
|
|||||||
@@ -84,8 +84,10 @@ std::string IfcWritableEntity::toString(bool upper) {
|
|||||||
if ( upper ) {
|
if ( upper ) {
|
||||||
for (std::string::iterator p = dt.begin(); p != dt.end(); ++p ) *p = toupper(*p);
|
for (std::string::iterator p = dt.begin(); p != dt.end(); ++p ) *p = toupper(*p);
|
||||||
}
|
}
|
||||||
if ( _id ) ss << "#" << *_id;
|
if ( _id && !IfcSchema::Type::IsSimple(_type) ) {
|
||||||
ss << "=" << dt << "(";
|
ss << "#" << *_id << "=";
|
||||||
|
}
|
||||||
|
ss << dt << "(";
|
||||||
for ( std::map<int,ArgumentPtr>::const_iterator it = args.begin(); it != args.end(); ++ it ) {
|
for ( std::map<int,ArgumentPtr>::const_iterator it = args.begin(); it != args.end(); ++ it ) {
|
||||||
if ( it != args.begin() ) ss << ",";
|
if ( it != args.begin() ) ss << ",";
|
||||||
const ArgumentPtr a = it->second;
|
const ArgumentPtr a = it->second;
|
||||||
|
|||||||
Reference in New Issue
Block a user