]> OCCT Git - occt.git/commitdiff
Coding - Remove static global variables #238
authordpasukhi <dpasukhi@opencascade.com>
Sat, 4 Jan 2025 21:39:32 +0000 (21:39 +0000)
committerdpasukhi <dpasukhi@opencascade.com>
Sat, 4 Jan 2025 23:45:07 +0000 (23:45 +0000)
Refactor IGES Protocols to eliminate redundant type registrations

src/IGESAppli/IGESAppli_Protocol.cxx
src/IGESBasic/IGESBasic_Protocol.cxx
src/IGESDefs/IGESDefs_Protocol.cxx
src/IGESDimen/IGESDimen_Protocol.cxx
src/IGESDraw/IGESDraw_Protocol.cxx
src/IGESGeom/IGESGeom_Protocol.cxx
src/IGESGraph/IGESGraph_Protocol.cxx
src/IGESSolid/IGESSolid_Protocol.cxx

index 243db1e596ea180ffa9ac6694cbbf0056d7e1f70..f0a1d4d508948e69bf7c03bb1f3b35430c2a79d8 100644 (file)
@@ -11,6 +11,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <IGESAppli_Protocol.hxx>
 
 #include <IGESAppli_DrilledHole.hxx>
 #include <IGESAppli_ElementResults.hxx>
 #include <IGESAppli_NodalDisplAndRot.hxx>
 #include <IGESAppli_NodalResults.hxx>
 #include <IGESAppli_Node.hxx>
+#include <IGESAppli_PWBArtworkStackup.hxx>
+#include <IGESAppli_PWBDrilledHole.hxx>
 #include <IGESAppli_PartNumber.hxx>
 #include <IGESAppli_PinNumber.hxx>
 #include <IGESAppli_PipingFlow.hxx>
-#include <IGESAppli_Protocol.hxx>
-#include <IGESAppli_PWBArtworkStackup.hxx>
-#include <IGESAppli_PWBDrilledHole.hxx>
 #include <IGESAppli_ReferenceDesignator.hxx>
 #include <IGESAppli_RegionRestriction.hxx>
 #include <IGESDefs.hxx>
 #include <Interface_Protocol.hxx>
 #include <Standard_Type.hxx>
 
-IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_Protocol,IGESData_Protocol)
-
-static int THE_IGESAppli_Protocol_deja = 0;
-
-static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
-  atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
-  atype16,atype17,atype18,atype19;
+IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_Protocol, IGESData_Protocol)
 
 IGESAppli_Protocol::IGESAppli_Protocol()
-{
-  if (THE_IGESAppli_Protocol_deja)
-  {
-    return;
-  }
+{}
 
-  THE_IGESAppli_Protocol_deja = 1;
-  atype01 = STANDARD_TYPE(IGESAppli_DrilledHole);
-  atype02 = STANDARD_TYPE(IGESAppli_ElementResults);
-  atype03 = STANDARD_TYPE(IGESAppli_FiniteElement);
-  atype04 = STANDARD_TYPE(IGESAppli_Flow);
-  atype05 = STANDARD_TYPE(IGESAppli_FlowLineSpec);
-  atype06 = STANDARD_TYPE(IGESAppli_LevelFunction);
-  atype07 = STANDARD_TYPE(IGESAppli_LevelToPWBLayerMap);
-  atype08 = STANDARD_TYPE(IGESAppli_LineWidening);
-  atype09 = STANDARD_TYPE(IGESAppli_NodalConstraint);
-  atype10 = STANDARD_TYPE(IGESAppli_NodalDisplAndRot);
-  atype11 = STANDARD_TYPE(IGESAppli_NodalResults);
-  atype12 = STANDARD_TYPE(IGESAppli_Node);
-  atype13 = STANDARD_TYPE(IGESAppli_PWBArtworkStackup);
-  atype14 = STANDARD_TYPE(IGESAppli_PWBDrilledHole);
-  atype15 = STANDARD_TYPE(IGESAppli_PartNumber);
-  atype16 = STANDARD_TYPE(IGESAppli_PinNumber);
-  atype17 = STANDARD_TYPE(IGESAppli_PipingFlow);
-  atype18 = STANDARD_TYPE(IGESAppli_ReferenceDesignator);
-  atype19 = STANDARD_TYPE(IGESAppli_RegionRestriction);
+Standard_Integer IGESAppli_Protocol::NbResources() const
+{
+  return 2;
 }
 
-    Standard_Integer IGESAppli_Protocol::NbResources () const
-      {  return 2;  }
-
-    Handle(Interface_Protocol) IGESAppli_Protocol::Resource
-  (const Standard_Integer num) const
+Handle(Interface_Protocol) IGESAppli_Protocol::Resource(const Standard_Integer num) const
 {
   Handle(Interface_Protocol) res;
-  if (num == 1) res = IGESDefs::Protocol();
-  if (num == 2) res = IGESDraw::Protocol();
+  if (num == 1)
+    res = IGESDefs::Protocol();
+  if (num == 2)
+    res = IGESDraw::Protocol();
   return res;
 }
 
-    Standard_Integer IGESAppli_Protocol::TypeNumber
-  (const Handle(Standard_Type)& atype) const
+Standard_Integer IGESAppli_Protocol::TypeNumber(const Handle(Standard_Type)& atype) const
 {
-  if      (atype == atype01) return  1;
-  else if (atype == atype02) return  2;
-  else if (atype == atype03) return  3;
-  else if (atype == atype04) return  4;
-  else if (atype == atype05) return  5;
-  else if (atype == atype06) return  6;
-  else if (atype == atype07) return  7;
-  else if (atype == atype08) return  8;
-  else if (atype == atype09) return  9;
-  else if (atype == atype10) return 10;
-  else if (atype == atype11) return 11;
-  else if (atype == atype12) return 12;
-  else if (atype == atype13) return 13;
-  else if (atype == atype14) return 14;
-  else if (atype == atype15) return 15;
-  else if (atype == atype16) return 16;
-  else if (atype == atype17) return 17;
-  else if (atype == atype18) return 18;
-  else if (atype == atype19) return 19;
+  if (atype == STANDARD_TYPE(IGESAppli_DrilledHole))
+    return 1;
+  else if (atype == STANDARD_TYPE(IGESAppli_ElementResults))
+    return 2;
+  else if (atype == STANDARD_TYPE(IGESAppli_FiniteElement))
+    return 3;
+  else if (atype == STANDARD_TYPE(IGESAppli_Flow))
+    return 4;
+  else if (atype == STANDARD_TYPE(IGESAppli_FlowLineSpec))
+    return 5;
+  else if (atype == STANDARD_TYPE(IGESAppli_LevelFunction))
+    return 6;
+  else if (atype == STANDARD_TYPE(IGESAppli_LevelToPWBLayerMap))
+    return 7;
+  else if (atype == STANDARD_TYPE(IGESAppli_LineWidening))
+    return 8;
+  else if (atype == STANDARD_TYPE(IGESAppli_NodalConstraint))
+    return 9;
+  else if (atype == STANDARD_TYPE(IGESAppli_NodalDisplAndRot))
+    return 10;
+  else if (atype == STANDARD_TYPE(IGESAppli_NodalResults))
+    return 11;
+  else if (atype == STANDARD_TYPE(IGESAppli_Node))
+    return 12;
+  else if (atype == STANDARD_TYPE(IGESAppli_PWBArtworkStackup))
+    return 13;
+  else if (atype == STANDARD_TYPE(IGESAppli_PWBDrilledHole))
+    return 14;
+  else if (atype == STANDARD_TYPE(IGESAppli_PartNumber))
+    return 15;
+  else if (atype == STANDARD_TYPE(IGESAppli_PinNumber))
+    return 16;
+  else if (atype == STANDARD_TYPE(IGESAppli_PipingFlow))
+    return 17;
+  else if (atype == STANDARD_TYPE(IGESAppli_ReferenceDesignator))
+    return 18;
+  else if (atype == STANDARD_TYPE(IGESAppli_RegionRestriction))
+    return 19;
   return 0;
 }
index 2f30ee3bf4f3b3a184151ade81e3f36b6756f2c4..9a966c39d615f41fd4c6e70253b606febc81262e 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <IGESBasic_Protocol.hxx>
 
 #include <IGESBasic_AssocGroupType.hxx>
-#include <IGESBasic_ExternalReferenceFile.hxx>
 #include <IGESBasic_ExternalRefFile.hxx>
 #include <IGESBasic_ExternalRefFileIndex.hxx>
 #include <IGESBasic_ExternalRefFileName.hxx>
 #include <IGESBasic_ExternalRefLibName.hxx>
 #include <IGESBasic_ExternalRefName.hxx>
+#include <IGESBasic_ExternalReferenceFile.hxx>
 #include <IGESBasic_GroupWithoutBackP.hxx>
 #include <IGESBasic_Hierarchy.hxx>
 #include <IGESBasic_Name.hxx>
 #include <IGESBasic_OrderedGroup.hxx>
 #include <IGESBasic_OrderedGroupWithoutBackP.hxx>
-#include <IGESBasic_Protocol.hxx>
 #include <IGESBasic_SingleParent.hxx>
 #include <IGESBasic_SingularSubfigure.hxx>
 #include <IGESBasic_SubfigureDef.hxx>
 #include <Interface_Protocol.hxx>
 #include <Standard_Type.hxx>
 
-IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_Protocol,IGESData_Protocol)
-
-static int THE_IGESBasic_Protocol_deja = 0;
-
-static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
-  atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,atype16;
+IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_Protocol, IGESData_Protocol)
 
 IGESBasic_Protocol::IGESBasic_Protocol()
