Proceed with merge

This commit is contained in:
Thomas Krijnen
2023-03-21 20:15:01 +01:00
parent cfb0eda067
commit c78b2893de
194 changed files with 105325 additions and 7785 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+15
View File
@@ -127,6 +127,21 @@ namespace IfcUtil {
virtual const IfcParse::entity& declaration() const = 0;
Argument* get(const std::string& name) const;
template <typename T>
T get_value(const std::string& name) const {
auto attr = get(name);
return (T)*attr;
}
template <typename T>
T get_value(const std::string& name, const T& default_value) const {
auto attr = get(name);
if (attr->isNull()) {
return default_value;
}
return (T)*attr;
}
boost::shared_ptr<aggregate_of_instance> get_inverse(const std::string& a) const;
};
+6 -4
View File
@@ -20,15 +20,17 @@
#ifndef IFCOPENSHELL_MACROS_H
#define IFCOPENSHELL_MACROS_H
#define MAKE_TYPE_NAME__(a, b) a ## b
#define MAKE_TYPE_NAME_(a, b) MAKE_TYPE_NAME__(a, b)
#define MAKE_TYPE_NAME(t) MAKE_TYPE_NAME_(t, IfcSchema)
#define POSTFIX_SCHEMA__(a, b) a ## _ ## b
#define POSTFIX_SCHEMA_(a, b) POSTFIX_SCHEMA__(a, b)
#define POSTFIX_SCHEMA(t) POSTFIX_SCHEMA_(t, IfcSchema)
#define STRINGIFY_(x) #x
#define STRINGIFY(x) STRINGIFY_(x)
#define MAKE_INIT_FN__(a, b) init_ ## a ## b
#define MAKE_INIT_FN__(a, b) init_ ## a ## _ ## b
#define MAKE_INIT_FN_(a, b) MAKE_INIT_FN__(a, b)
#define MAKE_INIT_FN(t) MAKE_INIT_FN_(t, IfcSchema)
#endif