|
|
|||
File indexing completed on 2026-09-18 09:20:40
0001 // Created on: 1992-11-17 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1992-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _IFSelect_Dispatch_HeaderFile 0018 #define _IFSelect_Dispatch_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Standard_Transient.hxx> 0024 #include <Standard_Integer.hxx> 0025 class TCollection_HAsciiString; 0026 class IFSelect_Selection; 0027 class IFSelect_SelectionIterator; 0028 class TCollection_AsciiString; 0029 class Interface_EntityIterator; 0030 class Interface_Graph; 0031 class IFGraph_SubPartsIterator; 0032 0033 //! This class allows to describe how a set of Entities has to be 0034 //! dispatched into resulting Packets : a Packet is a sub-set of 0035 //! the initial set of entities. 0036 //! 0037 //! Thus, it can generate zero, one, or more Packets according 0038 //! input set and criterium of dispatching. And it can let apart 0039 //! some entities : it is the Remainder, which can be recovered 0040 //! by a specific Selection (RemainderFromDispatch). 0041 //! 0042 //! Depending of sub-classes, a Dispatch can potentially generate 0043 //! a limited or not count of packet, and a remainder or none. 0044 //! 0045 //! The input set is read from a specified Selection, attached to 0046 //! the Dispatch : the Final Selection of the Dispatch. The input 0047 //! is the Unique Root Entities list of the Final Selection 0048 class IFSelect_Dispatch : public Standard_Transient 0049 { 0050 0051 public: 0052 //! Sets a Root Name as an HAsciiString 0053 //! To reset it, give a Null Handle (then, a ShareOut will have 0054 //! to define the Default Root Name) 0055 Standard_EXPORT void SetRootName(const occ::handle<TCollection_HAsciiString>& name); 0056 0057 //! Returns True if a specific Root Name has been set 0058 //! (else, the Default Root Name has to be used) 0059 Standard_EXPORT bool HasRootName() const; 0060 0061 //! Returns the Root Name for files produced by this dispatch 0062 //! It is empty if it has not been set or if it has been reset 0063 Standard_EXPORT const occ::handle<TCollection_HAsciiString>& RootName() const; 0064 0065 //! Stores (or Changes) the Final Selection for a Dispatch 0066 Standard_EXPORT void SetFinalSelection(const occ::handle<IFSelect_Selection>& sel); 0067 0068 //! Returns the Final Selection of a Dispatch 0069 //! we 'd like : C++ : return const & 0070 Standard_EXPORT occ::handle<IFSelect_Selection> FinalSelection() const; 0071 0072 //! Returns the complete list of source Selections (starting 0073 //! from FinalSelection) 0074 Standard_EXPORT IFSelect_SelectionIterator Selections() const; 0075 0076 //! Returns True if a Dispatch can have a Remainder, i.e. if its 0077 //! criterium can let entities apart. It is a potential answer, 0078 //! remainder can be empty at run-time even if answer is True. 0079 //! (to attach a RemainderFromDispatch Selection is not allowed if 0080 //! answer is True). 0081 //! Default answer given here is False (can be redefined) 0082 Standard_EXPORT virtual bool CanHaveRemainder() const; 0083 0084 //! Returns True if a Dispatch generates a count of Packets always 0085 //! less than or equal to a maximum value : it can be computed 0086 //! from the total count of Entities to be dispatched : <nbent>. 0087 //! If answer is False, no limited maximum is expected for account 0088 //! If answer is True, expected maximum is given in argument <max> 0089 //! Default answer given here is False (can be redefined) 0090 Standard_EXPORT virtual bool LimitedMax(const int nbent, int& max) const; 0091 0092 //! Returns a text which defines the way a Dispatch produces 0093 //! packets (which will become files) from its Input 0094 Standard_EXPORT virtual TCollection_AsciiString Label() const = 0; 0095 0096 //! Gets Unique Root Entities from the Final Selection, given an 0097 //! input Graph 0098 //! This the starting step for an Evaluation (Packets - Remainder) 0099 Standard_EXPORT Interface_EntityIterator GetEntities(const Interface_Graph& G) const; 0100 0101 //! Returns the list of produced Packets into argument <pack>. 0102 //! Each Packet corresponds to a Part, the Entities listed are the 0103 //! Roots given by the Selection. Input is given as a Graph. 0104 //! Thus, to create a file from a packet, it suffices to take the 0105 //! entities listed in a Part of Packets (that is, a Packet) 0106 //! without worrying about Shared entities 0107 //! This method can raise an Exception if data are not coherent 0108 Standard_EXPORT virtual void Packets(const Interface_Graph& G, 0109 IFGraph_SubPartsIterator& packs) const = 0; 0110 0111 //! Returns the list of all Input Entities (see GetEntities) which 0112 //! are put in a Packet. That is, Entities listed in GetEntities 0113 //! but not in Remainder (see below). Input is given as a Graph. 0114 Standard_EXPORT Interface_EntityIterator Packeted(const Interface_Graph& G) const; 0115 0116 //! Returns Remainder which is a set of Entities. Can be empty. 0117 //! Default evaluation is empty (has to be redefined if 0118 //! CanHaveRemainder is redefined to return True). 0119 Standard_EXPORT virtual Interface_EntityIterator Remainder(const Interface_Graph& G) const; 0120 0121 DEFINE_STANDARD_RTTIEXT(IFSelect_Dispatch, Standard_Transient) 0122 0123 private: 0124 occ::handle<TCollection_HAsciiString> thename; 0125 occ::handle<IFSelect_Selection> thefinal; 0126 }; 0127 0128 #endif // _IFSelect_Dispatch_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|