-{
-  if (THE_IGESBasic_Protocol_deja)
-  {
-    return;
-  }
+{}
 
-  THE_IGESBasic_Protocol_deja = 1;
-  atype01 = STANDARD_TYPE(IGESBasic_AssocGroupType);
-  atype02 = STANDARD_TYPE(IGESBasic_ExternalRefFile);
-  atype03 = STANDARD_TYPE(IGESBasic_ExternalRefFileIndex);
-  atype04 = STANDARD_TYPE(IGESBasic_ExternalRefFileName);
-  atype05 = STANDARD_TYPE(IGESBasic_ExternalRefLibName);
-  atype06 = STANDARD_TYPE(IGESBasic_ExternalRefName);
-  atype07 = STANDARD_TYPE(IGESBasic_ExternalReferenceFile);
-  atype08 = STANDARD_TYPE(IGESBasic_Group);
-  atype09 = STANDARD_TYPE(IGESBasic_GroupWithoutBackP);
-  atype10 = STANDARD_TYPE(IGESBasic_Hierarchy);
-  atype11 = STANDARD_TYPE(IGESBasic_Name);
-  atype12 = STANDARD_TYPE(IGESBasic_OrderedGroup);
-  atype13 = STANDARD_TYPE(IGESBasic_OrderedGroupWithoutBackP);
-  atype14 = STANDARD_TYPE(IGESBasic_SingleParent);
-  atype15 = STANDARD_TYPE(IGESBasic_SingularSubfigure);
-  atype16 = STANDARD_TYPE(IGESBasic_SubfigureDef);
+Standard_Integer IGESBasic_Protocol::NbResources() const
+{
+  return 1;
 }
 
-    Standard_Integer IGESBasic_Protocol::NbResources () const
-      {  return 1;  }
-
-    Handle(Interface_Protocol) IGESBasic_Protocol::Resource
-  (const Standard_Integer /*num*/) const
+Handle(Interface_Protocol) IGESBasic_Protocol::Resource(const Standard_Integer /*num*/) const
 {
   Handle(Interface_Protocol) res = IGESData::Protocol();
   return res;
 }
 
-    Standard_Integer IGESBasic_Protocol::TypeNumber
-  (const Handle(Standard_Type)& atype) const
+Standard_Integer IGESBasic_Protocol::TypeNumber(const Handle(Standard_Type)& atype) const
 {
-  if      (atype == atype01) return  1;
-  else if (atype == atype02) return  2;
-  else if (atype == atype03) return  3;
-  else if (atype == atype04) return  4;
-  else if (atype == atype05) return  5;
-  else if (atype == atype06) return  6;
-  else if (atype == atype07) return  7;
-  else if (atype == atype08) return  8;
-  else if (atype == atype09) return  9;
-  else if (atype == atype10) return 10;
-  else if (atype == atype11) return 11;
-  else if (atype == atype12) return 12;
-  else if (atype == atype13) return 13;
-  else if (atype == atype14) return 14;
-  else if (atype == atype15) return 15;
-  else if (atype == atype16) return 16;
+  if (atype == STANDARD_TYPE(IGESBasic_AssocGroupType))
+    return 1;
+  else if (atype == STANDARD_TYPE(IGESBasic_ExternalRefFile))
+    return 2;
+  else if (atype == STANDARD_TYPE(IGESBasic_ExternalRefFileIndex))
+    return 3;
+  else if (atype == STANDARD_TYPE(IGESBasic_ExternalRefFileName))
+    return 4;
+  else if (atype == STANDARD_TYPE(IGESBasic_ExternalRefLibName))
+    return 5;
+  else if (atype == STANDARD_TYPE(IGESBasic_ExternalRefName))
+    return 6;
+  else if (atype == STANDARD_TYPE(IGESBasic_ExternalReferenceFile))
+    return 7;
+  else if (atype == STANDARD_TYPE(IGESBasic_Group))
+    return 8;
+  else if (atype == STANDARD_TYPE(IGESBasic_GroupWithoutBackP))
+    return 9;
+  else if (atype == STANDARD_TYPE(IGESBasic_Hierarchy))
+    return 10;
+  else if (atype == STANDARD_TYPE(IGESBasic_Name))
+    return 11;
+  else if (atype == STANDARD_TYPE(IGESBasic_OrderedGroup))
+    return 12;
+  else if (atype == STANDARD_TYPE(IGESBasic_OrderedGroupWithoutBackP))
+    return 13;
+  else if (atype == STANDARD_TYPE(IGESBasic_SingleParent))
+    return 14;
+  else if (atype == STANDARD_TYPE(IGESBasic_SingularSubfigure))
+    return 15;
+  else if (atype == STANDARD_TYPE(IGESBasic_SubfigureDef))
+    return 16;
   return 0;
 }
index c96590a0e7aa0931d8dbada5f0661fdb07565c96..f40341660bfddb1c6cba16c13524816b88f4186c 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <IGESDefs_Protocol.hxx>
 
 #include <IGESDefs_AssociativityDef.hxx>
 #include <IGESDefs_AttributeDef.hxx>
 #include <IGESDefs_AttributeTable.hxx>
 #include <IGESDefs_GenericData.hxx>
 #include <IGESDefs_MacroDef.hxx>
-#include <IGESDefs_Protocol.hxx>
 #include <IGESDefs_TabularData.hxx>
 #include <IGESDefs_UnitsData.hxx>
 #include <IGESGraph.hxx>
 #include <Interface_Protocol.hxx>
 #include <Standard_Type.hxx>
 
-IMPLEMENT_STANDARD_RTTIEXT(IGESDefs_Protocol,IGESData_Protocol)
-
-static int THE_IGESDefs_Protocol_deja = 0;
-
-static Handle(Standard_Type) atype1,atype2,atype3,atype4,atype5,atype6,atype7;
+IMPLEMENT_STANDARD_RTTIEXT(IGESDefs_Protocol, IGESData_Protocol)
 
 IGESDefs_Protocol::IGESDefs_Protocol()
-{
-  if (THE_IGESDefs_Protocol_deja)
-  {
-    return;
-  }
+{}
 
-  THE_IGESDefs_Protocol_deja = 1;
-  atype1 = STANDARD_TYPE(IGESDefs_AssociativityDef);
-  atype2 = STANDARD_TYPE(IGESDefs_AttributeDef);
-  atype3 = STANDARD_TYPE(IGESDefs_AttributeTable);
-  atype4 = STANDARD_TYPE(IGESDefs_GenericData);
-  atype5 = STANDARD_TYPE(IGESDefs_MacroDef);
-  atype6 = STANDARD_TYPE(IGESDefs_TabularData);
-  atype7 = STANDARD_TYPE(IGESDefs_UnitsData);
+Standard_Integer IGESDefs_Protocol::NbResources() const
+{
+  return 1;
 }
 
-    Standard_Integer IGESDefs_Protocol::NbResources () const
-      {  return 1;  }
-
-    Handle(Interface_Protocol) IGESDefs_Protocol::Resource
-  (const Standard_Integer /*num*/) const
+Handle(Interface_Protocol) IGESDefs_Protocol::Resource(const Standard_Integer /*num*/) const
 {
   Handle(Interface_Protocol) res = IGESGraph::Protocol();
   return res;
 }
 
-    Standard_Integer IGESDefs_Protocol::TypeNumber
-  (const Handle(Standard_Type)& atype) const
+Standard_Integer IGESDefs_Protocol::TypeNumber(const Handle(Standard_Type)& atype) const
 {
-  if      (atype == atype1) return 1;
-  else if (atype == atype2) return 2;
-  else if (atype == atype3) return 3;
-  else if (atype == atype4) return 4;
-  else if (atype == atype5) return 5;
-  else if (atype == atype6) return 6;
-  else if (atype == atype7) return 7;
+  if (atype == STANDARD_TYPE(IGESDefs_AssociativityDef))
+    return 1;
+  else if (atype == STANDARD_TYPE(IGESDefs_AttributeDef))
+    return 2;
+  else if (atype == STANDARD_TYPE(IGESDefs_AttributeTable))
+    return 3;
+  else if (atype == STANDARD_TYPE(IGESDefs_GenericData))
+    return 4;
+  else if (atype == STANDARD_TYPE(IGESDefs_MacroDef))
+    return 5;
+  else if (atype == STANDARD_TYPE(IGESDefs_TabularData))
+    return 6;
+  else if (atype == STANDARD_TYPE(IGESDefs_UnitsData))
+    return 7;
   return 0;
 }
index f00ec90b8603ad85d8a0377847730031e054582e..28de3f79198f6b1622132ff98aa93c1e0e1683bc 100644 (file)
@@ -11,6 +11,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <IGESDimen_Protocol.hxx>
 
 #include <IGESDimen_AngularDimension.hxx>
 #include <IGESDimen_BasicDimension.hxx>
@@ -18,9 +19,9 @@
 #include <IGESDimen_CurveDimension.hxx>
 #include <IGESDimen_DiameterDimension.hxx>
 #include <IGESDimen_DimensionDisplayData.hxx>
-#include <IGESDimen_DimensionedGeometry.hxx>
 #include <IGESDimen_DimensionTolerance.hxx>
 #include <IGESDimen_DimensionUnits.hxx>
+#include <IGESDimen_DimensionedGeometry.hxx>
 #include <IGESDimen_FlagNote.hxx>
 #include <IGESDimen_GeneralLabel.hxx>
 #include <IGESDimen_GeneralNote.hxx>
@@ -31,7 +32,6 @@
 #include <IGESDimen_NewGeneralNote.hxx>
 #include <IGESDimen_OrdinateDimension.hxx>
 #include <IGESDimen_PointDimension.hxx>
-#include <IGESDimen_Protocol.hxx>
 #include <IGESDimen_RadiusDimension.hxx>
 #include <IGESDimen_Section.hxx>
 #include <IGESDimen_SectionedArea.hxx>
 #include <Interface_Protocol.hxx>
 #include <Standard_Type.hxx>
 
-IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_Protocol,IGESData_Protocol)
-
-static int THE_IGESDimen_Protocol_deja = 0;
-
-static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
-  atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
-  atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23;
+IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_Protocol, IGESData_Protocol)
 
 IGESDimen_Protocol::IGESDimen_Protocol()
