SHAPER 9.16.0
FeaturesPlugin_Validators.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 FeaturesPlugin_Validators_H_
21#define FeaturesPlugin_Validators_H_
22
23#include <ModelAPI_AttributeValidator.h>
24#include <ModelAPI_FeatureValidator.h>
25
30{
31public:
36 virtual bool isValid(const AttributePtr& theAttribute,
37 const std::list<std::string>& theArguments,
38 Events_InfoMessage& theError) const;
39};
40
45{
46public:
51 virtual bool isValid(const AttributePtr& theAttribute,
52 const std::list<std::string>& theArguments,
53 Events_InfoMessage& theError) const;
54};
55
60{
61 public:
66 virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
67 const std::list<std::string>& theArguments,
68 Events_InfoMessage& theError) const;
69};
70
75{
76 public:
81 virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
82 const std::list<std::string>& theArguments,
83 Events_InfoMessage& theError) const;
84};
85
91{
92public:
97 virtual bool isValid(const AttributePtr& theAttribute,
98 const std::list<std::string>& theArguments,
99 Events_InfoMessage& theError) const;
100
101private:
102 bool isValidAttribute(const AttributePtr& theAttribute,
103 const std::list<std::string>& theArguments,
104 Events_InfoMessage& theError) const;
105};
106
113{
114 public:
119 virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
120 const std::list<std::string>& theArguments,
121 Events_InfoMessage& theError) const;
122};
123
128{
129public:
134 virtual bool isValid(const AttributePtr& theAttribute,
135 const std::list<std::string>& theArguments,
136 Events_InfoMessage& theError) const;
137};
138
144{
145public:
150 virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
151 const std::list<std::string>& theArguments,
152 Events_InfoMessage& theError) const;
153
154private:
155 bool isShapesCanBeEmpty(const AttributePtr& theAttribute,
156 Events_InfoMessage& theError) const;
157};
158
163{
164public:
169 virtual bool isValid(const AttributePtr& theAttribute,
170 const std::list<std::string>& theArguments,
171 Events_InfoMessage& theError) const;
172};
173
178{
179public:
185 virtual bool isValid(const AttributePtr& theAttribute,
186 const std::list<std::string>& theArguments,
187 Events_InfoMessage& theError) const;
188};
189
194{
195public:
201 virtual bool isValid(const AttributePtr& theAttribute,
202 const std::list<std::string>& theArguments,
203 Events_InfoMessage& theError) const;
204};
205
210{
211public:
217 virtual bool isValid(const AttributePtr& theAttribute,
218 const std::list<std::string>& theArguments,
219 Events_InfoMessage& theError) const;
220};
221
226{
227public:
233 virtual bool isValid(const AttributePtr& theAttribute,
234 const std::list<std::string>& theArguments,
235 Events_InfoMessage& theError) const;
236};
237
242{
243public:
249 virtual bool isValid(const AttributePtr& theAttribute,
250 const std::list<std::string>& theArguments,
251 Events_InfoMessage& theError) const;
252};
253
258{
259public:
265 virtual bool isValid(const AttributePtr& theAttribute,
266 const std::list<std::string>& theArguments,
267 Events_InfoMessage& theError) const;
268};
269
274{
275public:
281 virtual bool isValid(const AttributePtr& theAttribute,
282 const std::list<std::string>& theArguments,
283 Events_InfoMessage& theError) const;
284};
285
290{
291 public:
296 virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
297 const std::list<std::string>& theArguments,
298 Events_InfoMessage& theError) const;
299};
300
305{
306public:
312 virtual bool isValid(const AttributePtr& theAttribute,
313 const std::list<std::string>& theArguments,
314 Events_InfoMessage& theError) const;
315};
316
321{
322 public:
327 virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
328 const std::list<std::string>& theArguments,
329 Events_InfoMessage& theError) const;
330};
331
336{
337 public:
342 virtual bool isValid(const AttributePtr& theAttribute,
343 const std::list<std::string>& theArguments,
344 Events_InfoMessage& theError) const;
345};
346
351{
352public:
357 virtual bool isValid(const AttributePtr& theAttribute,
358 const std::list<std::string>& theArguments,
359 Events_InfoMessage& theError) const;
360};
361
367{
368public:
375 virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
376 const std::list<std::string>& theArguments,
377 Events_InfoMessage& theError) const;
378
380 virtual bool isNotObligatory(std::string theFeature, std::string theAttribute);
381};
382
387{
388public:
393 virtual bool isValid(const AttributePtr& theAttribute,
394 const std::list<std::string>& theArguments,
395 Events_InfoMessage& theError) const;
396};
397
402{
403public:
408 virtual bool isValid(const AttributePtr& theAttribute,
409 const std::list<std::string>& theArguments,
410 Events_InfoMessage& theError) const;
411};
412
417{
418public:
423 virtual bool isValid(const AttributePtr& theAttribute,
424 const std::list<std::string>& theArguments,
425 Events_InfoMessage& theError) const;
426};
427
433{
434public:
441 virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
442 const std::list<std::string>& theArguments,
443 Events_InfoMessage& theError) const;
444
446 virtual bool isNotObligatory(std::string theFeature, std::string theAttribute);
447};
448
453{
454public:
459 virtual bool isValid(const AttributePtr& theAttribute,
460 const std::list<std::string>& theArguments,
461 Events_InfoMessage& theError) const;
462};
463
469{
470public:
477 virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
478 const std::list<std::string>& theArguments,
479 Events_InfoMessage& theError) const;
480
482 virtual bool isNotObligatory(std::string theFeature, std::string theAttribute);
483};
484
489{
490public:
496 virtual bool isValid(const AttributePtr& theAttribute,
497 const std::list<std::string>& theArguments,
498 Events_InfoMessage& theError) const;
499};
500
505{
506public:
512 virtual bool isValid(const AttributePtr& theAttribute,
513 const std::list<std::string>& theArguments,
514 Events_InfoMessage& theError) const;
515};
516
521{
522public:
528 virtual bool isValid(const AttributePtr& theAttribute,
529 const std::list<std::string>& theArguments,
530 Events_InfoMessage& theError) const;
531};
532
533#endif
An event message for sending a string message which has to be translated.
Definition: Events_InfoMessage.h:35
Verifies the selected object for intersection feature.
Definition: FeaturesPlugin_Validators.h:402
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:1877
Validator for the base objects for generation.
Definition: FeaturesPlugin_Validators.h:113
virtual bool isValid(const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:375
A validator for selection base for generation.
Definition: FeaturesPlugin_Validators.h:91
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:284
Validates that boolean operation have enough arguments.
Definition: FeaturesPlugin_Validators.h:367
virtual bool isValid(const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Returns true if feature and/or attributes are valid.
Definition: FeaturesPlugin_Validators.cpp:1623
virtual bool isNotObligatory(std::string theFeature, std::string theAttribute)
Definition: FeaturesPlugin_Validators.cpp:1717
Validates that boolean operation have enough arguments.
Definition: FeaturesPlugin_Validators.h:469
virtual bool isValid(const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Returns true if feature and/or attributes are valid.
Definition: FeaturesPlugin_Validators.cpp:2155
virtual bool isNotObligatory(std::string theFeature, std::string theAttribute)
Definition: FeaturesPlugin_Validators.cpp:2201
Verifies the selected object for boolean common feature.
Definition: FeaturesPlugin_Validators.h:453
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:2095
Validates that boolean operation have enough arguments.
Definition: FeaturesPlugin_Validators.h:433
virtual bool isNotObligatory(std::string theFeature, std::string theAttribute)
Definition: FeaturesPlugin_Validators.cpp:2081
virtual bool isValid(const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Returns true if feature and/or attributes are valid.
Definition: FeaturesPlugin_Validators.cpp:2003
Verifies the selected object for boolean fuse feature.
Definition: FeaturesPlugin_Validators.h:417
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:1949
Validates selection for boolean operation.
Definition: FeaturesPlugin_Validators.h:178
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:875
Verifies the selected object for boolean smash feature.
Definition: FeaturesPlugin_Validators.h:387
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:1730
Verifies the selected object is circular edge or cylindrical face.
Definition: FeaturesPlugin_Validators.h:351
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:1605
A validator for selection at composite feature start.
Definition: FeaturesPlugin_Validators.h:128
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:579
Validator for the "Recover" feature.
Definition: FeaturesPlugin_Validators.h:336
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:1558
Validates selection for fillet operation.
Definition: FeaturesPlugin_Validators.h:489
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:2210
A validator for extrusion from/to face attribute.
Definition: FeaturesPlugin_Validators.h:163
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:782
A validator for extrusion direction attribute.
Definition: FeaturesPlugin_Validators.h:144
virtual bool isValid(const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:628
Validates selection for 1d-fillet operation.
Definition: FeaturesPlugin_Validators.h:210
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:1033
Validates selection for fillet operation.
Definition: FeaturesPlugin_Validators.h:194
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:966
Validates selection for glue faces operation.
Definition: FeaturesPlugin_Validators.h:521
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:2309
Validator for the same type of shape.
Definition: FeaturesPlugin_Validators.h:75
virtual bool isValid(const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:233
Validates selection for "Offset" feature.
Definition: FeaturesPlugin_Validators.h:226
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:1120
Validates selection for partition.
Definition: FeaturesPlugin_Validators.h:258
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:1274
Validator for the pipe locations.
Definition: FeaturesPlugin_Validators.h:60
virtual bool isValid(const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:182
A validator for selection pipe locations.
Definition: FeaturesPlugin_Validators.h:45
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:105
A validator for selection pipe path.
Definition: FeaturesPlugin_Validators.h:30
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:75
Validator for the Remove Sub-Shapes feature.
Definition: FeaturesPlugin_Validators.h:290
virtual bool isValid(const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:1396
Validates selection for "Remove Sub-Shapes" feature.
Definition: FeaturesPlugin_Validators.h:274
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:1334
Validates selection for sewing operation.
Definition: FeaturesPlugin_Validators.h:505
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:2257
Validates selection for "Thickness" feature.
Definition: FeaturesPlugin_Validators.h:242
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:1178
Validator for the "Union" feature.
Definition: FeaturesPlugin_Validators.h:321
virtual bool isValid(const std::shared_ptr< ModelAPI_Feature > &theFeature, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:1508
Validates selection for "Union" feature.
Definition: FeaturesPlugin_Validators.h:305
virtual bool isValid(const AttributePtr &theAttribute, const std::list< std::string > &theArguments, Events_InfoMessage &theError) const
Definition: FeaturesPlugin_Validators.cpp:1457
Generic validator for any attribute of a feature.
Definition: ModelAPI_AttributeValidator.h:31
The geneneric validator for the whole feature.
Definition: ModelAPI_FeatureValidator.h:35