Fixed retrieving attributes derived in subtype Convert argument type enumeration to python string Add ability to iterate over all instances from python

This commit is contained in:
Thomas Krijnen
2014-07-04 16:37:21 +02:00
parent dbc60bedd6
commit f674493843
10 changed files with 97 additions and 17 deletions
+6 -1
View File
@@ -76,10 +76,15 @@
}
}
%typemap(out) IfcUtil::ArgumentType {
const char* strs[] = {"INT", "BOOL", "DOUBLE", "STRING", "VECTOR_INT", "VECTOR_DOUBLE", "VECTOR_STRING", "ENTITY", "ENTITY_LIST", "ENTITY_LIST_LIST", "ENUMERATION", "DERIVED", "UNKNOWN"};
$result = SWIG_Python_str_FromChar(strs[$1]);
}
%typemap(out) std::pair<IfcUtil::ArgumentType,ArgumentPtr> {
const Argument& arg = *($1.second);
const IfcUtil::ArgumentType type = $1.first;
if (arg.isNull()) {
if (arg.isNull() || type == IfcUtil::Argument_DERIVED) {
Py_INCREF(Py_None);
$result = Py_None;
} else {