Pick RC2 definitions where required

This commit is contained in:
Thomas Krijnen
2021-02-14 17:21:34 +01:00
parent 43b2982dbb
commit d2bf2cf46e
3 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -473,7 +473,7 @@ function(files_for_ifc_version IFC_VERSION RESULT_NAME)
)
endfunction()
set(SCHEMA_VERSIONS "2x3" "4" "4x1" "4x2" "4x3_rc1", "4x3_rc2")
set(SCHEMA_VERSIONS "2x3" "4" "4x1" "4x2" "4x3_rc1" "4x3_rc2")
if(COMPILE_SCHEMA)
# @todo, this appears to be untested at the moment
+3
View File
@@ -24,6 +24,7 @@
#include "../ifcparse/Ifc4x1.h"
#include "../ifcparse/Ifc4x2.h"
#include "../ifcparse/Ifc4x3_rc1.h"
#include "../ifcparse/Ifc4x3_rc2.h"
double IfcParse::IfcSIPrefixToValue(const std::string& v) {
if ( v == "EXA" ) return 1.e18;
@@ -79,10 +80,12 @@ template double IfcParse::get_SI_equivalent<Ifc4>(Ifc4::IfcNamedUnit* named_unit
template double IfcParse::get_SI_equivalent<Ifc4x1>(Ifc4x1::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4x2>(Ifc4x2::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4x3_rc1>(Ifc4x3_rc1::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4x3_rc2>(Ifc4x3_rc2::IfcNamedUnit* named_unit);
#else
template double IfcParse::get_SI_equivalent<Ifc2x3>(typename Ifc2x3::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4>(typename Ifc4::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4x1>(typename Ifc4x1::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4x2>(typename Ifc4x2::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4x3_rc1>(typename Ifc4x3_rc1::IfcNamedUnit* named_unit);
template double IfcParse::get_SI_equivalent<Ifc4x3_rc2>(typename Ifc4x3_rc2::IfcNamedUnit* named_unit);
#endif
+2
View File
@@ -81,6 +81,7 @@ void IfcParse::register_schema(schema_definition* s) {
#include "../ifcparse/Ifc4x1.h"
#include "../ifcparse/Ifc4x2.h"
#include "../ifcparse/Ifc4x3_rc1.h"
#include "../ifcparse/Ifc4x3_rc2.h"
const IfcParse::schema_definition* IfcParse::schema_by_name(const std::string& name) {
// TODO: initialize automatically somehow
@@ -89,6 +90,7 @@ const IfcParse::schema_definition* IfcParse::schema_by_name(const std::string& n
Ifc4x1::get_schema();
Ifc4x2::get_schema();
Ifc4x3_rc1::get_schema();
Ifc4x3_rc2::get_schema();
std::map<std::string, const IfcParse::schema_definition*>::const_iterator it = schemas.find(name);
if (it == schemas.end()) {