0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / IFSelect / IFSelect_Selection.hxx
CommitLineData
42cf5bc1 1// Created on: 1992-11-17
2// Created by: Christian CAILLET
3// Copyright (c) 1992-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _IFSelect_Selection_HeaderFile
18#define _IFSelect_Selection_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
25e59720 23#include <Standard_Transient.hxx>
42cf5bc1 24class Interface_EntityIterator;
25class Interface_Graph;
26class IFSelect_SelectionIterator;
27class TCollection_AsciiString;
28
42cf5bc1 29class IFSelect_Selection;
25e59720 30DEFINE_STANDARD_HANDLE(IFSelect_Selection, Standard_Transient)
42cf5bc1 31
32//! A Selection allows to define a set of Interface Entities.
33//! Entities to be put on an output file should be identified in
0177fe26 34//! a way as independent from such or such execution as possible.
42cf5bc1 35//! This permits to handle comprehensive criteria, and to replay
36//! them when a new variant of an input file has to be processed.
37//!
38//! Its input can be, either an Interface Model (the very source),
0177fe26 39//! or another-other Selection(s) or any other output.
40//! All list computations start from an input Graph (from IFGraph)
25e59720 41class IFSelect_Selection : public Standard_Transient
42cf5bc1 42{
43
44public:
45
42cf5bc1 46 //! Returns the list of selected entities, computed from Input
47 //! given as a Graph. Specific to each class of Selection
48 //! Note that uniqueness of each entity is not required here
49 //! This method can raise an exception as necessary
50 Standard_EXPORT virtual Interface_EntityIterator RootResult (const Interface_Graph& G) const = 0;
0177fe26 51
52 //! Returns the list of selected entities, each of them being
42cf5bc1 53 //! unique. Default definition works from RootResult. According
54 //! HasUniqueResult, UniqueResult returns directly RootResult,
55 //! or build a Unique Result from it with a Graph.
56 Standard_EXPORT Interface_EntityIterator UniqueResult (const Interface_Graph& G) const;
0177fe26 57
42cf5bc1 58 //! Returns the list of entities involved by a Selection, i.e.
59 //! UniqueResult plus the shared entities (directly or not)
60 Standard_EXPORT virtual Interface_EntityIterator CompleteResult (const Interface_Graph& G) const;
61
62 //! Puts in an Iterator the Selections from which "me" depends
63 //! (there can be zero, or one, or a list).
64 //! Specific to each class of Selection
65 Standard_EXPORT virtual void FillIterator (IFSelect_SelectionIterator& iter) const = 0;
66
67 //! Returns a text which defines the criterium applied by a
68 //! Selection (can be used to be printed, displayed ...)
69 //! Specific to each class
70 Standard_EXPORT virtual TCollection_AsciiString Label() const = 0;
71
25e59720 72 DEFINE_STANDARD_RTTIEXT(IFSelect_Selection,Standard_Transient)
42cf5bc1 73
74protected:
75
42cf5bc1 76 //! Returns True if RootResult guarantees uniqueness for each
77 //! Entity. Called by UniqueResult.
78 //! Default answer is False. Can be redefined.
79 Standard_EXPORT virtual Standard_Boolean HasUniqueResult() const;
80
42cf5bc1 81};
82
42cf5bc1 83#endif // _IFSelect_Selection_HeaderFile