Salome HOME
updated copyright message
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_ImportResult.cpp
index cf72de3efbdf97a89a277b8704eccac8c0cd19c2..463d78cc4008c0aca50ed27dbb23d267117421b5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -57,6 +57,14 @@ void FeaturesAPI_ImportResult::dump(ModelHighAPI_Dumper& theDumper) const
   AttributeSelectionListPtr anObjects =
     aBase->selectionList(FeaturesPlugin_ImportResult::OBJECTS());
 
+  CompositeFeaturePtr aCompositeFeature =
+      std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aBase);
+  int aNbOfSubs = aCompositeFeature->numberOfSubs();
+  for (int anIndex = 0; anIndex < aNbOfSubs; anIndex++) {
+    FeaturePtr aSubFeature = aCompositeFeature->subFeature(anIndex);
+    theDumper.name(aSubFeature, false, false, true); //mark as not to dump
+  }
+
   theDumper << aBase << " = model.addImportResult("
             << aDocName << ", " << anObjects << ")" << std::endl;
 }