mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-01 20:49:44 +00:00
Help SWIG understand header entities
This commit is contained in:
@@ -55,6 +55,10 @@ private:
|
|||||||
%ignore IfcParse::IfcSpfHeader::IfcSpfHeader(IfcSpfLexer*);
|
%ignore IfcParse::IfcSpfHeader::IfcSpfHeader(IfcSpfLexer*);
|
||||||
%ignore IfcParse::IfcSpfHeader::lexer;
|
%ignore IfcParse::IfcSpfHeader::lexer;
|
||||||
%ignore IfcParse::IfcSpfHeader::stream;
|
%ignore IfcParse::IfcSpfHeader::stream;
|
||||||
|
%ignore IfcParse::IfcSpfHeader::file_description;
|
||||||
|
%ignore IfcParse::IfcSpfHeader::file_name;
|
||||||
|
%ignore IfcParse::IfcSpfHeader::file_schema;
|
||||||
|
|
||||||
%ignore IfcParse::HeaderEntity::is;
|
%ignore IfcParse::HeaderEntity::is;
|
||||||
|
|
||||||
%ignore IfcParse::IfcFile::type_iterator;
|
%ignore IfcParse::IfcFile::type_iterator;
|
||||||
@@ -569,11 +573,23 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas
|
|||||||
};
|
};
|
||||||
|
|
||||||
%extend IfcParse::IfcSpfHeader {
|
%extend IfcParse::IfcSpfHeader {
|
||||||
|
// Cast to base class pointers for SWIG, because
|
||||||
|
// it has no idea about the schema definitions.
|
||||||
|
IfcUtil::IfcBaseClass* file_description_py() {
|
||||||
|
return $self->file_description();
|
||||||
|
}
|
||||||
|
IfcUtil::IfcBaseClass* file_name_py() {
|
||||||
|
return $self->file_name();
|
||||||
|
}
|
||||||
|
IfcUtil::IfcBaseClass* file_schema_py() {
|
||||||
|
return $self->file_schema();
|
||||||
|
}
|
||||||
|
|
||||||
%pythoncode %{
|
%pythoncode %{
|
||||||
# Hide the getters with read-only property implementations
|
# Hide the getters with read-only property implementations
|
||||||
file_description = property(file_description)
|
file_description = property(file_description_py)
|
||||||
file_name = property(file_name)
|
file_name = property(file_name_py)
|
||||||
file_schema = property(file_schema)
|
file_schema = property(file_schema_py)
|
||||||
%}
|
%}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user