mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-20 04:04:00 +00:00
Proceed with merge
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user