X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesAPI%2FFeaturesAPI_Placement.h;h=a4245186e7180edbcbd6c73fa5777a67bfd8fd71;hb=6b48364b1da91a4958ce92d392e8bc49a3cbd7a2;hp=691fd509b7b283150d0ab72a479bd8687a93b91b;hpb=61b52539f8a46dddf55715e3c294e7247fecee3c;p=modules%2Fshaper.git diff --git a/src/FeaturesAPI/FeaturesAPI_Placement.h b/src/FeaturesAPI/FeaturesAPI_Placement.h index 691fd509b..a4245186e 100644 --- a/src/FeaturesAPI/FeaturesAPI_Placement.h +++ b/src/FeaturesAPI/FeaturesAPI_Placement.h @@ -1,8 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> - -// File: FeaturesAPI_Placement.h -// Created: 07 June 2016 -// Author: Dmitry Bobylev +// Copyright (C) 2014-2017 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 +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// 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 +// +// See http://www.salome-platform.org/ or +// email : webmaster.salome@opencascade.com +// #ifndef FeaturesAPI_Placement_H_ #define FeaturesAPI_Placement_H_ @@ -14,21 +28,22 @@ #include #include +class ModelHighAPI_Dumper; class ModelHighAPI_Selection; /// \class FeaturesAPI_Placement /// \ingroup CPPHighAPI /// \brief Interface for Placement feature. -class FeaturesAPI_Placement : public ModelHighAPI_Interface +class FeaturesAPI_Placement: public ModelHighAPI_Interface { public: /// Constructor without values. FEATURESAPI_EXPORT - explicit FeaturesAPI_Placement(const std::shared_ptr & theFeature); + explicit FeaturesAPI_Placement(const std::shared_ptr& theFeature); /// Constructor with values. FEATURESAPI_EXPORT - FeaturesAPI_Placement(const std::shared_ptr & theFeature, + FeaturesAPI_Placement(const std::shared_ptr& theFeature, const std::list& theObjects, const ModelHighAPI_Selection& theStartShape, const ModelHighAPI_Selection& theEndShape, @@ -40,11 +55,16 @@ public: virtual ~FeaturesAPI_Placement(); INTERFACE_5(FeaturesPlugin_Placement::ID(), - objects, FeaturesPlugin_Placement::OBJECTS_LIST_ID(), ModelAPI_AttributeSelectionList, /** Main objects */, - startShape, FeaturesPlugin_Placement::START_SHAPE_ID(), ModelAPI_AttributeSelection, /** Start shape */, - endShape, FeaturesPlugin_Placement::END_SHAPE_ID(), ModelAPI_AttributeSelection, /** End shape */, - reverseDirection, FeaturesPlugin_Placement::REVERSE_ID(), ModelAPI_AttributeBoolean, /** Reverse direction flag */, - centering, FeaturesPlugin_Placement::CENTERING_ID(), ModelAPI_AttributeBoolean, /** Centering flag */) + objects, FeaturesPlugin_Placement::OBJECTS_LIST_ID(), + ModelAPI_AttributeSelectionList, /** Main objects */, + startShape, FeaturesPlugin_Placement::START_SHAPE_ID(), + ModelAPI_AttributeSelection, /** Start shape */, + endShape, FeaturesPlugin_Placement::END_SHAPE_ID(), + ModelAPI_AttributeSelection, /** End shape */, + reverseDirection, FeaturesPlugin_Placement::REVERSE_ID(), + ModelAPI_AttributeBoolean, /** Reverse direction flag */, + centering, FeaturesPlugin_Placement::CENTERING_ID(), + ModelAPI_AttributeBoolean, /** Centering flag */) /// Set objects. FEATURESAPI_EXPORT @@ -65,6 +85,10 @@ public: /// Set centering flag. FEATURESAPI_EXPORT void setCentering(const bool theCentering); + + /// Dump wrapped feature + FEATURESAPI_EXPORT + virtual void dump(ModelHighAPI_Dumper& theDumper) const; }; /// Pointer on Placement object. @@ -73,7 +97,7 @@ typedef std::shared_ptr PlacementPtr; /// \ingroup CPPHighAPI /// \brief Create Placement feature. FEATURESAPI_EXPORT -PlacementPtr addPlacement(const std::shared_ptr & thePart, +PlacementPtr addPlacement(const std::shared_ptr& thePart, const std::list& theObjects, const ModelHighAPI_Selection& theStartShape, const ModelHighAPI_Selection& theEndShape,