-// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "FeaturesAPI_BooleanSmash.h"
FeaturesAPI_BooleanSmash::FeaturesAPI_BooleanSmash(
const std::shared_ptr<ModelAPI_Feature>& theFeature,
const std::list<ModelHighAPI_Selection>& theMainObjects,
- const std::list<ModelHighAPI_Selection>& theToolObjects)
+ const std::list<ModelHighAPI_Selection>& theToolObjects,
+ const int theVersion)
: ModelHighAPI_Interface(theFeature)
{
if(initialize()) {
+ fillAttribute(theVersion, theFeature->integer(FeaturesPlugin_Boolean::VERSION_ID()));
fillAttribute(theMainObjects, mymainObjects);
fillAttribute(theToolObjects, mytoolObjects);
aBase->selectionList(FeaturesPlugin_BooleanSmash::OBJECT_LIST_ID());
AttributeSelectionListPtr aTools =
aBase->selectionList(FeaturesPlugin_BooleanSmash::TOOL_LIST_ID());
+ AttributeIntegerPtr aVersion =
+ aBase->integer(FeaturesPlugin_BooleanSmash::VERSION_ID());
+
+ theDumper << "(" << aDocName << ", " << anObjects << ", " << aTools;
+
+ if (aVersion && aVersion->isInitialized())
+ theDumper << ", " << aVersion->value();
- theDumper << "(" << aDocName << ", " << anObjects << ", " << aTools << ")" << std::endl;
+ theDumper << ")" << std::endl;
}
//==================================================================================================
BooleanSmashPtr addSmash(const std::shared_ptr<ModelAPI_Document>& thePart,
const std::list<ModelHighAPI_Selection>& theMainObjects,
- const std::list<ModelHighAPI_Selection>& theToolObjects)
+ const std::list<ModelHighAPI_Selection>& theToolObjects,
+ const int theVersion)
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_BooleanSmash::ID());
return BooleanSmashPtr(new FeaturesAPI_BooleanSmash(aFeature,
theMainObjects,
- theToolObjects));
+ theToolObjects,
+ theVersion));
}