-{
-  if (THE_IGESDimen_Protocol_deja)
-  {
-    return;
-  }
+{}
 
-  THE_IGESDimen_Protocol_deja = 1;
-  atype01 = STANDARD_TYPE(IGESDimen_AngularDimension);
-  atype02 = STANDARD_TYPE(IGESDimen_BasicDimension);
-  atype03 = STANDARD_TYPE(IGESDimen_CenterLine);
-  atype04 = STANDARD_TYPE(IGESDimen_CurveDimension);
-  atype05 = STANDARD_TYPE(IGESDimen_DiameterDimension);
-  atype06 = STANDARD_TYPE(IGESDimen_DimensionDisplayData);
-  atype07 = STANDARD_TYPE(IGESDimen_DimensionTolerance);
-  atype08 = STANDARD_TYPE(IGESDimen_DimensionUnits);
-  atype09 = STANDARD_TYPE(IGESDimen_DimensionedGeometry);
-  atype10 = STANDARD_TYPE(IGESDimen_FlagNote);
-  atype11 = STANDARD_TYPE(IGESDimen_GeneralLabel);
-  atype12 = STANDARD_TYPE(IGESDimen_GeneralNote);
-  atype13 = STANDARD_TYPE(IGESDimen_GeneralSymbol);
-  atype14 = STANDARD_TYPE(IGESDimen_LeaderArrow);
-  atype15 = STANDARD_TYPE(IGESDimen_LinearDimension);
-  atype16 = STANDARD_TYPE(IGESDimen_NewDimensionedGeometry);
-  atype17 = STANDARD_TYPE(IGESDimen_NewGeneralNote);
-  atype18 = STANDARD_TYPE(IGESDimen_OrdinateDimension);
-  atype10 = STANDARD_TYPE(IGESDimen_PointDimension);
-  atype20 = STANDARD_TYPE(IGESDimen_RadiusDimension);
-  atype21 = STANDARD_TYPE(IGESDimen_Section);
-  atype22 = STANDARD_TYPE(IGESDimen_SectionedArea);
-  atype23 = STANDARD_TYPE(IGESDimen_WitnessLine);
+Standard_Integer IGESDimen_Protocol::NbResources() const
+{
+  return 2;
 }
 
-    Standard_Integer IGESDimen_Protocol::NbResources () const
-      {  return 2;  }
-
-    Handle(Interface_Protocol) IGESDimen_Protocol::Resource
-  (const Standard_Integer num) const
+Handle(Interface_Protocol) IGESDimen_Protocol::Resource(const Standard_Integer num) const
 {
   Handle(Interface_Protocol) res;
-  if (num == 1) res = IGESGraph::Protocol();
-  if (num == 2) res = IGESGeom::Protocol();
+  if (num == 1)
+    res = IGESGraph::Protocol();
+  if (num == 2)
+    res = IGESGeom::Protocol();
   return res;
 }
 
-    Standard_Integer IGESDimen_Protocol::TypeNumber
-  (const Handle(Standard_Type)& atype) const
+Standard_Integer IGESDimen_Protocol::TypeNumber(const Handle(Standard_Type)& atype) const
 {
-  if      (atype == atype01) return  1;
-  else if (atype == atype02) return  2;
-  else if (atype == atype03) return  3;
-  else if (atype == atype04) return  4;
-  else if (atype == atype05) return  5;
-  else if (atype == atype06) return  6;
-  else if (atype == atype07) return  7;
-  else if (atype == atype08) return  8;
-  else if (atype == atype09) return  9;
-  else if (atype == atype10) return 10;
-  else if (atype == atype11) return 11;
-  else if (atype == atype12) return 12;
-  else if (atype == atype13) return 13;
-  else if (atype == atype14) return 14;
-  else if (atype == atype15) return 15;
-  else if (atype == atype16) return 16;
-  else if (atype == atype17) return 17;
-  else if (atype == atype18) return 18;
-  else if (atype == atype19) return 19;
-  else if (atype == atype20) return 20;
-  else if (atype == atype21) return 21;
-  else if (atype == atype22) return 22;
-  else if (atype == atype23) return 23;
+  if (atype == STANDARD_TYPE(IGESDimen_AngularDimension))
+    return 1;
+  else if (atype == STANDARD_TYPE(IGESDimen_BasicDimension))
+    return 2;
+  else if (atype == STANDARD_TYPE(IGESDimen_CenterLine))
+    return 3;
+  else if (atype == STANDARD_TYPE(IGESDimen_CurveDimension))
+    return 4;
+  else if (atype == STANDARD_TYPE(IGESDimen_DiameterDimension))
+    return 5;
+  else if (atype == STANDARD_TYPE(IGESDimen_DimensionDisplayData))
+    return 6;
+  else if (atype == STANDARD_TYPE(IGESDimen_DimensionTolerance))
+    return 7;
+  else if (atype == STANDARD_TYPE(IGESDimen_DimensionUnits))
+    return 8;
+  else if (atype == STANDARD_TYPE(IGESDimen_DimensionedGeometry))
+    return 9;
+  else if (atype == STANDARD_TYPE(IGESDimen_FlagNote))
+    return 10;
+  else if (atype == STANDARD_TYPE(IGESDimen_GeneralLabel))
+    return 11;
+  else if (atype == STANDARD_TYPE(IGESDimen_GeneralNote))
+    return 12;
+  else if (atype == STANDARD_TYPE(IGESDimen_GeneralSymbol))
+    return 13;
+  else if (atype == STANDARD_TYPE(IGESDimen_LeaderArrow))
+    return 14;
+  else if (atype == STANDARD_TYPE(IGESDimen_LinearDimension))
+    return 15;
+  else if (atype == STANDARD_TYPE(IGESDimen_NewDimensionedGeometry))
+    return 16;
+  else if (atype == STANDARD_TYPE(IGESDimen_NewGeneralNote))
+    return 17;
+  else if (atype == STANDARD_TYPE(IGESDimen_OrdinateDimension))
+    return 18;
+  else if (atype == STANDARD_TYPE(IGESDimen_PointDimension))
+    return 19;
+  else if (atype == STANDARD_TYPE(IGESDimen_RadiusDimension))
+    return 20;
+  else if (atype == STANDARD_TYPE(IGESDimen_Section))
+    return 21;
+  else if (atype == STANDARD_TYPE(IGESDimen_SectionedArea))
+    return 22;
+  else if (atype == STANDARD_TYPE(IGESDimen_WitnessLine))
+    return 23;
   return 0;
 }
index 2e0bcacb12a5c9c017c3db7ba1f22d4c1d2f49ba..f32e11aedfe5f91625b6bdbfe739b616724a98b1 100644 (file)
@@ -11,6 +11,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <IGESDraw_Protocol.hxx>
 
 #include <IGESDimen.hxx>
 #include <IGESDimen_Protocol.hxx>
@@ -22,7 +23,6 @@
 #include <IGESDraw_NetworkSubfigureDef.hxx>
 #include <IGESDraw_PerspectiveView.hxx>
 #include <IGESDraw_Planar.hxx>
-#include <IGESDraw_Protocol.hxx>
 #include <IGESDraw_RectArraySubfigure.hxx>
 #include <IGESDraw_SegmentedViewsVisible.hxx>
 #include <IGESDraw_View.hxx>
 #include <Interface_Protocol.hxx>
 #include <Standard_Type.hxx>
 
-IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_Protocol,IGESData_Protocol)
-
-static int THE_IGESDraw_Protocol_deja = 0;
-static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
-  atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14;
+IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_Protocol, IGESData_Protocol)
 
 IGESDraw_Protocol::IGESDraw_Protocol()
