mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-15 18:14:08 +00:00
Merge branch 'master' into performance_improvements
# Conflicts: # src/ifcexpressparser/implementation.py # src/ifcgeom/IfcGeomFunctions.cpp # src/ifcparse/Ifc4.cpp
This commit is contained in:
@@ -124,6 +124,18 @@ namespace IfcUtil {
|
||||
unsigned i = IfcSchema::Type::GetAttributeIndex($self->type(), a);
|
||||
return std::pair<IfcUtil::ArgumentType,Argument*>($self->getArgumentType(i), $self->getArgument(i));
|
||||
}
|
||||
|
||||
bool __eq__(IfcParse::IfcLateBoundEntity* other) const {
|
||||
if ($self == other) {
|
||||
return true;
|
||||
}
|
||||
return $self->id() == other->id() && $self->entity->file == other->entity->file;
|
||||
}
|
||||
|
||||
// Just something to have a somewhat sensible value to hash
|
||||
size_t file_pointer() const {
|
||||
return reinterpret_cast<size_t>($self->entity->file);
|
||||
}
|
||||
}
|
||||
|
||||
%extend IfcParse::IfcSpfHeader {
|
||||
@@ -208,4 +220,14 @@ namespace IfcUtil {
|
||||
const char* const version() {
|
||||
return IFCOPENSHELL_VERSION;
|
||||
}
|
||||
|
||||
std::string get_supertype(std::string n) {
|
||||
boost::to_upper(n);
|
||||
IfcSchema::Type::Enum t = IfcSchema::Type::FromString(n);
|
||||
if (IfcSchema::Type::Parent(t)) {
|
||||
return IfcSchema::Type::ToString(*IfcSchema::Type::Parent(t));
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
%}
|
||||
Reference in New Issue
Block a user