File: IFSelect_SelectSuite.hxx

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (114 lines) | stat: -rw-r--r-- 3,499 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _IFSelect_SelectSuite_HeaderFile
#define _IFSelect_SelectSuite_HeaderFile

#include <Standard.hxx>
#include <Standard_DefineHandle.hxx>
#include <Handle_IFSelect_SelectSuite.hxx>

#include <TCollection_AsciiString.hxx>
#include <TColStd_SequenceOfTransient.hxx>
#include <IFSelect_SelectDeduct.hxx>
#include <Standard_Boolean.hxx>
#include <Handle_IFSelect_Selection.hxx>
#include <Handle_IFSelect_SelectDeduct.hxx>
#include <Standard_Integer.hxx>
#include <Standard_CString.hxx>
class Interface_InterfaceError;
class IFSelect_Selection;
class IFSelect_SelectDeduct;
class Interface_EntityIterator;
class Interface_Graph;
class TCollection_AsciiString;


//! A SelectSuite can describe a suite of SelectDeduct as a unique
//! one : in other words, it can be seen as a "macro selection"
//!
//! It works by applying each of its items (which is a
//! SelectDeduct) on the result computed by the previous one
//! (by using Alternate Input)
//!
//! But each of these Selections used as items may be used
//! independently, it will then give its own result
//!
//! Hence, SelectSuite gives a way of defining a new Selection
//! from existing ones, without having to do copies or saves
class IFSelect_SelectSuite : public IFSelect_SelectDeduct
{

public:

  
  //! Creates an empty SelectSuite
  Standard_EXPORT IFSelect_SelectSuite();
  
  //! Adds an input selection. I.E. :
  //! If <item> is a SelectDeduct, adds it as Previous, not as Input
  //! Else, sets it as Input
  //! Returns True when done
  //! Returns False and refuses to work if Input is already defined
  Standard_EXPORT   Standard_Boolean AddInput (const Handle(IFSelect_Selection)& item) ;
  
  //! Adds a new first item (prepends to the list). The Input is not
  //! touched
  //! If <item> is null, does nothing
  Standard_EXPORT   void AddPrevious (const Handle(IFSelect_SelectDeduct)& item) ;
  
  //! Adds a new last item (prepends to the list)
  //! If <item> is null, does nothing
  Standard_EXPORT   void AddNext (const Handle(IFSelect_SelectDeduct)& item) ;
  
  //! Returns the count of Items
  Standard_EXPORT   Standard_Integer NbItems()  const;
  
  //! Returns an item from its rank in the list
  //! (the Input is always apart)
  Standard_EXPORT   Handle(IFSelect_SelectDeduct) Item (const Standard_Integer num)  const;
  
  //! Sets a value for the Label
  Standard_EXPORT   void SetLabel (const Standard_CString lab) ;
  
  //! Returns the list of selected entities
  //! To do this, once InputResult has been taken (if Input or
  //! Alternate has been defined, else the first Item gives it) :
  //! this result is set as alternate input for the first item,
  //! which computes its result : this result is set as alternate
  //! input for the second item, etc...
  Standard_EXPORT   Interface_EntityIterator RootResult (const Interface_Graph& G)  const;
  
  //! Returns the Label
  //! Either it has been defined by SetLabel, or it will give
  //! "Suite of nn Selections"
  Standard_EXPORT   TCollection_AsciiString Label()  const;




  DEFINE_STANDARD_RTTI(IFSelect_SelectSuite)

protected:




private: 


  TCollection_AsciiString thelab;
  TColStd_SequenceOfTransient thesel;


};







#endif // _IFSelect_SelectSuite_HeaderFile