-{
-  if (THE_IGESDraw_Protocol_deja)
-  {
-    return;
-  }
+{}
 
-  THE_IGESDraw_Protocol_deja = 1;
-  atype01 = STANDARD_TYPE(IGESDraw_CircArraySubfigure);
-  atype02 = STANDARD_TYPE(IGESDraw_ConnectPoint);
-  atype03 = STANDARD_TYPE(IGESDraw_Drawing);
-  atype04 = STANDARD_TYPE(IGESDraw_DrawingWithRotation);
-  atype05 = STANDARD_TYPE(IGESDraw_LabelDisplay);
-  atype06 = STANDARD_TYPE(IGESDraw_NetworkSubfigure);
-  atype07 = STANDARD_TYPE(IGESDraw_NetworkSubfigureDef);
-  atype08 = STANDARD_TYPE(IGESDraw_PerspectiveView);
-  atype09 = STANDARD_TYPE(IGESDraw_Planar);
-  atype10 = STANDARD_TYPE(IGESDraw_RectArraySubfigure);
-  atype11 = STANDARD_TYPE(IGESDraw_SegmentedViewsVisible);
-  atype12 = STANDARD_TYPE(IGESDraw_View);
-  atype13 = STANDARD_TYPE(IGESDraw_ViewsVisible);
-  atype14 = STANDARD_TYPE(IGESDraw_ViewsVisibleWithAttr);
+Standard_Integer IGESDraw_Protocol::NbResources() const
+{
+  return 1;
 }
 
-    Standard_Integer IGESDraw_Protocol::NbResources () const
-      {  return 1;  }
-
-    Handle(Interface_Protocol) IGESDraw_Protocol::Resource
-  (const Standard_Integer /*num*/) const
+Handle(Interface_Protocol) IGESDraw_Protocol::Resource(const Standard_Integer /*num*/) const
 {
   Handle(Interface_Protocol) res = IGESDimen::Protocol();
   return res;
 }
 
-    Standard_Integer IGESDraw_Protocol::TypeNumber
-  (const Handle(Standard_Type)& atype) const
+Standard_Integer IGESDraw_Protocol::TypeNumber(const Handle(Standard_Type)& atype) const
 {
-  if      (atype == atype01) return  1;
-  else if (atype == atype02) return  2;
-  else if (atype == atype03) return  3;
-  else if (atype == atype04) return  4;
-  else if (atype == atype05) return  5;
-  else if (atype == atype06) return  6;
-  else if (atype == atype07) return  7;
-  else if (atype == atype08) return  8;
-  else if (atype == atype09) return  9;
-  else if (atype == atype10) return 10;
-  else if (atype == atype11) return 11;
-  else if (atype == atype12) return 12;
-  else if (atype == atype13) return 13;
-  else if (atype == atype14) return 14;
+  if (atype == STANDARD_TYPE(IGESDraw_CircArraySubfigure))
+    return 1;
+  else if (atype == STANDARD_TYPE(IGESDraw_ConnectPoint))
+    return 2;
+  else if (atype == STANDARD_TYPE(IGESDraw_Drawing))
+    return 3;
+  else if (atype == STANDARD_TYPE(IGESDraw_DrawingWithRotation))
+    return 4;
+  else if (atype == STANDARD_TYPE(IGESDraw_LabelDisplay))
+    return 5;
+  else if (atype == STANDARD_TYPE(IGESDraw_NetworkSubfigure))
+    return 6;
+  else if (atype == STANDARD_TYPE(IGESDraw_NetworkSubfigureDef))
+    return 7;
+  else if (atype == STANDARD_TYPE(IGESDraw_PerspectiveView))
+    return 8;
+  else if (atype == STANDARD_TYPE(IGESDraw_Planar))
+    return 9;
+  else if (atype == STANDARD_TYPE(IGESDraw_RectArraySubfigure))
+    return 10;
+  else if (atype == STANDARD_TYPE(IGESDraw_SegmentedViewsVisible))
+    return 11;
+  else if (atype == STANDARD_TYPE(IGESDraw_View))
+    return 12;
+  else if (atype == STANDARD_TYPE(IGESDraw_ViewsVisible))
+    return 13;
+  else if (atype == STANDARD_TYPE(IGESDraw_ViewsVisibleWithAttr))
+    return 14;
   return 0;
 }
index 6d3dc4e5ca78c1cc25b14d0a1639d317f9a98be9..bf68173cb1dc70d2d306ebaccd4fb5a68835db43 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <IGESGeom_Protocol.hxx>
 
 #include <IGESBasic.hxx>
 #include <IGESBasic_Protocol.hxx>
-#include <IGESGeom_BoundedSurface.hxx>
 #include <IGESGeom_BSplineCurve.hxx>
 #include <IGESGeom_BSplineSurface.hxx>
+#include <IGESGeom_BoundedSurface.hxx>
 #include <IGESGeom_CircularArc.hxx>
 #include <IGESGeom_CompositeCurve.hxx>
 #include <IGESGeom_ConicArc.hxx>
@@ -28,7 +29,6 @@
 #include <IGESGeom_OffsetSurface.hxx>
 #include <IGESGeom_Plane.hxx>
 #include <IGESGeom_Point.hxx>
-#include <IGESGeom_Protocol.hxx>
 #include <IGESGeom_RuledSurface.hxx>
 #include <IGESGeom_SplineCurve.hxx>
 #include <IGESGeom_SplineSurface.hxx>
 #include <Interface_Protocol.hxx>
 #include <Standard_Type.hxx>
 
-IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_Protocol,IGESData_Protocol)
-
-static int THE_IGESGeom_Protocol_deja = 0;
-static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
-  atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
-  atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23;
+IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_Protocol, IGESData_Protocol)
 
 IGESGeom_Protocol::IGESGeom_Protocol()
