SHAPER 9.16.0
FiltersAPI_Argument.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 FILTERSAPI_ARGUMENT_H_
21#define FILTERSAPI_ARGUMENT_H_
22
23#include "FiltersAPI.h"
24
25#include <ModelAPI_AttributeSelection.h>
26#include <ModelAPI_AttributeSelectionList.h>
27#include <ModelHighAPI_Double.h>
28
29#include <ModelHighAPI_Dumper.h>
30#include <ModelHighAPI_Selection.h>
31
32#include <limits>
33
39{
40public:
41 FILTERSAPI_EXPORT FiltersAPI_Argument();
42
43 FILTERSAPI_EXPORT
44 FiltersAPI_Argument(const bool theValue);
45
46 FILTERSAPI_EXPORT
48
49 FILTERSAPI_EXPORT
50 FiltersAPI_Argument(const double& theValue);
51
52 FILTERSAPI_EXPORT
53 FiltersAPI_Argument(const std::string& theValue);
54
55 FILTERSAPI_EXPORT
57
58 FILTERSAPI_EXPORT
59 FiltersAPI_Argument(const AttributeSelectionPtr& theSelection);
60
61 FILTERSAPI_EXPORT
62 FiltersAPI_Argument(const AttributeSelectionListPtr& theSelectionList);
63
65 FILTERSAPI_EXPORT
66 virtual ~FiltersAPI_Argument();
67
68 const bool boolean() const { return myBoolean; }
69 const std::string& string() const { return myValue; }
70 const ModelHighAPI_Selection& selection() const { return mySelection; }
71 const ModelHighAPI_Double& dble() const { return myDouble; }
73 FILTERSAPI_EXPORT
74 void dump(ModelHighAPI_Dumper& theDumper) const;
75
76private:
77 bool myBoolean;
78 ModelHighAPI_Double myDouble = std::numeric_limits<double>::lowest() ;
79 std::string myValue;
80 ModelHighAPI_Selection mySelection;
81 AttributeSelectionPtr mySelectionAttr;
82 AttributeSelectionListPtr mySelectionListAttr;
83};
84
85#endif
Argument of the Filter.
Definition: FiltersAPI_Argument.h:39
virtual ~FiltersAPI_Argument()
Destructor.
Definition: FiltersAPI_Argument.cpp:61
void dump(ModelHighAPI_Dumper &theDumper) const
Dump wrapped feature.
Definition: FiltersAPI_Argument.cpp:65
Class for filling ModelAPI_AttributeDouble.
Definition: ModelHighAPI_Double.h:37
Dump engine for the model.
Definition: ModelHighAPI_Dumper.h:81
Class for filling ModelAPI_AttributeSelection.
Definition: ModelHighAPI_Selection.h:49