diff --git a/src/examples/IfcAdvancedHouse.cpp b/src/examples/IfcAdvancedHouse.cpp index 3a653a8fe6..f69e3822de 100644 --- a/src/examples/IfcAdvancedHouse.cpp +++ b/src/examples/IfcAdvancedHouse.cpp @@ -40,7 +40,7 @@ #define IfcSchema Ifc2x3 #include "../ifcparse/macros.h" -#include "../ifcparse/Ifc2x3.h" +#include "../ifcparse/schemas/Ifc2x3.h" #include "../ifcparse/hierarchy_helper.h" #include "../ifcgeom/Serialization/Serialization.h" diff --git a/src/examples/IfcOpenHouse.cpp b/src/examples/IfcOpenHouse.cpp index f33ebaf361..61ae49dc3d 100644 --- a/src/examples/IfcOpenHouse.cpp +++ b/src/examples/IfcOpenHouse.cpp @@ -37,7 +37,7 @@ #define IfcSchema Ifc2x3 #include "../ifcparse/macros.h" -#include "../ifcparse/Ifc2x3.h" +#include "../ifcparse/schemas/Ifc2x3.h" #include "../ifcparse/hierarchy_helper.h" #include "../ifcgeom/Serialization/Serialization.h" diff --git a/src/examples/IfcParseExamples.cpp b/src/examples/IfcParseExamples.cpp index d604ddafd5..075bf1d82d 100644 --- a/src/examples/IfcParseExamples.cpp +++ b/src/examples/IfcParseExamples.cpp @@ -22,7 +22,7 @@ #include "../ifcparse/file.h" #include "../ifcparse/logger.h" -#include "../ifcparse/Ifc2x3.h" +#include "../ifcparse/schemas/Ifc2x3.h" #include #include @@ -47,7 +47,7 @@ static_assert(false, "A boost preprocessor sequence of schema identifiers is nee // for and then overflow into an existing empty include file. #define INCLUDE_SCHEMA(n) \ - BOOST_PP_IIF(BOOST_PP_GREATER(BOOST_PP_SEQ_SIZE(SCHEMA_SEQ), n), BOOST_PP_STRINGIZE(../ifcparse/BOOST_PP_CAT(Ifc,BOOST_PP_SEQ_ELEM(BOOST_PP_MIN(n, BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_POP_BACK(SCHEMA_SEQ))),SCHEMA_SEQ)).h), "../ifcgeom/empty.h") + BOOST_PP_IIF(BOOST_PP_GREATER(BOOST_PP_SEQ_SIZE(SCHEMA_SEQ), n), BOOST_PP_STRINGIZE(../ifcparse/schemas/BOOST_PP_CAT(Ifc,BOOST_PP_SEQ_ELEM(BOOST_PP_MIN(n, BOOST_PP_SEQ_SIZE(BOOST_PP_SEQ_POP_BACK(SCHEMA_SEQ))),SCHEMA_SEQ)).h), "../ifcgeom/empty.h") #include INCLUDE_SCHEMA(0) #include INCLUDE_SCHEMA(1) diff --git a/src/examples/arbitrary_open_profile_def.cpp b/src/examples/arbitrary_open_profile_def.cpp index f159570850..d0d11087fd 100644 --- a/src/examples/arbitrary_open_profile_def.cpp +++ b/src/examples/arbitrary_open_profile_def.cpp @@ -28,7 +28,7 @@ #include #include -#include "../ifcparse/Ifc2x3.h" +#include "../ifcparse/schemas/Ifc2x3.h" #include "../ifcparse/IfcUtil.h" #include "../ifcparse/hierarchy_helper.h" diff --git a/src/examples/composite_profile_def.cpp b/src/examples/composite_profile_def.cpp index bcdda39e75..7c37a0d113 100644 --- a/src/examples/composite_profile_def.cpp +++ b/src/examples/composite_profile_def.cpp @@ -27,7 +27,7 @@ #include #include -#include "../ifcparse/Ifc2x3.h" +#include "../ifcparse/schemas/Ifc2x3.h" #include "../ifcparse/IfcUtil.h" #include "../ifcparse/hierarchy_helper.h" diff --git a/src/examples/csg_primitive.cpp b/src/examples/csg_primitive.cpp index 83f0760c19..657dfded2f 100644 --- a/src/examples/csg_primitive.cpp +++ b/src/examples/csg_primitive.cpp @@ -27,7 +27,7 @@ #include #include -#include "../ifcparse/Ifc2x3.h" +#include "../ifcparse/schemas/Ifc2x3.h" #include "../ifcparse/IfcUtil.h" #include "../ifcparse/hierarchy_helper.h" diff --git a/src/examples/ellipse_pies.cpp b/src/examples/ellipse_pies.cpp index 0a3816fb1a..0e503afb90 100644 --- a/src/examples/ellipse_pies.cpp +++ b/src/examples/ellipse_pies.cpp @@ -27,7 +27,7 @@ #include #include -#include "../ifcparse/Ifc2x3.h" +#include "../ifcparse/schemas/Ifc2x3.h" #include "../ifcparse/IfcUtil.h" #include "../ifcparse/hierarchy_helper.h" diff --git a/src/examples/faces.cpp b/src/examples/faces.cpp index e4b4c01083..6535208d1f 100644 --- a/src/examples/faces.cpp +++ b/src/examples/faces.cpp @@ -23,7 +23,7 @@ * * ********************************************************************************/ -#include "../ifcparse/Ifc2x3.h" +#include "../ifcparse/schemas/Ifc2x3.h" #include "../ifcparse/IfcUtil.h" #include "../ifcparse/hierarchy_helper.h" @@ -204,4 +204,4 @@ int main(int argc, char** argv) { file.header().file_name().name(filename); std::ofstream f(filename.c_str()); f << file; -} \ No newline at end of file +} diff --git a/src/examples/profiles.cpp b/src/examples/profiles.cpp index 31c0053572..4e0a323b5a 100644 --- a/src/examples/profiles.cpp +++ b/src/examples/profiles.cpp @@ -27,7 +27,7 @@ #include #include -#include "../ifcparse/Ifc2x3.h" +#include "../ifcparse/schemas/Ifc2x3.h" #include "../ifcparse/IfcUtil.h" #include "../ifcparse/hierarchy_helper.h" diff --git a/src/ifcparse/parse.cpp b/src/ifcparse/parse.cpp index e456c71f4e..037ea0d8a5 100644 --- a/src/ifcparse/parse.cpp +++ b/src/ifcparse/parse.cpp @@ -1408,19 +1408,19 @@ void parse_header( read_terminal(lexer, HEADER, true); read_terminal(lexer, Header_section_schema::file_description::Class().name_uc(), false); - header.set_file_description(read_header_entity(header.file(), storage, lexer, references_to_resolve, Header_section_schema::file_description::Class())); + header.set_file_description(read_header_entity(header.owner_file(), storage, lexer, references_to_resolve, Header_section_schema::file_description::Class())); if (!lexer.next().is_operator(';')) { throw exception("Expected ;"); } read_terminal(lexer, Header_section_schema::file_name::Class().name_uc(), false); - header.set_file_name(read_header_entity(header.file(), storage, lexer, references_to_resolve, Header_section_schema::file_name::Class())); + header.set_file_name(read_header_entity(header.owner_file(), storage, lexer, references_to_resolve, Header_section_schema::file_name::Class())); if (!lexer.next().is_operator(';')) { throw exception("Expected ;"); } read_terminal(lexer, Header_section_schema::file_schema::Class().name_uc(), false); - header.set_file_schema(read_header_entity(header.file(), storage, lexer, references_to_resolve, Header_section_schema::file_schema::Class())); + header.set_file_schema(read_header_entity(header.owner_file(), storage, lexer, references_to_resolve, Header_section_schema::file_schema::Class())); if (!lexer.next().is_operator(';')) { throw exception("Expected ;"); } @@ -1452,7 +1452,7 @@ spf_header& ifcopenshell::instance_streamer::ensure_header() { if (owner_ != nullptr) { header_ = &owner_->header(); - header_->file(owner_); + header_->owner_file(owner_); } else { owned_header_ = std::make_unique(owner_); header_ = owned_header_.get(); @@ -1859,7 +1859,7 @@ void ifcopenshell::impl::in_memory_file_storage::read_from_stream(Reader* s, con auto& storage = byid_[p.first.name_]; auto attr_index = p.first.index_; - if (storage->has_attribute_value(attr_index)) { + if (storage->template has_attribute_value(attr_index)) { express::Base inst = storage->get_attribute_value(attr_index); if (!inst.declaration().as_entity()) { // Probably a case of IfcPropertySetDefinitionSet, divert storage of reference to the simply type instance @@ -1868,7 +1868,7 @@ void ifcopenshell::impl::in_memory_file_storage::read_from_stream(Reader* s, con } } - if (storage->has_attribute_value(attr_index)) { + if (storage->template has_attribute_value(attr_index)) { storage->set_attribute_value(attr_index, express::Base(it->second)); } else { logger::error("Duplicate definition for instance reference"); @@ -1899,7 +1899,7 @@ void ifcopenshell::impl::in_memory_file_storage::read_from_stream(Reader* s, con auto& storage = byid_[p.first.name_]; auto attr_index = p.first.index_; - if (storage->has_attribute_value(attr_index)) { + if (storage->template has_attribute_value(attr_index)) { express::Base inst = storage->get_attribute_value(attr_index); if (!inst.declaration().as_entity()) { // Probably a case of IfcPropertySetDefinitionSet, divert storage of reference to the simply type instance @@ -1908,7 +1908,7 @@ void ifcopenshell::impl::in_memory_file_storage::read_from_stream(Reader* s, con } } - if (storage->has_attribute_value(attr_index)) { + if (storage->template has_attribute_value(attr_index)) { storage->set_attribute_value(attr_index, instances); } else { logger::error("Duplicate definition for instance reference"); @@ -1937,7 +1937,7 @@ void ifcopenshell::impl::in_memory_file_storage::read_from_stream(Reader* s, con auto& storage = byid_[p.first.name_]; auto attr_index = p.first.index_; - if (storage->has_attribute_value(attr_index)) { + if (storage->template has_attribute_value(attr_index)) { express::Base inst = storage->get_attribute_value(attr_index); if (!inst.declaration().as_entity()) { // Probably a case of IfcPropertySetDefinitionSet, divert storage of reference to the simply type instance @@ -1946,7 +1946,7 @@ void ifcopenshell::impl::in_memory_file_storage::read_from_stream(Reader* s, con } } - if (storage->has_attribute_value(attr_index)) { + if (storage->template has_attribute_value(attr_index)) { storage->set_attribute_value(attr_index, instances); } else { logger::error("Duplicate definition for instance reference"); diff --git a/src/ifcparse/spf_header.cpp b/src/ifcparse/spf_header.cpp index e68c1ab9f5..d3ccff3c4d 100644 --- a/src/ifcparse/spf_header.cpp +++ b/src/ifcparse/spf_header.cpp @@ -56,7 +56,7 @@ void spf_header::write(std::ostream& out) const { << "\n"; } -void ifcopenshell::spf_header::file(ifcopenshell::file* file) { +void ifcopenshell::spf_header::owner_file(ifcopenshell::file* file) { file_ = file; } diff --git a/src/ifcparse/spf_header.h b/src/ifcparse/spf_header.h index 349ae33dda..9daf4a25e8 100644 --- a/src/ifcparse/spf_header.h +++ b/src/ifcparse/spf_header.h @@ -40,8 +40,8 @@ class IFC_PARSE_API spf_header { void write(std::ostream& stream) const; - ifcopenshell::file* file() { return file_; } - void file(ifcopenshell::file* owner_file); + ifcopenshell::file* owner_file() { return file_; } + void owner_file(ifcopenshell::file* file); void set_file_description(const std::shared_ptr& description_data); void set_file_name(const std::shared_ptr& name_data);