+{}
+
+Standard_Integer IGESGeom_Protocol::NbResources() const
 {
-  if (THE_IGESGeom_Protocol_deja)
-  {
-    return;
-  }
-  THE_IGESGeom_Protocol_deja = 1;
-  atype01 = STANDARD_TYPE(IGESGeom_BSplineCurve);
-  atype02 = STANDARD_TYPE(IGESGeom_BSplineSurface);
-  atype03 = STANDARD_TYPE(IGESGeom_Boundary);
-  atype04 = STANDARD_TYPE(IGESGeom_BoundedSurface);
-  atype05 = STANDARD_TYPE(IGESGeom_CircularArc);
-  atype06 = STANDARD_TYPE(IGESGeom_CompositeCurve);
-  atype07 = STANDARD_TYPE(IGESGeom_ConicArc);
-  atype08 = STANDARD_TYPE(IGESGeom_CopiousData);
-  atype09 = STANDARD_TYPE(IGESGeom_CurveOnSurface);
-  atype10 = STANDARD_TYPE(IGESGeom_Direction);
-  atype11 = STANDARD_TYPE(IGESGeom_Flash);
-  atype12 = STANDARD_TYPE(IGESGeom_Line);
-  atype13 = STANDARD_TYPE(IGESGeom_OffsetCurve);
-  atype14 = STANDARD_TYPE(IGESGeom_OffsetSurface);
-  atype15 = STANDARD_TYPE(IGESGeom_Plane);
-  atype16 = STANDARD_TYPE(IGESGeom_Point);
-  atype17 = STANDARD_TYPE(IGESGeom_RuledSurface);
-  atype18 = STANDARD_TYPE(IGESGeom_SplineCurve);
-  atype19 = STANDARD_TYPE(IGESGeom_SplineSurface);
-  atype20 = STANDARD_TYPE(IGESGeom_SurfaceOfRevolution);
-  atype21 = STANDARD_TYPE(IGESGeom_TabulatedCylinder);
-  atype22 = STANDARD_TYPE(IGESGeom_TransformationMatrix);
-  atype23 = STANDARD_TYPE(IGESGeom_TrimmedSurface);
+  return 1;
 }
 
