X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FCollectionPlugin%2FCollectionPlugin_Field.cpp;h=fd3784273a751f0397a156a81ffd64ebf291d7d5;hb=b6cb9a5e9ecc1c5dae69d686fa73a8afec92d04f;hp=bc2daf57eb425add624205a406b8f8ccd28e7ed7;hpb=266f5a5c2132719049c303265adee362d0e702b4;p=modules%2Fshaper.git diff --git a/src/CollectionPlugin/CollectionPlugin_Field.cpp b/src/CollectionPlugin/CollectionPlugin_Field.cpp index bc2daf57e..fd3784273 100644 --- a/src/CollectionPlugin/CollectionPlugin_Field.cpp +++ b/src/CollectionPlugin/CollectionPlugin_Field.cpp @@ -1,19 +1,33 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> - -// File: CollectionPlugin_Field.cpp -// Created: 08 Oct 2014 -// Author: Sergey BELASH +// 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 +// 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 "CollectionPlugin_Field.h" #include #include -#include #include #include #include #include #include +#include +#include CollectionPlugin_Field::CollectionPlugin_Field() { @@ -22,10 +36,10 @@ CollectionPlugin_Field::CollectionPlugin_Field() void CollectionPlugin_Field::initAttributes() { data()->addAttribute(SELECTED_ID(), ModelAPI_AttributeSelectionList::typeId()); - data()->addAttribute(COMPONENTS_NB_ID(), ModelAPI_AttributeInteger::typeId()); + // for the whole part result is not obligatory + ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), SELECTED_ID()); + data()->addAttribute(COMPONENTS_NAMES_ID(), ModelAPI_AttributeStringArray::typeId()); - data()->addAttribute(VALUES_TYPE_ID(), ModelAPI_AttributeInteger::typeId()); - data()->addAttribute(STEPS_NB_ID(), ModelAPI_AttributeInteger::typeId()); data()->addAttribute(STAMPS_ID(), ModelAPI_AttributeIntArray::typeId()); data()->addAttribute(VALUES_ID(), ModelAPI_AttributeTables::typeId()); }