SHAPER 9.16.0
CollectionPlugin_Field.h
1// Copyright (C) 2014-2026 CEA, EDF
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef COLLECTIONPLUGIN_FIELD_H_
21#define COLLECTIONPLUGIN_FIELD_H_
22
23#include "CollectionPlugin.h"
24#include <ModelAPI_Feature.h>
25#include <GeomAPI_Shape.h>
26
43{
44 public:
46 inline static const std::string& ID()
47 {
48 static const std::string MY_FIELD_ID("Field");
49 return MY_FIELD_ID;
50 }
52 inline static const std::string& SELECTED_ID()
53 {
54 static const std::string MY_SELECTED_ID("selected");
55 return MY_SELECTED_ID;
56 }
58 inline static const std::string& COMPONENTS_NAMES_ID()
59 {
60 static const std::string MY_COMPONENTS_NAMES_ID("components_names");
61 return MY_COMPONENTS_NAMES_ID;
62 }
64 inline static const std::string& STAMPS_ID()
65 {
66 static const std::string MY_STAMPS_ID("stamps");
67 return MY_STAMPS_ID;
68 }
70 inline static const std::string& VALUES_ID()
71 {
72 static const std::string MY_VALUES_ID("values");
73 return MY_VALUES_ID;
74 }
75
77 COLLECTIONPLUGIN_EXPORT virtual const std::string& getKind()
78 {
79 static std::string MY_KIND = CollectionPlugin_Field::ID();
80 return MY_KIND;
81 }
82
84 COLLECTIONPLUGIN_EXPORT virtual void execute();
85
87 COLLECTIONPLUGIN_EXPORT virtual void initAttributes();
88
90 COLLECTIONPLUGIN_EXPORT virtual bool isPersistentResult() {return false;}
91
94
95};
96
97#endif
Feature for selection of sub-shapes of some shapes and assigning data on them.
Definition: CollectionPlugin_Field.h:43
virtual void execute()
Creates a new field result if needed.
Definition: CollectionPlugin_Field.cpp:47
CollectionPlugin_Field()
Use plugin manager for features creation.
Definition: CollectionPlugin_Field.cpp:32
static const std::string & SELECTED_ID()
attribute name of selected entities list
Definition: CollectionPlugin_Field.h:52
static const std::string & COMPONENTS_NAMES_ID()
attribute name of components titles array
Definition: CollectionPlugin_Field.h:58
static const std::string & STAMPS_ID()
attribute name of stamps integer array
Definition: CollectionPlugin_Field.h:64
virtual void initAttributes()
Request for initialization of data model of the feature: adding all attributes.
Definition: CollectionPlugin_Field.cpp:36
static const std::string & ID()
Feature kind.
Definition: CollectionPlugin_Field.h:46
static const std::string & VALUES_ID()
attribute name of list of tables that contain default values (row 0) and the custom values
Definition: CollectionPlugin_Field.h:70
virtual const std::string & getKind()
Returns the kind of a feature.
Definition: CollectionPlugin_Field.h:77
virtual bool isPersistentResult()
Result of fields is created on the fly and don't stored to the document.
Definition: CollectionPlugin_Field.h:90
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:41