-    Standard_Integer IGESGeom_Protocol::NbResources () const
-      {  return 1;  }
-
-    Handle(Interface_Protocol) IGESGeom_Protocol::Resource
-  (const Standard_Integer /*num*/) const
+Handle(Interface_Protocol) IGESGeom_Protocol::Resource(const Standard_Integer /*num*/) const
 {
   Handle(Interface_Protocol) res = IGESBasic::Protocol();
   return res;
 }
 
-    Standard_Integer IGESGeom_Protocol::TypeNumber
-  (const Handle(Standard_Type)& atype) const
+Standard_Integer IGESGeom_Protocol::TypeNumber(const Handle(Standard_Type)& atype) const
 {
-  if      (atype == atype01) return  1;
-  else if (atype == atype02) return  2;
-  else if (atype == atype03) return  3;
-  else if (atype == atype04) return  4;
-  else if (atype == atype05) return  5;
-  else if (atype == atype06) return  6;
-  else if (atype == atype07) return  7;
-  else if (atype == atype08) return  8;
-  else if (atype == atype09) return  9;
-  else if (atype == atype10) return 10;
-  else if (atype == atype11) return 11;
-  else if (atype == atype12) return 12;
-  else if (atype == atype13) return 13;
-  else if (atype == atype14) return 14;
-  else if (atype == atype15) return 15;
-  else if (atype == atype16) return 16;
-  else if (atype == atype17) return 17;
-  else if (atype == atype18 ) return 18;
-  else if (atype == atype19) return 19;
-  else if (atype == atype20) return 20;
-  else if (atype == atype21) return 21;
-  else if (atype == atype22) return 22;
-  else if (atype == atype23) return 23;
+  if (atype == STANDARD_TYPE(IGESGeom_BSplineCurve))
+    return 1;
+  else if (atype == STANDARD_TYPE(IGESGeom_BSplineSurface))
+    return 2;
+  else if (atype == STANDARD_TYPE(IGESGeom_Boundary))
+    return 3;
+  else if (atype == STANDARD_TYPE(IGESGeom_BoundedSurface))
+    return 4;
+  else if (atype == STANDARD_TYPE(IGESGeom_CircularArc))
+    return 5;
+  else if (atype == STANDARD_TYPE(IGESGeom_CompositeCurve))
+    return 6;
+  else if (atype == STANDARD_TYPE(IGESGeom_ConicArc))
+    return 7;
+  else if (atype == STANDARD_TYPE(IGESGeom_CopiousData))
+    return 8;
+  else if (atype == STANDARD_TYPE(IGESGeom_CurveOnSurface))
+    return 9;
+  else if (atype == STANDARD_TYPE(IGESGeom_Direction))
+    return 10;
+  else if (atype == STANDARD_TYPE(IGESGeom_Flash))
+    return 11;
+  else if (atype == STANDARD_TYPE(IGESGeom_Line))
+    return 12;
+  else if (atype == STANDARD_TYPE(IGESGeom_OffsetCurve))
+    return 13;
+  else if (atype == STANDARD_TYPE(IGESGeom_OffsetSurface))
+    return 14;
+  else if (atype == STANDARD_TYPE(IGESGeom_Plane))
+    return 15;
+  else if (atype == STANDARD_TYPE(IGESGeom_Point))
+    return 16;
+  else if (atype == STANDARD_TYPE(IGESGeom_RuledSurface))
+    return 17;
+  else if (atype == STANDARD_TYPE(IGESGeom_SplineCurve))
+    return 18;
+  else if (atype == STANDARD_TYPE(IGESGeom_SplineSurface))
+    return 19;
+  else if (atype == STANDARD_TYPE(IGESGeom_SurfaceOfRevolution))
+    return 20;
+  else if (atype == STANDARD_TYPE(IGESGeom_TabulatedCylinder))
+    return 21;
+  else if (atype == STANDARD_TYPE(IGESGeom_TransformationMatrix))
+    return 22;
+  else if (atype == STANDARD_TYPE(IGESGeom_TrimmedSurface))
+    return 23;
   return 0;
 }
