mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 17:57:02 +00:00
Fix a bunch of msvc warnings regarding empty switch statements in the reflection methods
This commit is contained in:
@@ -259,22 +259,24 @@ class ArgumentList:
|
|||||||
s += "\n virtual unsigned int getArgumentCount() const { return %(n_arguments)d; }" % dict(class_name=self.class_name, n_arguments=len(self.l) + argument_start(self.class_name))
|
s += "\n virtual unsigned int getArgumentCount() const { return %(n_arguments)d; }" % dict(class_name=self.class_name, n_arguments=len(self.l) + argument_start(self.class_name))
|
||||||
|
|
||||||
s += "\n virtual ArgumentType getArgumentType(unsigned int i) const {"
|
s += "\n virtual ArgumentType getArgumentType(unsigned int i) const {"
|
||||||
s += " switch (i) {"
|
if len(self.l):
|
||||||
for i, a in enumerate(self.l):
|
s += " switch (i) {"
|
||||||
s += "case %d: " % (i + argument_start(self.class_name))
|
for i, a in enumerate(self.l):
|
||||||
s += "return %s; " % a.type.type_enum()
|
s += "case %d: " % (i + argument_start(self.class_name))
|
||||||
s += "}"
|
s += "return %s; " % a.type.type_enum()
|
||||||
|
s += "}"
|
||||||
if self.parent_class is not None:
|
if self.parent_class is not None:
|
||||||
s += " return %s::getArgumentType(i); }" % self.parent_class
|
s += " return %s::getArgumentType(i); }" % self.parent_class
|
||||||
else:
|
else:
|
||||||
s += " throw IfcException(\"argument out of range\"); }"
|
s += " throw IfcException(\"argument out of range\"); }"
|
||||||
|
|
||||||
s += "\n virtual const char* getArgumentName(unsigned int i) const {"
|
s += "\n virtual const char* getArgumentName(unsigned int i) const {"
|
||||||
s += " switch (i) {"
|
if len(self.l):
|
||||||
for i, a in enumerate(self.l):
|
s += " switch (i) {"
|
||||||
s += "case %d: " % (i + argument_start(self.class_name))
|
for i, a in enumerate(self.l):
|
||||||
s += "return \"%s\"; " % a.name
|
s += "case %d: " % (i + argument_start(self.class_name))
|
||||||
s += "}"
|
s += "return \"%s\"; " % a.name
|
||||||
|
s += "}"
|
||||||
if self.parent_class is not None:
|
if self.parent_class is not None:
|
||||||
s += " return %s::getArgumentName(i); }" % self.parent_class
|
s += " return %s::getArgumentName(i); }" % self.parent_class
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* *
|
* *
|
||||||
* This file has been generated from /tmp/IFC2X3_FINAL.exp. Do not make modifications *
|
* This file has been generated from IFC2X3_TC1.exp. Do not make modifications *
|
||||||
* but instead modify the python script that has been used to generate this. *
|
* but instead modify the python script that has been used to generate this. *
|
||||||
* *
|
* *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
@@ -6283,11 +6283,11 @@ IfcElectricalElement::IfcElectricalElement(IfcAbstractEntityPtr e) { if (!is(Typ
|
|||||||
// Function implementations for IfcElement
|
// Function implementations for IfcElement
|
||||||
bool IfcElement::hasTag() { return !entity->getArgument(7)->isNull(); }
|
bool IfcElement::hasTag() { return !entity->getArgument(7)->isNull(); }
|
||||||
IfcIdentifier IfcElement::Tag() { return *entity->getArgument(7); }
|
IfcIdentifier IfcElement::Tag() { return *entity->getArgument(7); }
|
||||||
|
IfcRelConnectsStructuralElement::list IfcElement::HasStructuralMember() { RETURN_INVERSE(IfcRelConnectsStructuralElement) }
|
||||||
IfcRelFillsElement::list IfcElement::FillsVoids() { RETURN_INVERSE(IfcRelFillsElement) }
|
IfcRelFillsElement::list IfcElement::FillsVoids() { RETURN_INVERSE(IfcRelFillsElement) }
|
||||||
IfcRelConnectsElements::list IfcElement::ConnectedTo() { RETURN_INVERSE(IfcRelConnectsElements) }
|
IfcRelConnectsElements::list IfcElement::ConnectedTo() { RETURN_INVERSE(IfcRelConnectsElements) }
|
||||||
IfcRelCoversBldgElements::list IfcElement::HasCoverings() { RETURN_INVERSE(IfcRelCoversBldgElements) }
|
IfcRelCoversBldgElements::list IfcElement::HasCoverings() { RETURN_INVERSE(IfcRelCoversBldgElements) }
|
||||||
IfcRelProjectsElement::list IfcElement::HasProjections() { RETURN_INVERSE(IfcRelProjectsElement) }
|
IfcRelProjectsElement::list IfcElement::HasProjections() { RETURN_INVERSE(IfcRelProjectsElement) }
|
||||||
IfcRelConnectsStructuralElement::list IfcElement::HasStructuralMember() { RETURN_INVERSE(IfcRelConnectsStructuralElement) }
|
|
||||||
IfcRelReferencedInSpatialStructure::list IfcElement::ReferencedInStructures() { RETURN_INVERSE(IfcRelReferencedInSpatialStructure) }
|
IfcRelReferencedInSpatialStructure::list IfcElement::ReferencedInStructures() { RETURN_INVERSE(IfcRelReferencedInSpatialStructure) }
|
||||||
IfcRelConnectsPortToElement::list IfcElement::HasPorts() { RETURN_INVERSE(IfcRelConnectsPortToElement) }
|
IfcRelConnectsPortToElement::list IfcElement::HasPorts() { RETURN_INVERSE(IfcRelConnectsPortToElement) }
|
||||||
IfcRelVoidsElement::list IfcElement::HasOpenings() { RETURN_INVERSE(IfcRelVoidsElement) }
|
IfcRelVoidsElement::list IfcElement::HasOpenings() { RETURN_INVERSE(IfcRelVoidsElement) }
|
||||||
@@ -9071,7 +9071,7 @@ IfcLoadGroupTypeEnum::IfcLoadGroupTypeEnum IfcStructuralLoadGroup::PredefinedTyp
|
|||||||
IfcActionTypeEnum::IfcActionTypeEnum IfcStructuralLoadGroup::ActionType() { return IfcActionTypeEnum::FromString(*entity->getArgument(6)); }
|
IfcActionTypeEnum::IfcActionTypeEnum IfcStructuralLoadGroup::ActionType() { return IfcActionTypeEnum::FromString(*entity->getArgument(6)); }
|
||||||
IfcActionSourceTypeEnum::IfcActionSourceTypeEnum IfcStructuralLoadGroup::ActionSource() { return IfcActionSourceTypeEnum::FromString(*entity->getArgument(7)); }
|
IfcActionSourceTypeEnum::IfcActionSourceTypeEnum IfcStructuralLoadGroup::ActionSource() { return IfcActionSourceTypeEnum::FromString(*entity->getArgument(7)); }
|
||||||
bool IfcStructuralLoadGroup::hasCoefficient() { return !entity->getArgument(8)->isNull(); }
|
bool IfcStructuralLoadGroup::hasCoefficient() { return !entity->getArgument(8)->isNull(); }
|
||||||
IfcPositiveRatioMeasure IfcStructuralLoadGroup::Coefficient() { return *entity->getArgument(8); }
|
IfcRatioMeasure IfcStructuralLoadGroup::Coefficient() { return *entity->getArgument(8); }
|
||||||
bool IfcStructuralLoadGroup::hasPurpose() { return !entity->getArgument(9)->isNull(); }
|
bool IfcStructuralLoadGroup::hasPurpose() { return !entity->getArgument(9)->isNull(); }
|
||||||
IfcLabel IfcStructuralLoadGroup::Purpose() { return *entity->getArgument(9); }
|
IfcLabel IfcStructuralLoadGroup::Purpose() { return *entity->getArgument(9); }
|
||||||
IfcStructuralResultGroup::list IfcStructuralLoadGroup::SourceOfResultGroup() { RETURN_INVERSE(IfcStructuralResultGroup) }
|
IfcStructuralResultGroup::list IfcStructuralLoadGroup::SourceOfResultGroup() { RETURN_INVERSE(IfcStructuralResultGroup) }
|
||||||
|
|||||||
+315
-315
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* *
|
* *
|
||||||
* This file has been generated from /tmp/IFC2X3_FINAL.exp. Do not make modifications *
|
* This file has been generated from IFC2X3_TC1.exp. Do not make modifications *
|
||||||
* but instead modify the python script that has been used to generate this. *
|
* but instead modify the python script that has been used to generate this. *
|
||||||
* *
|
* *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|||||||
Reference in New Issue
Block a user