X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_SketchEntity.cpp;h=476e0ef09a2e3a48d11e16d960a6e089d21989db;hb=cdbbde4803e9c320204d537d22af4ac7ef024962;hp=1e7c4de3b5e2a999f2714426e2bc4feac8373118;hpb=93c7fa6135463fb0a202cf94f30da60316795a04;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_SketchEntity.cpp b/src/SketchPlugin/SketchPlugin_SketchEntity.cpp index 1e7c4de3b..476e0ef09 100644 --- a/src/SketchPlugin/SketchPlugin_SketchEntity.cpp +++ b/src/SketchPlugin/SketchPlugin_SketchEntity.cpp @@ -1,7 +1,25 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> +// Copyright (C) 2014-2021 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 +// #include "SketchPlugin_SketchEntity.h" +#include #include #include @@ -12,6 +30,20 @@ SketchPlugin_SketchEntity::SketchPlugin_SketchEntity() void SketchPlugin_SketchEntity::initAttributes() { - data()->addAttribute(CONSTRUCTION_ID(), ModelAPI_AttributeBoolean::type()); - ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), CONSTRUCTION_ID()); + data()->addAttribute(AUXILIARY_ID(), ModelAPI_AttributeBoolean::typeId()); + + initDerivedClassAttributes(); + + AttributePtr anAttr = data()->addAttribute(SketchPlugin_SketchEntity::COPY_ID(), + ModelAPI_AttributeBoolean::typeId()); + anAttr->setIsArgument(false); + ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), + SketchPlugin_SketchEntity::COPY_ID()); + + anAttr = data()->addAttribute(PARENT_ID(), ModelAPI_AttributeReference::typeId()); + anAttr->setIsArgument(false); + ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), PARENT_ID()); + + // initialize the rest of attributes + initDerivedClassAttributes2(); }