index 250a4a3b8769021b998df74bb4d81027d0699102..176aa35572457504480ee80de548e938a5d60a78 100644 (file)
@@ -11,6 +11,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <IGESGraph_Protocol.hxx>
 
 #include <IGESBasic.hxx>
 #include <IGESBasic_Protocol.hxx>
 #include <IGESGraph_LineFontPredefined.hxx>
 #include <IGESGraph_NominalSize.hxx>
 #include <IGESGraph_Pick.hxx>
-#include <IGESGraph_Protocol.hxx>
 #include <IGESGraph_TextDisplayTemplate.hxx>
 #include <IGESGraph_TextFontDef.hxx>
 #include <IGESGraph_UniformRectGrid.hxx>
 #include <Interface_Protocol.hxx>
 #include <Standard_Type.hxx>
 
-IMPLEMENT_STANDARD_RTTIEXT(IGESGraph_Protocol,IGESData_Protocol)
-
-static int THE_IGESGraph_Protocol_deja = 0;
-static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
-  atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14;
+IMPLEMENT_STANDARD_RTTIEXT(IGESGraph_Protocol, IGESData_Protocol)
 
 IGESGraph_Protocol::IGESGraph_Protocol()
+{}
+
+Standard_Integer IGESGraph_Protocol::NbResources() const
 {
-  if (THE_IGESGraph_Protocol_deja)
-  {
-    return;
-  }
-  THE_IGESGraph_Protocol_deja = 1;
-  atype01 = STANDARD_TYPE(IGESGraph_Color);
-  atype02 = STANDARD_TYPE(IGESGraph_DefinitionLevel);
-  atype03 = STANDARD_TYPE(IGESGraph_DrawingSize);
-  atype04 = STANDARD_TYPE(IGESGraph_DrawingUnits);
-  atype05 = STANDARD_TYPE(IGESGraph_HighLight);
-  atype06 = STANDARD_TYPE(IGESGraph_IntercharacterSpacing);
-  atype07 = STANDARD_TYPE(IGESGraph_LineFontDefPattern);
-  atype08 = STANDARD_TYPE(IGESGraph_LineFontPredefined);
-  atype09 = STANDARD_TYPE(IGESGraph_LineFontDefTemplate);
-  atype10 = STANDARD_TYPE(IGESGraph_NominalSize);
-  atype11 = STANDARD_TYPE(IGESGraph_Pick);
-  atype12 = STANDARD_TYPE(IGESGraph_TextDisplayTemplate);
-  atype13 = STANDARD_TYPE(IGESGraph_TextFontDef);
-  atype14 = STANDARD_TYPE(IGESGraph_UniformRectGrid);
+  return 1;
 }
 
-    Standard_Integer IGESGraph_Protocol::NbResources () const
-      {  return 1;  }
-
-    Handle(Interface_Protocol) IGESGraph_Protocol::Resource
-  (const Standard_Integer /*num*/) const
+Handle(Interface_Protocol) IGESGraph_Protocol::Resource(const Standard_Integer /*num*/) const
 {
   Handle(Interface_Protocol) res = IGESBasic::Protocol();
   return res;
 }
 
-    Standard_Integer IGESGraph_Protocol::TypeNumber
-  (const Handle(Standard_Type)& atype) const
+Standard_Integer IGESGraph_Protocol::TypeNumber(const Handle(Standard_Type)& atype) const
 {
-  if      (atype == atype01) return  1;
-  else if (atype == atype02) return  2;
-  else if (atype == atype03) return  3;
-  else if (atype == atype04) return  4;
-  else if (atype == atype05) return  5;
-  else if (atype == atype06) return  6;
-  else if (atype == atype07) return  7;
-  else if (atype == atype08) return  8;
-  else if (atype == atype09) return  9;
-  else if (atype == atype10) return 10;
-  else if (atype == atype11) return 11;
-  else if (atype == atype12) return 12;
-  else if (atype == atype13) return 13;
-  else if (atype == atype14) return 14;
+  if (atype == STANDARD_TYPE(IGESGraph_Color))
+    return 1;
+  else if (atype == STANDARD_TYPE(IGESGraph_DefinitionLevel))
+    return 2;
+  else if (atype == STANDARD_TYPE(IGESGraph_DrawingSize))
+    return 3;
+  else if (atype == STANDARD_TYPE(IGESGraph_DrawingUnits))
+    return 4;
+  else if (atype == STANDARD_TYPE(IGESGraph_HighLight))
+    return 5;
+  else if (atype == STANDARD_TYPE(IGESGraph_IntercharacterSpacing))
+    return 6;
+  else if (atype == STANDARD_TYPE(IGESGraph_LineFontDefPattern))
+    return 7;
+  else if (atype == STANDARD_TYPE(IGESGraph_LineFontPredefined))
+    return 8;
+  else if (atype == STANDARD_TYPE(IGESGraph_LineFontDefTemplate))
+    return 9;
+  else if (atype == STANDARD_TYPE(IGESGraph_NominalSize))
+    return 10;
+  else if (atype == STANDARD_TYPE(IGESGraph_Pick))
+    return 11;
+  else if (atype == STANDARD_TYPE(IGESGraph_TextDisplayTemplate))
+    return 12;
+  else if (atype == STANDARD_TYPE(IGESGraph_TextFontDef))
+    return 13;
+  else if (atype == STANDARD_TYPE(IGESGraph_UniformRectGrid))
+    return 14;
   return 0;
 }
index bff8bcc78bea90582f9a893078e9f302e8bd42f8..9f970e2ca3ae8a947d3aaea9ef4395661aeb5775 100644 (file)
@@ -11,6 +11,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <IGESSolid_Protocol.hxx>
 
 #include <IGESGeom.hxx>
 #include <IGESGeom_Protocol.hxx>
@@ -25,7 +26,6 @@
 #include <IGESSolid_Loop.hxx>
 #include <IGESSolid_ManifoldSolid.hxx>
 #include <IGESSolid_PlaneSurface.hxx>
-#include <IGESSolid_Protocol.hxx>
 #include <IGESSolid_RightAngularWedge.hxx>
 #include <IGESSolid_SelectedComponent.hxx>
 #include <IGESSolid_Shell.hxx>
 #include <Interface_Protocol.hxx>
 #include <Standard_Type.hxx>
 
-IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Protocol,IGESData_Protocol)
-
-static int THE_IGESSolid_Protocol_deja = 0;
-static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
-  atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
-  atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23,atype24;
+IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Protocol, IGESData_Protocol)
 
 IGESSolid_Protocol::IGESSolid_Protocol()
+{}
+
+Standard_Integer IGESSolid_Protocol::NbResources() const
 {
-  if (THE_IGESSolid_Protocol_deja)
-  {
-    return;
-  }
-  THE_IGESSolid_Protocol_deja = 1;
-  atype01 = STANDARD_TYPE(IGESSolid_Block);
-  atype02 = STANDARD_TYPE(IGESSolid_BooleanTree);
-  atype03 = STANDARD_TYPE(IGESSolid_ConeFrustum);
-  atype04 = STANDARD_TYPE(IGESSolid_ConicalSurface);
-  atype05 = STANDARD_TYPE(IGESSolid_Cylinder);
-  atype06 = STANDARD_TYPE(IGESSolid_CylindricalSurface);
-  atype07 = STANDARD_TYPE(IGESSolid_EdgeList);
-  atype08 = STANDARD_TYPE(IGESSolid_Ellipsoid);
-  atype09 = STANDARD_TYPE(IGESSolid_Face);
-  atype10 = STANDARD_TYPE(IGESSolid_Loop);
-  atype11 = STANDARD_TYPE(IGESSolid_ManifoldSolid);
-  atype12 = STANDARD_TYPE(IGESSolid_PlaneSurface);
-  atype13 = STANDARD_TYPE(IGESSolid_RightAngularWedge);
-  atype14 = STANDARD_TYPE(IGESSolid_SelectedComponent);
-  atype15 = STANDARD_TYPE(IGESSolid_Shell);
-  atype16 = STANDARD_TYPE(IGESSolid_SolidAssembly);
-  atype17 = STANDARD_TYPE(IGESSolid_SolidInstance);
-  atype18 = STANDARD_TYPE(IGESSolid_SolidOfLinearExtrusion);
-  atype19 = STANDARD_TYPE(IGESSolid_SolidOfRevolution);
-  atype20 = STANDARD_TYPE(IGESSolid_Sphere);
-  atype21 = STANDARD_TYPE(IGESSolid_SphericalSurface);
-  atype22 = STANDARD_TYPE(IGESSolid_ToroidalSurface);
-  atype23 = STANDARD_TYPE(IGESSolid_Torus);
-  atype24 = STANDARD_TYPE(IGESSolid_VertexList);
+  return 1;
 }
 
-    Standard_Integer IGESSolid_Protocol::NbResources () const
-      {  return 1;  }
-
-    Handle(Interface_Protocol) IGESSolid_Protocol::Resource
-  (const Standard_Integer /*num*/) const
+Handle(Interface_Protocol) IGESSolid_Protocol::Resource(const Standard_Integer /*num*/) const
 {
   Handle(Interface_Protocol) res = IGESGeom::Protocol();
   return res;
 }
 
-    Standard_Integer IGESSolid_Protocol::TypeNumber
-  (const Handle(Standard_Type)& atype) const
+Standard_Integer IGESSolid_Protocol::TypeNumber(const Handle(Standard_Type)& atype) const
 {
-  if      (atype == atype01) return  1;
-  else if (atype == atype02) return  2;
-  else if (atype == atype03) return  3;
-  else if (atype == atype04) return  4;
-  else if (atype == atype05) return  5;
-  else if (atype == atype06) return  6;
-  else if (atype == atype07) return  7;
-  else if (atype == atype08) return  8;
-  else if (atype == atype09) return  9;
-  else if (atype == atype10) return 10;
-  else if (atype == atype11) return 11;
-  else if (atype == atype12) return 12;
-  else if (atype == atype13) return 13;
-  else if (atype == atype14) return 14;
-  else if (atype == atype15) return 15;
-  else if (atype == atype16) return 16;
-  else if (atype == atype17) return 17;
-  else if (atype == atype18) return 18;
-  else if (atype == atype19) return 19;
-  else if (atype == atype20) return 20;
-  else if (atype == atype21) return 21;
-  else if (atype == atype22) return 22;
-  else if (atype == atype23) return 23;
-  else if (atype == atype24) return 24;
+  if (atype == STANDARD_TYPE(IGESSolid_Block))
+    return 1;
+  else if (atype == STANDARD_TYPE(IGESSolid_BooleanTree))
+    return 2;
+  else if (atype == STANDARD_TYPE(IGESSolid_ConeFrustum))
+    return 3;
+  else if (atype == STANDARD_TYPE(IGESSolid_ConicalSurface))
+    return 4;
+  else if (atype == STANDARD_TYPE(IGESSolid_Cylinder))
+    return 5;
+  else if (atype == STANDARD_TYPE(IGESSolid_CylindricalSurface))
+    return 6;
+  else if (atype == STANDARD_TYPE(IGESSolid_EdgeList))
+    return 7;
+  else if (atype == STANDARD_TYPE(IGESSolid_Ellipsoid))
+    return 8;
+  else if (atype == STANDARD_TYPE(IGESSolid_Face))
+    return 9;
+  else if (atype == STANDARD_TYPE(IGESSolid_Loop))
+    return 10;
+  else if (atype == STANDARD_TYPE(IGESSolid_ManifoldSolid))
+    return 11;
+  else if (atype == STANDARD_TYPE(IGESSolid_PlaneSurface))
+    return 12;
+  else if (atype == STANDARD_TYPE(IGESSolid_RightAngularWedge))
+    return 13;
+  else if (atype == STANDARD_TYPE(IGESSolid_SelectedComponent))
+    return 14;
+  else if (atype == STANDARD_TYPE(IGESSolid_Shell))
+    return 15;
+  else if (atype == STANDARD_TYPE(IGESSolid_SolidAssembly))
+    return 16;
+  else if (atype == STANDARD_TYPE(IGESSolid_SolidInstance))
+    return 17;
+  else if (atype == STANDARD_TYPE(IGESSolid_SolidOfLinearExtrusion))
+    return 18;
+  else if (atype == STANDARD_TYPE(IGESSolid_SolidOfRevolution))
+    return 19;
+  else if (atype == STANDARD_TYPE(IGESSolid_Sphere))
+    return 20;
+  else if (atype == STANDARD_TYPE(IGESSolid_SphericalSurface))
+    return 21;
+  else if (atype == STANDARD_TYPE(IGESSolid_ToroidalSurface))
+    return 22;
+  else if (atype == STANDARD_TYPE(IGESSolid_Torus))
+    return 23;
+  else if (atype == STANDARD_TYPE(IGESSolid_VertexList))
+    return 24;
   return 0;
 }