Resolving merge conflicts

This commit is contained in:
Thomas Krijnen
2017-12-11 14:20:30 +01:00
parent f36d27f7af
commit 988094b796
9 changed files with 2602 additions and 2578 deletions
+25 -16
View File
@@ -40,9 +40,11 @@ class SchemaClass(codegen.Base):
return "new aggregation_type(aggregation_type::%(aggr_type)s_type, %(bound1)d, %(bound2)d, %(decl_type)s)" % locals() return "new aggregation_type(aggregation_type::%(aggr_type)s_type, %(bound1)d, %(bound2)d, %(decl_type)s)" % locals()
elif isinstance(type, nodes.BinaryType): elif isinstance(type, nodes.BinaryType):
return "new simple_type(simple_type::binary_type)" return "new simple_type(simple_type::binary_type)"
elif isinstance(type, nodes.StringType):
return "new simple_type(simple_type::string_type)"
elif isinstance(type, str): elif isinstance(type, str):
if mapping.schema.is_type(type) or mapping.schema.is_entity(type): if mapping.schema.is_type(type) or mapping.schema.is_entity(type):
if emitted_names is None or type in emitted_types: if emitted_names is None or type.lower() in emitted_types:
return "new named_type(%s_type)" % type return "new named_type(%s_type)" % type
else: else:
raise UnmetDependenciesException(type) raise UnmetDependenciesException(type)
@@ -63,6 +65,9 @@ class SchemaClass(codegen.Base):
try: return et, attrs.index(attribute_name) try: return et, attrs.index(attribute_name)
except: pass except: pass
else:
raise Exception("No declared type for <%r>" % type)
self.schema_name = mapping.schema.name.capitalize() self.schema_name = mapping.schema.name.capitalize()
statements = ['', statements = ['',
@@ -80,24 +85,26 @@ class SchemaClass(codegen.Base):
for name in collection.keys(): for name in collection.keys():
statements.append('%(cpp_type)s* %(name)s_type = 0;' % locals()) statements.append('%(cpp_type)s* %(name)s_type = 0;' % locals())
statements.append('#ifdef _MSC_VER' ) statements.append("""
statements.append('#pragma optimize("", off)') #ifdef _MSC_VER
statements.append('#endif' ) #pragma optimize("", off)
#endif
""")
statements.append('schema_definition* populate_schema() {') statements.append('schema_definition* populate_schema() {')
emitted_types = set() emitted_types = set()
while len(emitted_types) < len(mapping.schema.simpletypes): while len(emitted_types) < len(mapping.schema.simpletypes):
for name, type in mapping.schema.simpletypes.items(): for name, type in mapping.schema.simpletypes.items():
if name in emitted_types: continue if name.lower() in emitted_types: continue
try: try:
declared_type = get_declared_type(type, emitted_types) declared_type = get_declared_type(type, emitted_types)
except UnmetDependenciesException: except UnmetDependenciesException:
# print("Unmet", repr(name))
continue continue
statements.append(' %(name)s_type = new type_declaration(IfcSchema::Type::%(name)s, %(declared_type)s);' % locals()) statements.append(' %(name)s_type = new type_declaration(IfcSchema::Type::%(name)s, %(declared_type)s);' % locals())
emitted_types.add(name) emitted_types.add(name.lower())
declared_types.append('%(name)s_type' % locals()) declared_types.append('%(name)s_type' % locals())
@@ -113,11 +120,11 @@ class SchemaClass(codegen.Base):
emitted_entities = set() emitted_entities = set()
while len(emitted_entities) < len(mapping.schema.entities): while len(emitted_entities) < len(mapping.schema.entities):
for name, type in mapping.schema.entities.items(): for name, type in mapping.schema.entities.items():
if name in emitted_entities: continue if name.lower() in emitted_entities: continue
if len(type.supertypes) == 0 or set(type.supertypes) < emitted_entities: if len(type.supertypes) == 0 or set(map(lambda s: s.lower(), type.supertypes)) < emitted_entities:
supertype = '0' if len(type.supertypes) == 0 else '%s_type' % type.supertypes[0] supertype = '0' if len(type.supertypes) == 0 else '%s_type' % type.supertypes[0]
statements.append(' %(name)s_type = new entity(IfcSchema::Type::%(name)s, %(supertype)s);' % locals()) statements.append(' %(name)s_type = new entity(IfcSchema::Type::%(name)s, %(supertype)s);' % locals())
emitted_entities.add(name) emitted_entities.add(name.lower())
declared_types.append('%(name)s_type' % locals()) declared_types.append('%(name)s_type' % locals())
@@ -126,14 +133,14 @@ class SchemaClass(codegen.Base):
emitted_selects = set() emitted_selects = set()
while len(emitted_selects) < len(mapping.schema.selects): while len(emitted_selects) < len(mapping.schema.selects):
for name, type in mapping.schema.selects.items(): for name, type in mapping.schema.selects.items():
if name in emitted_selects: continue if name.lower() in emitted_selects: continue
if set(type.values) < emmited: if set(map(lambda s: s.lower(),type.values)) < emmited:
statements.append(' {') statements.append(' {')
statements.append(' std::vector<const declaration*> items; items.reserve(%d);' % len(type.values)) statements.append(' std::vector<const declaration*> items; items.reserve(%d);' % len(type.values))
statements.extend(map(lambda v: ' items.push_back(%s_type);' % v, sorted(type.values))) statements.extend(map(lambda v: ' items.push_back(%s_type);' % v, sorted(type.values)))
statements.append(' %(name)s_type = new select_type(IfcSchema::Type::%(name)s, items);' % locals()) statements.append(' %(name)s_type = new select_type(IfcSchema::Type::%(name)s, items);' % locals())
statements.append(' }') statements.append(' }')
emitted_selects.add(name) emitted_selects.add(name.lower())
emmited.add(name) emmited.add(name)
declared_types.append('%(name)s_type' % locals()) declared_types.append('%(name)s_type' % locals())
@@ -181,9 +188,11 @@ class SchemaClass(codegen.Base):
statements.extend(('}','')) statements.extend(('}',''))
statements.append('#ifdef _MSC_VER' ) statements.append("""
statements.append('#pragma optimize("", on)') #ifdef _MSC_VER
statements.append('#endif' ) #pragma optimize("", on)
#endif
""")
statements.extend(('const schema_definition& get_schema() {', statements.extend(('const schema_definition& get_schema() {',
'', '',
+2 -2
View File
@@ -423,7 +423,7 @@ entity_implementation = """// Function implementations for %(name)s
%(inverse)s %(inverse)s
const IfcParse::entity& %(name)s::declaration() const { return *%(name)s_type; } const IfcParse::entity& %(name)s::declaration() const { return *%(name)s_type; }
Type::Enum %(name)s::Class() { return Type::%(name)s; } Type::Enum %(name)s::Class() { return Type::%(name)s; }
%(name)s::%(name)s(IfcEntityInstanceData* e) : %(superclass)s { if (!e) return; if (!e->is(Type::%(name)s)) throw IfcException("Unable to find find keyword in schema"); data_ = e; } %(name)s::%(name)s(IfcEntityInstanceData* e) : %(superclass)s { if (!e) return; if (e->type() != Type::%(name)s) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
%(name)s::%(name)s(%(constructor_arguments)s) : %(superclass)s {data_ = new IfcEntityInstanceData(Class()); %(constructor_implementation)s } %(name)s::%(name)s(%(constructor_arguments)s) : %(superclass)s {data_ = new IfcEntityInstanceData(Class()); %(constructor_implementation)s }
""" """
@@ -469,7 +469,7 @@ constructor_stmt_enum = "{IfcWrite::IfcWriteArgument* attr = new IfcWrite::I
constructor_stmt_array = "{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((%(name)s)->generalize()" +");data_->setArgument(%(index)d,attr);}" constructor_stmt_array = "{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((%(name)s)->generalize()" +");data_->setArgument(%(index)d,attr);}"
constructor_stmt_derived = "{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(IfcWrite::IfcWriteArgument::Derived()" +");data_->setArgument(%(index)d,attr);}" constructor_stmt_derived = "{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(IfcWrite::IfcWriteArgument::Derived()" +");data_->setArgument(%(index)d,attr);}"
constructor_stmt_optional = " if (%(name)s) {%(stmt)s } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); entity->setArgument(%(index)d, attr); }" constructor_stmt_optional = " if (%(name)s) {%(stmt)s } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(%(index)d, attr); }"
inverse_implementation = " inverse_map[Type::%(type)s].insert(std::make_pair(\"%(name)s\", std::make_pair(Type::%(related_type)s, %(index)d)));" inverse_implementation = " inverse_map[Type::%(type)s].insert(std::make_pair(\"%(name)s\", std::make_pair(Type::%(related_type)s, %(index)d)));"
+24 -14
View File
@@ -1009,6 +1009,11 @@ enumeration_type* IfcWindowPanelPositionEnum_type = 0;
enumeration_type* IfcWindowStyleConstructionEnum_type = 0; enumeration_type* IfcWindowStyleConstructionEnum_type = 0;
enumeration_type* IfcWindowStyleOperationEnum_type = 0; enumeration_type* IfcWindowStyleOperationEnum_type = 0;
enumeration_type* IfcWorkControlTypeEnum_type = 0; enumeration_type* IfcWorkControlTypeEnum_type = 0;
#ifdef _MSC_VER
#pragma optimize("", off)
#endif
schema_definition* populate_schema() { schema_definition* populate_schema() {
IfcAbsorbedDoseMeasure_type = new type_declaration(IfcSchema::Type::IfcAbsorbedDoseMeasure, new simple_type(simple_type::real_type)); IfcAbsorbedDoseMeasure_type = new type_declaration(IfcSchema::Type::IfcAbsorbedDoseMeasure, new simple_type(simple_type::real_type));
IfcAccelerationMeasure_type = new type_declaration(IfcSchema::Type::IfcAccelerationMeasure, new simple_type(simple_type::real_type)); IfcAccelerationMeasure_type = new type_declaration(IfcSchema::Type::IfcAccelerationMeasure, new simple_type(simple_type::real_type));
@@ -1023,7 +1028,7 @@ schema_definition* populate_schema() {
IfcCurvatureMeasure_type = new type_declaration(IfcSchema::Type::IfcCurvatureMeasure, new simple_type(simple_type::real_type)); IfcCurvatureMeasure_type = new type_declaration(IfcSchema::Type::IfcCurvatureMeasure, new simple_type(simple_type::real_type));
IfcDayInMonthNumber_type = new type_declaration(IfcSchema::Type::IfcDayInMonthNumber, new simple_type(simple_type::integer_type)); IfcDayInMonthNumber_type = new type_declaration(IfcSchema::Type::IfcDayInMonthNumber, new simple_type(simple_type::integer_type));
IfcDaylightSavingHour_type = new type_declaration(IfcSchema::Type::IfcDaylightSavingHour, new simple_type(simple_type::integer_type)); IfcDaylightSavingHour_type = new type_declaration(IfcSchema::Type::IfcDaylightSavingHour, new simple_type(simple_type::integer_type));
IfcDescriptiveMeasure_type = new type_declaration(IfcSchema::Type::IfcDescriptiveMeasure, None); IfcDescriptiveMeasure_type = new type_declaration(IfcSchema::Type::IfcDescriptiveMeasure, new simple_type(simple_type::string_type));
IfcDimensionCount_type = new type_declaration(IfcSchema::Type::IfcDimensionCount, new simple_type(simple_type::integer_type)); IfcDimensionCount_type = new type_declaration(IfcSchema::Type::IfcDimensionCount, new simple_type(simple_type::integer_type));
IfcDoseEquivalentMeasure_type = new type_declaration(IfcSchema::Type::IfcDoseEquivalentMeasure, new simple_type(simple_type::real_type)); IfcDoseEquivalentMeasure_type = new type_declaration(IfcSchema::Type::IfcDoseEquivalentMeasure, new simple_type(simple_type::real_type));
IfcDynamicViscosityMeasure_type = new type_declaration(IfcSchema::Type::IfcDynamicViscosityMeasure, new simple_type(simple_type::real_type)); IfcDynamicViscosityMeasure_type = new type_declaration(IfcSchema::Type::IfcDynamicViscosityMeasure, new simple_type(simple_type::real_type));
@@ -1034,16 +1039,16 @@ schema_definition* populate_schema() {
IfcElectricResistanceMeasure_type = new type_declaration(IfcSchema::Type::IfcElectricResistanceMeasure, new simple_type(simple_type::real_type)); IfcElectricResistanceMeasure_type = new type_declaration(IfcSchema::Type::IfcElectricResistanceMeasure, new simple_type(simple_type::real_type));
IfcElectricVoltageMeasure_type = new type_declaration(IfcSchema::Type::IfcElectricVoltageMeasure, new simple_type(simple_type::real_type)); IfcElectricVoltageMeasure_type = new type_declaration(IfcSchema::Type::IfcElectricVoltageMeasure, new simple_type(simple_type::real_type));
IfcEnergyMeasure_type = new type_declaration(IfcSchema::Type::IfcEnergyMeasure, new simple_type(simple_type::real_type)); IfcEnergyMeasure_type = new type_declaration(IfcSchema::Type::IfcEnergyMeasure, new simple_type(simple_type::real_type));
IfcFontStyle_type = new type_declaration(IfcSchema::Type::IfcFontStyle, None); IfcFontStyle_type = new type_declaration(IfcSchema::Type::IfcFontStyle, new simple_type(simple_type::string_type));
IfcFontVariant_type = new type_declaration(IfcSchema::Type::IfcFontVariant, None); IfcFontVariant_type = new type_declaration(IfcSchema::Type::IfcFontVariant, new simple_type(simple_type::string_type));
IfcFontWeight_type = new type_declaration(IfcSchema::Type::IfcFontWeight, None); IfcFontWeight_type = new type_declaration(IfcSchema::Type::IfcFontWeight, new simple_type(simple_type::string_type));
IfcForceMeasure_type = new type_declaration(IfcSchema::Type::IfcForceMeasure, new simple_type(simple_type::real_type)); IfcForceMeasure_type = new type_declaration(IfcSchema::Type::IfcForceMeasure, new simple_type(simple_type::real_type));
IfcFrequencyMeasure_type = new type_declaration(IfcSchema::Type::IfcFrequencyMeasure, new simple_type(simple_type::real_type)); IfcFrequencyMeasure_type = new type_declaration(IfcSchema::Type::IfcFrequencyMeasure, new simple_type(simple_type::real_type));
IfcGloballyUniqueId_type = new type_declaration(IfcSchema::Type::IfcGloballyUniqueId, None); IfcGloballyUniqueId_type = new type_declaration(IfcSchema::Type::IfcGloballyUniqueId, new simple_type(simple_type::string_type));
IfcHeatFluxDensityMeasure_type = new type_declaration(IfcSchema::Type::IfcHeatFluxDensityMeasure, new simple_type(simple_type::real_type)); IfcHeatFluxDensityMeasure_type = new type_declaration(IfcSchema::Type::IfcHeatFluxDensityMeasure, new simple_type(simple_type::real_type));
IfcHeatingValueMeasure_type = new type_declaration(IfcSchema::Type::IfcHeatingValueMeasure, new simple_type(simple_type::real_type)); IfcHeatingValueMeasure_type = new type_declaration(IfcSchema::Type::IfcHeatingValueMeasure, new simple_type(simple_type::real_type));
IfcHourInDay_type = new type_declaration(IfcSchema::Type::IfcHourInDay, new simple_type(simple_type::integer_type)); IfcHourInDay_type = new type_declaration(IfcSchema::Type::IfcHourInDay, new simple_type(simple_type::integer_type));
IfcIdentifier_type = new type_declaration(IfcSchema::Type::IfcIdentifier, None); IfcIdentifier_type = new type_declaration(IfcSchema::Type::IfcIdentifier, new simple_type(simple_type::string_type));
IfcIlluminanceMeasure_type = new type_declaration(IfcSchema::Type::IfcIlluminanceMeasure, new simple_type(simple_type::real_type)); IfcIlluminanceMeasure_type = new type_declaration(IfcSchema::Type::IfcIlluminanceMeasure, new simple_type(simple_type::real_type));
IfcInductanceMeasure_type = new type_declaration(IfcSchema::Type::IfcInductanceMeasure, new simple_type(simple_type::real_type)); IfcInductanceMeasure_type = new type_declaration(IfcSchema::Type::IfcInductanceMeasure, new simple_type(simple_type::real_type));
IfcInteger_type = new type_declaration(IfcSchema::Type::IfcInteger, new simple_type(simple_type::integer_type)); IfcInteger_type = new type_declaration(IfcSchema::Type::IfcInteger, new simple_type(simple_type::integer_type));
@@ -1051,7 +1056,7 @@ schema_definition* populate_schema() {
IfcIonConcentrationMeasure_type = new type_declaration(IfcSchema::Type::IfcIonConcentrationMeasure, new simple_type(simple_type::real_type)); IfcIonConcentrationMeasure_type = new type_declaration(IfcSchema::Type::IfcIonConcentrationMeasure, new simple_type(simple_type::real_type));
IfcIsothermalMoistureCapacityMeasure_type = new type_declaration(IfcSchema::Type::IfcIsothermalMoistureCapacityMeasure, new simple_type(simple_type::real_type)); IfcIsothermalMoistureCapacityMeasure_type = new type_declaration(IfcSchema::Type::IfcIsothermalMoistureCapacityMeasure, new simple_type(simple_type::real_type));
IfcKinematicViscosityMeasure_type = new type_declaration(IfcSchema::Type::IfcKinematicViscosityMeasure, new simple_type(simple_type::real_type)); IfcKinematicViscosityMeasure_type = new type_declaration(IfcSchema::Type::IfcKinematicViscosityMeasure, new simple_type(simple_type::real_type));
IfcLabel_type = new type_declaration(IfcSchema::Type::IfcLabel, None); IfcLabel_type = new type_declaration(IfcSchema::Type::IfcLabel, new simple_type(simple_type::string_type));
IfcLengthMeasure_type = new type_declaration(IfcSchema::Type::IfcLengthMeasure, new simple_type(simple_type::real_type)); IfcLengthMeasure_type = new type_declaration(IfcSchema::Type::IfcLengthMeasure, new simple_type(simple_type::real_type));
IfcLinearForceMeasure_type = new type_declaration(IfcSchema::Type::IfcLinearForceMeasure, new simple_type(simple_type::real_type)); IfcLinearForceMeasure_type = new type_declaration(IfcSchema::Type::IfcLinearForceMeasure, new simple_type(simple_type::real_type));
IfcLinearMomentMeasure_type = new type_declaration(IfcSchema::Type::IfcLinearMomentMeasure, new simple_type(simple_type::real_type)); IfcLinearMomentMeasure_type = new type_declaration(IfcSchema::Type::IfcLinearMomentMeasure, new simple_type(simple_type::real_type));
@@ -1085,7 +1090,7 @@ schema_definition* populate_schema() {
IfcPositiveLengthMeasure_type = new type_declaration(IfcSchema::Type::IfcPositiveLengthMeasure, new named_type(IfcLengthMeasure_type)); IfcPositiveLengthMeasure_type = new type_declaration(IfcSchema::Type::IfcPositiveLengthMeasure, new named_type(IfcLengthMeasure_type));
IfcPositivePlaneAngleMeasure_type = new type_declaration(IfcSchema::Type::IfcPositivePlaneAngleMeasure, new named_type(IfcPlaneAngleMeasure_type)); IfcPositivePlaneAngleMeasure_type = new type_declaration(IfcSchema::Type::IfcPositivePlaneAngleMeasure, new named_type(IfcPlaneAngleMeasure_type));
IfcPowerMeasure_type = new type_declaration(IfcSchema::Type::IfcPowerMeasure, new simple_type(simple_type::real_type)); IfcPowerMeasure_type = new type_declaration(IfcSchema::Type::IfcPowerMeasure, new simple_type(simple_type::real_type));
IfcPresentableText_type = new type_declaration(IfcSchema::Type::IfcPresentableText, None); IfcPresentableText_type = new type_declaration(IfcSchema::Type::IfcPresentableText, new simple_type(simple_type::string_type));
IfcPressureMeasure_type = new type_declaration(IfcSchema::Type::IfcPressureMeasure, new simple_type(simple_type::real_type)); IfcPressureMeasure_type = new type_declaration(IfcSchema::Type::IfcPressureMeasure, new simple_type(simple_type::real_type));
IfcRadioActivityMeasure_type = new type_declaration(IfcSchema::Type::IfcRadioActivityMeasure, new simple_type(simple_type::real_type)); IfcRadioActivityMeasure_type = new type_declaration(IfcSchema::Type::IfcRadioActivityMeasure, new simple_type(simple_type::real_type));
IfcRatioMeasure_type = new type_declaration(IfcSchema::Type::IfcRatioMeasure, new simple_type(simple_type::real_type)); IfcRatioMeasure_type = new type_declaration(IfcSchema::Type::IfcRatioMeasure, new simple_type(simple_type::real_type));
@@ -1104,11 +1109,11 @@ schema_definition* populate_schema() {
IfcSpecularExponent_type = new type_declaration(IfcSchema::Type::IfcSpecularExponent, new simple_type(simple_type::real_type)); IfcSpecularExponent_type = new type_declaration(IfcSchema::Type::IfcSpecularExponent, new simple_type(simple_type::real_type));
IfcSpecularRoughness_type = new type_declaration(IfcSchema::Type::IfcSpecularRoughness, new simple_type(simple_type::real_type)); IfcSpecularRoughness_type = new type_declaration(IfcSchema::Type::IfcSpecularRoughness, new simple_type(simple_type::real_type));
IfcTemperatureGradientMeasure_type = new type_declaration(IfcSchema::Type::IfcTemperatureGradientMeasure, new simple_type(simple_type::real_type)); IfcTemperatureGradientMeasure_type = new type_declaration(IfcSchema::Type::IfcTemperatureGradientMeasure, new simple_type(simple_type::real_type));
IfcText_type = new type_declaration(IfcSchema::Type::IfcText, None); IfcText_type = new type_declaration(IfcSchema::Type::IfcText, new simple_type(simple_type::string_type));
IfcTextAlignment_type = new type_declaration(IfcSchema::Type::IfcTextAlignment, None); IfcTextAlignment_type = new type_declaration(IfcSchema::Type::IfcTextAlignment, new simple_type(simple_type::string_type));
IfcTextDecoration_type = new type_declaration(IfcSchema::Type::IfcTextDecoration, None); IfcTextDecoration_type = new type_declaration(IfcSchema::Type::IfcTextDecoration, new simple_type(simple_type::string_type));
IfcTextFontName_type = new type_declaration(IfcSchema::Type::IfcTextFontName, None); IfcTextFontName_type = new type_declaration(IfcSchema::Type::IfcTextFontName, new simple_type(simple_type::string_type));
IfcTextTransformation_type = new type_declaration(IfcSchema::Type::IfcTextTransformation, None); IfcTextTransformation_type = new type_declaration(IfcSchema::Type::IfcTextTransformation, new simple_type(simple_type::string_type));
IfcThermalAdmittanceMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalAdmittanceMeasure, new simple_type(simple_type::real_type)); IfcThermalAdmittanceMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalAdmittanceMeasure, new simple_type(simple_type::real_type));
IfcThermalConductivityMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalConductivityMeasure, new simple_type(simple_type::real_type)); IfcThermalConductivityMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalConductivityMeasure, new simple_type(simple_type::real_type));
IfcThermalExpansionCoefficientMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalExpansionCoefficientMeasure, new simple_type(simple_type::real_type)); IfcThermalExpansionCoefficientMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalExpansionCoefficientMeasure, new simple_type(simple_type::real_type));
@@ -8867,7 +8872,7 @@ schema_definition* populate_schema() {
} }
{ {
std::vector<const entity::attribute*> attributes; attributes.reserve(2); std::vector<const entity::attribute*> attributes; attributes.reserve(2);
attributes.push_back(new entity::attribute("Name", None, false)); attributes.push_back(new entity::attribute("Name", new simple_type(simple_type::string_type), false));
attributes.push_back(new entity::attribute("Rows", new aggregation_type(aggregation_type::list_type, 1, -1, new named_type(IfcTableRow_type)), false)); attributes.push_back(new entity::attribute("Rows", new aggregation_type(aggregation_type::list_type, 1, -1, new named_type(IfcTableRow_type)), false));
std::vector<bool> derived; derived.reserve(2); std::vector<bool> derived; derived.reserve(2);
derived.push_back(false); derived.push_back(false); derived.push_back(false); derived.push_back(false);
@@ -10374,6 +10379,11 @@ schema_definition* populate_schema() {
return new schema_definition("IFC2X3", declarations, true); return new schema_definition("IFC2X3", declarations, true);
} }
#ifdef _MSC_VER
#pragma optimize("", on)
#endif
const schema_definition& get_schema() { const schema_definition& get_schema() {
static const schema_definition* s = populate_schema(); static const schema_definition* s = populate_schema();
+1134 -1134
View File
File diff suppressed because one or more lines are too long
+28 -18
View File
@@ -1194,6 +1194,11 @@ enumeration_type* IfcWindowTypePartitioningEnum_type = 0;
enumeration_type* IfcWorkCalendarTypeEnum_type = 0; enumeration_type* IfcWorkCalendarTypeEnum_type = 0;
enumeration_type* IfcWorkPlanTypeEnum_type = 0; enumeration_type* IfcWorkPlanTypeEnum_type = 0;
enumeration_type* IfcWorkScheduleTypeEnum_type = 0; enumeration_type* IfcWorkScheduleTypeEnum_type = 0;
#ifdef _MSC_VER
#pragma optimize("", off)
#endif
schema_definition* populate_schema() { schema_definition* populate_schema() {
IfcAbsorbedDoseMeasure_type = new type_declaration(IfcSchema::Type::IfcAbsorbedDoseMeasure, new simple_type(simple_type::real_type)); IfcAbsorbedDoseMeasure_type = new type_declaration(IfcSchema::Type::IfcAbsorbedDoseMeasure, new simple_type(simple_type::real_type));
IfcAccelerationMeasure_type = new type_declaration(IfcSchema::Type::IfcAccelerationMeasure, new simple_type(simple_type::real_type)); IfcAccelerationMeasure_type = new type_declaration(IfcSchema::Type::IfcAccelerationMeasure, new simple_type(simple_type::real_type));
@@ -1210,14 +1215,14 @@ schema_definition* populate_schema() {
IfcContextDependentMeasure_type = new type_declaration(IfcSchema::Type::IfcContextDependentMeasure, new simple_type(simple_type::real_type)); IfcContextDependentMeasure_type = new type_declaration(IfcSchema::Type::IfcContextDependentMeasure, new simple_type(simple_type::real_type));
IfcCountMeasure_type = new type_declaration(IfcSchema::Type::IfcCountMeasure, new simple_type(simple_type::number_type)); IfcCountMeasure_type = new type_declaration(IfcSchema::Type::IfcCountMeasure, new simple_type(simple_type::number_type));
IfcCurvatureMeasure_type = new type_declaration(IfcSchema::Type::IfcCurvatureMeasure, new simple_type(simple_type::real_type)); IfcCurvatureMeasure_type = new type_declaration(IfcSchema::Type::IfcCurvatureMeasure, new simple_type(simple_type::real_type));
IfcDate_type = new type_declaration(IfcSchema::Type::IfcDate, None); IfcDate_type = new type_declaration(IfcSchema::Type::IfcDate, new simple_type(simple_type::string_type));
IfcDateTime_type = new type_declaration(IfcSchema::Type::IfcDateTime, None); IfcDateTime_type = new type_declaration(IfcSchema::Type::IfcDateTime, new simple_type(simple_type::string_type));
IfcDayInMonthNumber_type = new type_declaration(IfcSchema::Type::IfcDayInMonthNumber, new simple_type(simple_type::integer_type)); IfcDayInMonthNumber_type = new type_declaration(IfcSchema::Type::IfcDayInMonthNumber, new simple_type(simple_type::integer_type));
IfcDayInWeekNumber_type = new type_declaration(IfcSchema::Type::IfcDayInWeekNumber, new simple_type(simple_type::integer_type)); IfcDayInWeekNumber_type = new type_declaration(IfcSchema::Type::IfcDayInWeekNumber, new simple_type(simple_type::integer_type));
IfcDescriptiveMeasure_type = new type_declaration(IfcSchema::Type::IfcDescriptiveMeasure, None); IfcDescriptiveMeasure_type = new type_declaration(IfcSchema::Type::IfcDescriptiveMeasure, new simple_type(simple_type::string_type));
IfcDimensionCount_type = new type_declaration(IfcSchema::Type::IfcDimensionCount, new simple_type(simple_type::integer_type)); IfcDimensionCount_type = new type_declaration(IfcSchema::Type::IfcDimensionCount, new simple_type(simple_type::integer_type));
IfcDoseEquivalentMeasure_type = new type_declaration(IfcSchema::Type::IfcDoseEquivalentMeasure, new simple_type(simple_type::real_type)); IfcDoseEquivalentMeasure_type = new type_declaration(IfcSchema::Type::IfcDoseEquivalentMeasure, new simple_type(simple_type::real_type));
IfcDuration_type = new type_declaration(IfcSchema::Type::IfcDuration, None); IfcDuration_type = new type_declaration(IfcSchema::Type::IfcDuration, new simple_type(simple_type::string_type));
IfcDynamicViscosityMeasure_type = new type_declaration(IfcSchema::Type::IfcDynamicViscosityMeasure, new simple_type(simple_type::real_type)); IfcDynamicViscosityMeasure_type = new type_declaration(IfcSchema::Type::IfcDynamicViscosityMeasure, new simple_type(simple_type::real_type));
IfcElectricCapacitanceMeasure_type = new type_declaration(IfcSchema::Type::IfcElectricCapacitanceMeasure, new simple_type(simple_type::real_type)); IfcElectricCapacitanceMeasure_type = new type_declaration(IfcSchema::Type::IfcElectricCapacitanceMeasure, new simple_type(simple_type::real_type));
IfcElectricChargeMeasure_type = new type_declaration(IfcSchema::Type::IfcElectricChargeMeasure, new simple_type(simple_type::real_type)); IfcElectricChargeMeasure_type = new type_declaration(IfcSchema::Type::IfcElectricChargeMeasure, new simple_type(simple_type::real_type));
@@ -1226,15 +1231,15 @@ schema_definition* populate_schema() {
IfcElectricResistanceMeasure_type = new type_declaration(IfcSchema::Type::IfcElectricResistanceMeasure, new simple_type(simple_type::real_type)); IfcElectricResistanceMeasure_type = new type_declaration(IfcSchema::Type::IfcElectricResistanceMeasure, new simple_type(simple_type::real_type));
IfcElectricVoltageMeasure_type = new type_declaration(IfcSchema::Type::IfcElectricVoltageMeasure, new simple_type(simple_type::real_type)); IfcElectricVoltageMeasure_type = new type_declaration(IfcSchema::Type::IfcElectricVoltageMeasure, new simple_type(simple_type::real_type));
IfcEnergyMeasure_type = new type_declaration(IfcSchema::Type::IfcEnergyMeasure, new simple_type(simple_type::real_type)); IfcEnergyMeasure_type = new type_declaration(IfcSchema::Type::IfcEnergyMeasure, new simple_type(simple_type::real_type));
IfcFontStyle_type = new type_declaration(IfcSchema::Type::IfcFontStyle, None); IfcFontStyle_type = new type_declaration(IfcSchema::Type::IfcFontStyle, new simple_type(simple_type::string_type));
IfcFontVariant_type = new type_declaration(IfcSchema::Type::IfcFontVariant, None); IfcFontVariant_type = new type_declaration(IfcSchema::Type::IfcFontVariant, new simple_type(simple_type::string_type));
IfcFontWeight_type = new type_declaration(IfcSchema::Type::IfcFontWeight, None); IfcFontWeight_type = new type_declaration(IfcSchema::Type::IfcFontWeight, new simple_type(simple_type::string_type));
IfcForceMeasure_type = new type_declaration(IfcSchema::Type::IfcForceMeasure, new simple_type(simple_type::real_type)); IfcForceMeasure_type = new type_declaration(IfcSchema::Type::IfcForceMeasure, new simple_type(simple_type::real_type));
IfcFrequencyMeasure_type = new type_declaration(IfcSchema::Type::IfcFrequencyMeasure, new simple_type(simple_type::real_type)); IfcFrequencyMeasure_type = new type_declaration(IfcSchema::Type::IfcFrequencyMeasure, new simple_type(simple_type::real_type));
IfcGloballyUniqueId_type = new type_declaration(IfcSchema::Type::IfcGloballyUniqueId, None); IfcGloballyUniqueId_type = new type_declaration(IfcSchema::Type::IfcGloballyUniqueId, new simple_type(simple_type::string_type));
IfcHeatFluxDensityMeasure_type = new type_declaration(IfcSchema::Type::IfcHeatFluxDensityMeasure, new simple_type(simple_type::real_type)); IfcHeatFluxDensityMeasure_type = new type_declaration(IfcSchema::Type::IfcHeatFluxDensityMeasure, new simple_type(simple_type::real_type));
IfcHeatingValueMeasure_type = new type_declaration(IfcSchema::Type::IfcHeatingValueMeasure, new simple_type(simple_type::real_type)); IfcHeatingValueMeasure_type = new type_declaration(IfcSchema::Type::IfcHeatingValueMeasure, new simple_type(simple_type::real_type));
IfcIdentifier_type = new type_declaration(IfcSchema::Type::IfcIdentifier, None); IfcIdentifier_type = new type_declaration(IfcSchema::Type::IfcIdentifier, new simple_type(simple_type::string_type));
IfcIlluminanceMeasure_type = new type_declaration(IfcSchema::Type::IfcIlluminanceMeasure, new simple_type(simple_type::real_type)); IfcIlluminanceMeasure_type = new type_declaration(IfcSchema::Type::IfcIlluminanceMeasure, new simple_type(simple_type::real_type));
IfcInductanceMeasure_type = new type_declaration(IfcSchema::Type::IfcInductanceMeasure, new simple_type(simple_type::real_type)); IfcInductanceMeasure_type = new type_declaration(IfcSchema::Type::IfcInductanceMeasure, new simple_type(simple_type::real_type));
IfcInteger_type = new type_declaration(IfcSchema::Type::IfcInteger, new simple_type(simple_type::integer_type)); IfcInteger_type = new type_declaration(IfcSchema::Type::IfcInteger, new simple_type(simple_type::integer_type));
@@ -1242,7 +1247,7 @@ schema_definition* populate_schema() {
IfcIonConcentrationMeasure_type = new type_declaration(IfcSchema::Type::IfcIonConcentrationMeasure, new simple_type(simple_type::real_type)); IfcIonConcentrationMeasure_type = new type_declaration(IfcSchema::Type::IfcIonConcentrationMeasure, new simple_type(simple_type::real_type));
IfcIsothermalMoistureCapacityMeasure_type = new type_declaration(IfcSchema::Type::IfcIsothermalMoistureCapacityMeasure, new simple_type(simple_type::real_type)); IfcIsothermalMoistureCapacityMeasure_type = new type_declaration(IfcSchema::Type::IfcIsothermalMoistureCapacityMeasure, new simple_type(simple_type::real_type));
IfcKinematicViscosityMeasure_type = new type_declaration(IfcSchema::Type::IfcKinematicViscosityMeasure, new simple_type(simple_type::real_type)); IfcKinematicViscosityMeasure_type = new type_declaration(IfcSchema::Type::IfcKinematicViscosityMeasure, new simple_type(simple_type::real_type));
IfcLabel_type = new type_declaration(IfcSchema::Type::IfcLabel, None); IfcLabel_type = new type_declaration(IfcSchema::Type::IfcLabel, new simple_type(simple_type::string_type));
IfcLanguageId_type = new type_declaration(IfcSchema::Type::IfcLanguageId, new named_type(IfcIdentifier_type)); IfcLanguageId_type = new type_declaration(IfcSchema::Type::IfcLanguageId, new named_type(IfcIdentifier_type));
IfcLengthMeasure_type = new type_declaration(IfcSchema::Type::IfcLengthMeasure, new simple_type(simple_type::real_type)); IfcLengthMeasure_type = new type_declaration(IfcSchema::Type::IfcLengthMeasure, new simple_type(simple_type::real_type));
IfcLineIndex_type = new type_declaration(IfcSchema::Type::IfcLineIndex, new aggregation_type(aggregation_type::list_type, 2, -1, new named_type(IfcPositiveInteger_type))); IfcLineIndex_type = new type_declaration(IfcSchema::Type::IfcLineIndex, new aggregation_type(aggregation_type::list_type, 2, -1, new named_type(IfcPositiveInteger_type)));
@@ -1279,7 +1284,7 @@ schema_definition* populate_schema() {
IfcPositiveLengthMeasure_type = new type_declaration(IfcSchema::Type::IfcPositiveLengthMeasure, new named_type(IfcLengthMeasure_type)); IfcPositiveLengthMeasure_type = new type_declaration(IfcSchema::Type::IfcPositiveLengthMeasure, new named_type(IfcLengthMeasure_type));
IfcPositivePlaneAngleMeasure_type = new type_declaration(IfcSchema::Type::IfcPositivePlaneAngleMeasure, new named_type(IfcPlaneAngleMeasure_type)); IfcPositivePlaneAngleMeasure_type = new type_declaration(IfcSchema::Type::IfcPositivePlaneAngleMeasure, new named_type(IfcPlaneAngleMeasure_type));
IfcPowerMeasure_type = new type_declaration(IfcSchema::Type::IfcPowerMeasure, new simple_type(simple_type::real_type)); IfcPowerMeasure_type = new type_declaration(IfcSchema::Type::IfcPowerMeasure, new simple_type(simple_type::real_type));
IfcPresentableText_type = new type_declaration(IfcSchema::Type::IfcPresentableText, None); IfcPresentableText_type = new type_declaration(IfcSchema::Type::IfcPresentableText, new simple_type(simple_type::string_type));
IfcPressureMeasure_type = new type_declaration(IfcSchema::Type::IfcPressureMeasure, new simple_type(simple_type::real_type)); IfcPressureMeasure_type = new type_declaration(IfcSchema::Type::IfcPressureMeasure, new simple_type(simple_type::real_type));
IfcPropertySetDefinitionSet_type = new type_declaration(IfcSchema::Type::IfcPropertySetDefinitionSet, new aggregation_type(aggregation_type::set_type, 1, -1, new named_type(IfcPropertySetDefinition_type))); IfcPropertySetDefinitionSet_type = new type_declaration(IfcSchema::Type::IfcPropertySetDefinitionSet, new aggregation_type(aggregation_type::set_type, 1, -1, new named_type(IfcPropertySetDefinition_type)));
IfcRadioActivityMeasure_type = new type_declaration(IfcSchema::Type::IfcRadioActivityMeasure, new simple_type(simple_type::real_type)); IfcRadioActivityMeasure_type = new type_declaration(IfcSchema::Type::IfcRadioActivityMeasure, new simple_type(simple_type::real_type));
@@ -1302,22 +1307,22 @@ schema_definition* populate_schema() {
IfcStrippedOptional_type = new type_declaration(IfcSchema::Type::IfcStrippedOptional, new simple_type(simple_type::boolean_type)); IfcStrippedOptional_type = new type_declaration(IfcSchema::Type::IfcStrippedOptional, new simple_type(simple_type::boolean_type));
IfcTemperatureGradientMeasure_type = new type_declaration(IfcSchema::Type::IfcTemperatureGradientMeasure, new simple_type(simple_type::real_type)); IfcTemperatureGradientMeasure_type = new type_declaration(IfcSchema::Type::IfcTemperatureGradientMeasure, new simple_type(simple_type::real_type));
IfcTemperatureRateOfChangeMeasure_type = new type_declaration(IfcSchema::Type::IfcTemperatureRateOfChangeMeasure, new simple_type(simple_type::real_type)); IfcTemperatureRateOfChangeMeasure_type = new type_declaration(IfcSchema::Type::IfcTemperatureRateOfChangeMeasure, new simple_type(simple_type::real_type));
IfcText_type = new type_declaration(IfcSchema::Type::IfcText, None); IfcText_type = new type_declaration(IfcSchema::Type::IfcText, new simple_type(simple_type::string_type));
IfcTextAlignment_type = new type_declaration(IfcSchema::Type::IfcTextAlignment, None); IfcTextAlignment_type = new type_declaration(IfcSchema::Type::IfcTextAlignment, new simple_type(simple_type::string_type));
IfcTextDecoration_type = new type_declaration(IfcSchema::Type::IfcTextDecoration, None); IfcTextDecoration_type = new type_declaration(IfcSchema::Type::IfcTextDecoration, new simple_type(simple_type::string_type));
IfcTextFontName_type = new type_declaration(IfcSchema::Type::IfcTextFontName, None); IfcTextFontName_type = new type_declaration(IfcSchema::Type::IfcTextFontName, new simple_type(simple_type::string_type));
IfcTextTransformation_type = new type_declaration(IfcSchema::Type::IfcTextTransformation, None); IfcTextTransformation_type = new type_declaration(IfcSchema::Type::IfcTextTransformation, new simple_type(simple_type::string_type));
IfcThermalAdmittanceMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalAdmittanceMeasure, new simple_type(simple_type::real_type)); IfcThermalAdmittanceMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalAdmittanceMeasure, new simple_type(simple_type::real_type));
IfcThermalConductivityMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalConductivityMeasure, new simple_type(simple_type::real_type)); IfcThermalConductivityMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalConductivityMeasure, new simple_type(simple_type::real_type));
IfcThermalExpansionCoefficientMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalExpansionCoefficientMeasure, new simple_type(simple_type::real_type)); IfcThermalExpansionCoefficientMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalExpansionCoefficientMeasure, new simple_type(simple_type::real_type));
IfcThermalResistanceMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalResistanceMeasure, new simple_type(simple_type::real_type)); IfcThermalResistanceMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalResistanceMeasure, new simple_type(simple_type::real_type));
IfcThermalTransmittanceMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalTransmittanceMeasure, new simple_type(simple_type::real_type)); IfcThermalTransmittanceMeasure_type = new type_declaration(IfcSchema::Type::IfcThermalTransmittanceMeasure, new simple_type(simple_type::real_type));
IfcThermodynamicTemperatureMeasure_type = new type_declaration(IfcSchema::Type::IfcThermodynamicTemperatureMeasure, new simple_type(simple_type::real_type)); IfcThermodynamicTemperatureMeasure_type = new type_declaration(IfcSchema::Type::IfcThermodynamicTemperatureMeasure, new simple_type(simple_type::real_type));
IfcTime_type = new type_declaration(IfcSchema::Type::IfcTime, None); IfcTime_type = new type_declaration(IfcSchema::Type::IfcTime, new simple_type(simple_type::string_type));
IfcTimeMeasure_type = new type_declaration(IfcSchema::Type::IfcTimeMeasure, new simple_type(simple_type::real_type)); IfcTimeMeasure_type = new type_declaration(IfcSchema::Type::IfcTimeMeasure, new simple_type(simple_type::real_type));
IfcTimeStamp_type = new type_declaration(IfcSchema::Type::IfcTimeStamp, new simple_type(simple_type::integer_type)); IfcTimeStamp_type = new type_declaration(IfcSchema::Type::IfcTimeStamp, new simple_type(simple_type::integer_type));
IfcTorqueMeasure_type = new type_declaration(IfcSchema::Type::IfcTorqueMeasure, new simple_type(simple_type::real_type)); IfcTorqueMeasure_type = new type_declaration(IfcSchema::Type::IfcTorqueMeasure, new simple_type(simple_type::real_type));
IfcURIReference_type = new type_declaration(IfcSchema::Type::IfcURIReference, None); IfcURIReference_type = new type_declaration(IfcSchema::Type::IfcURIReference, new simple_type(simple_type::string_type));
IfcVaporPermeabilityMeasure_type = new type_declaration(IfcSchema::Type::IfcVaporPermeabilityMeasure, new simple_type(simple_type::real_type)); IfcVaporPermeabilityMeasure_type = new type_declaration(IfcSchema::Type::IfcVaporPermeabilityMeasure, new simple_type(simple_type::real_type));
IfcVolumeMeasure_type = new type_declaration(IfcSchema::Type::IfcVolumeMeasure, new simple_type(simple_type::real_type)); IfcVolumeMeasure_type = new type_declaration(IfcSchema::Type::IfcVolumeMeasure, new simple_type(simple_type::real_type));
IfcVolumetricFlowRateMeasure_type = new type_declaration(IfcSchema::Type::IfcVolumetricFlowRateMeasure, new simple_type(simple_type::real_type)); IfcVolumetricFlowRateMeasure_type = new type_declaration(IfcSchema::Type::IfcVolumetricFlowRateMeasure, new simple_type(simple_type::real_type));
@@ -12310,6 +12315,11 @@ schema_definition* populate_schema() {
return new schema_definition("IFC4", declarations, true); return new schema_definition("IFC4", declarations, true);
} }
#ifdef _MSC_VER
#pragma optimize("", on)
#endif
const schema_definition& get_schema() { const schema_definition& get_schema() {
static const schema_definition* s = populate_schema(); static const schema_definition* s = populate_schema();
+1377 -1377
View File
File diff suppressed because one or more lines are too long
+9 -14
View File
@@ -29,29 +29,24 @@
#endif #endif
#include "../ifcparse/IfcEntityInstanceData.h" #include "../ifcparse/IfcEntityInstanceData.h"
#include "../ifcparse/IfcSchema.h"
class Argument; class Argument;
namespace IfcParse { // these have to be declared first in order for the virtual function below to be covariant. separate into different header file
class declaration;
class entity;
class type_declaration;
}
namespace IfcUtil { namespace IfcUtil {
class IFC_PARSE_API IfcBaseClass { class IFC_PARSE_API IfcBaseClass {
protected: protected:
IfcAbstractEntity* data_; IfcEntityInstanceData* data_;
public: public:
IfcBaseClass() : data_(0) {} IfcBaseClass() : data_(0) {}
IfcBaseClass(IfcAbstractEntity* d) : data_(d) {} IfcBaseClass(IfcEntityInstanceData* d) : data_(d) {}
virtual ~IfcBaseClass() {} virtual ~IfcBaseClass() {}
const IfcAbstractEntity& data() const { return *data_; } const IfcEntityInstanceData& data() const { return *data_; }
IfcAbstractEntity& data() { return *data_; } IfcEntityInstanceData& data() { return *data_; }
void data(IfcAbstractEntity* d); void data(IfcEntityInstanceData* d);
virtual const IfcParse::declaration& declaration() const = 0; virtual const IfcParse::declaration& declaration() const = 0;
@@ -73,16 +68,16 @@ namespace IfcUtil {
class IFC_PARSE_API IfcBaseEntity : public IfcBaseClass { class IFC_PARSE_API IfcBaseEntity : public IfcBaseClass {
public: public:
IfcBaseEntity() : IfcBaseClass() {} IfcBaseEntity() : IfcBaseClass() {}
IfcBaseEntity(IfcAbstractEntity* d) : IfcBaseClass(d) {} IfcBaseEntity(IfcEntityInstanceData* d) : IfcBaseClass(d) {}
virtual const IfcParse::entity& declaration() const = 0; virtual const IfcParse::entity& declaration() const = 0;
}; };
// TODO: Investigate whether these should be template classes instead // TODO: Investigate whether these should be template classes instead
class IFC_PARSE_API IfcBaseType : public IfcBaseEntity { class IFC_PARSE_API IfcBaseType : public IfcBaseClass {
public: public:
IfcBaseType() : IfcBaseClass() {} IfcBaseType() : IfcBaseClass() {}
IfcBaseType(IfcAbstractEntity* d) : IfcBaseClass(d) {} IfcBaseType(IfcEntityInstanceData* d) : IfcBaseClass(d) {}
virtual const IfcParse::type_declaration& declaration() const = 0; virtual const IfcParse::type_declaration& declaration() const = 0;
}; };
+1 -1
View File
@@ -45,7 +45,7 @@ public:
typename U::list::ptr as() { typename U::list::ptr as() {
typename U::list::ptr r(new typename U::list); typename U::list::ptr r(new typename U::list);
const bool all = U::Class() == IfcSchema::Type::UNDEFINED; const bool all = U::Class() == IfcSchema::Type::UNDEFINED;
for (it i = begin(); i != end(); ++i) if (all || (*i)->is(U::Class())) r->push((U*)*i); for (it i = begin(); i != end(); ++i) if (all || (*i)->declaration().is(U::Class())) r->push((U*)*i);
return r; return r;
} }
void remove(IfcUtil::IfcBaseClass*); void remove(IfcUtil::IfcBaseClass*);
+1 -1
View File
@@ -64,7 +64,6 @@ public:
private: private:
typedef std::map<IfcUtil::IfcBaseClass*, IfcUtil::IfcBaseClass*> entity_entity_map_t; typedef std::map<IfcUtil::IfcBaseClass*, IfcUtil::IfcBaseClass*> entity_entity_map_t;
bool parsing_complete_;
const schema_definition* schema_; const schema_definition* schema_;
entity_by_id_t byid; entity_by_id_t byid;
@@ -171,6 +170,7 @@ public:
void register_inverse(unsigned, Token); void register_inverse(unsigned, Token);
void register_inverse(unsigned, IfcUtil::IfcBaseClass*); void register_inverse(unsigned, IfcUtil::IfcBaseClass*);
void unregister_inverse(unsigned, IfcUtil::IfcBaseClass*); void unregister_inverse(unsigned, IfcUtil::IfcBaseClass*);
const schema_definition* schema() const { return schema_; } const schema_definition* schema() const { return schema_; }
}; };