Work on runtime representation of schema

This commit is contained in:
aothms
2015-09-08 20:40:54 +02:00
parent 23beb5691c
commit d076fa588b
38 changed files with 12443 additions and 13645 deletions
+6 -5
View File
@@ -109,12 +109,13 @@ std::string IfcWritableEntity::toString(bool upper) const {
return ss.str();
}
unsigned int IfcWritableEntity::id() {
unsigned int IfcWritableEntity::id() const {
if ( !_id ) {
_id = new int(file->FreshId());
}
return *_id;
}
const IfcWritableEntity* IfcWritableEntity::isWritable() const { return this; }
IfcWritableEntity* IfcWritableEntity::isWritable() { return this; }
bool IfcWritableEntity::arg_writable(int i) {
std::map<int,bool>::const_iterator it = writemask.find(i);
@@ -390,11 +391,11 @@ public:
data << "." << i.enumeration_value << ".";
}
void operator()(const IfcUtil::IfcBaseClass* const& i) {
IfcAbstractEntity* e = i->entity;
if ( IfcSchema::Type::IsSimple(e->type()) ) {
data << e->toString(upper);
const IfcAbstractEntity& e = i->data();
if ( IfcSchema::Type::IsSimple(e.type()) ) {
data << e.toString(upper);
} else {
data << "#" << e->id();
data << "#" << e.id();
}
}
void operator()(const IfcEntityList::ptr& i) {