mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Fix errors on clang
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <exception>
|
||||
#include <cstdalign>
|
||||
|
||||
// @todo don't do std::less but use hashing and cache hash values.
|
||||
|
||||
|
||||
+3
-20
@@ -27,32 +27,15 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include "ifc_parse_api.h"
|
||||
|
||||
#include "../ifcparse/aggregate_of_instance.h"
|
||||
#include "ArgumentType.h"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/dynamic_bitset.hpp>
|
||||
#include <boost/logic/tribool.hpp>
|
||||
|
||||
/*
|
||||
namespace boost {
|
||||
namespace logic {
|
||||
class tribool {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
class Argument;
|
||||
|
||||
class aggregate_of_instance;
|
||||
class aggregate_of_aggregate_of_instance;
|
||||
|
||||
class IfcEntityInstanceData;
|
||||
namespace IfcParse {
|
||||
class IfcFile;
|
||||
}
|
||||
namespace IfcUtil {
|
||||
class IfcBaseClass;
|
||||
|
||||
@@ -76,11 +59,11 @@ public:
|
||||
virtual operator std::vector<double>() const;
|
||||
virtual operator std::vector<std::string>() const;
|
||||
virtual operator std::vector<boost::dynamic_bitset<> >() const;
|
||||
virtual operator aggregate_of_instance::ptr() const;
|
||||
virtual operator boost::shared_ptr<aggregate_of_instance>() const;
|
||||
|
||||
virtual operator std::vector< std::vector<int> >() const;
|
||||
virtual operator std::vector< std::vector<double> >() const;
|
||||
virtual operator aggregate_of_aggregate_of_instance::ptr() const;
|
||||
virtual operator boost::shared_ptr<aggregate_of_aggregate_of_instance>() const;
|
||||
|
||||
virtual bool isNull() const = 0;
|
||||
virtual unsigned int size() const = 0;
|
||||
|
||||
+21
-11
@@ -129,19 +129,10 @@ namespace IfcUtil {
|
||||
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;
|
||||
}
|
||||
T get_value(const std::string& name) const;
|
||||
|
||||
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;
|
||||
}
|
||||
T get_value(const std::string& name, const T& default_value) const;
|
||||
|
||||
boost::shared_ptr<aggregate_of_instance> get_inverse(const std::string& a) const;
|
||||
};
|
||||
@@ -157,4 +148,23 @@ namespace IfcUtil {
|
||||
|
||||
}
|
||||
|
||||
#include "../ifcparse/Argument.h"
|
||||
|
||||
namespace IfcUtil {
|
||||
template <typename T>
|
||||
T IfcBaseEntity::get_value(const std::string& name) const {
|
||||
auto attr = get(name);
|
||||
return (T)*attr;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T IfcBaseEntity::get_value(const std::string& name, const T& default_value) const {
|
||||
auto attr = get(name);
|
||||
if (attr->isNull()) {
|
||||
return default_value;
|
||||
}
|
||||
return (T)*attr;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#include "../ifcparse/IfcBaseClass.h"
|
||||
#include "../ifcparse/IfcLogger.h"
|
||||
#include "../ifcparse/Argument.h"
|
||||
#include "../ifcparse/aggregate_of_instance.h"
|
||||
|
||||
#include "../ifcparse/IfcSpfStream.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user