|
||||
File indexing completed on 2025-01-18 10:03:53
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 0034 class IFSelect_Dispatch; 0035 DEFINE_STANDARD_HANDLE(IFSelect_Dispatch, Standard_Transient) 0036 0037 //! This class allows to describe how a set of Entities has to be 0038 //! dispatched into resulting Packets : a Packet is a sub-set of 0039 //! the initial set of entities. 0040 //! 0041 //! Thus, it can generate zero, one, or more Packets according 0042 //! input set and criterium of dispatching. And it can let apart 0043 //! some entities : it is the Remainder, which can be recovered 0044 //! by a specific Selection (RemainderFromDispatch). 0045 //! 0046 //! Depending of sub-classes, a Dispatch can potentially generate 0047 //! a limited or not count of packet, and a remainder or none. 0048 //! 0049 //! The input set is read from a specified Selection, attached to 0050 //! the Dispatch : the Final Selection of the Dispatch. The input 0051 //! is the Unique Root Entities list of the Final Selection 0052 class IFSelect_Dispatch : public Standard_Transient 0053 { 0054 0055 public: 0056 0057 0058 //! Sets a Root Name as an HAsciiString 0059 //! To reset it, give a Null Handle (then, a ShareOut will have 0060 //! to define the Default Root Name) 0061 Standard_EXPORT void SetRootName (const Handle(TCollection_HAsciiString)& name); 0062 0063 //! Returns True if a specific Root Name has been set 0064 //! (else, the Default Root Name has to be used) 0065 Standard_EXPORT Standard_Boolean HasRootName() const; 0066 0067 //! Returns the Root Name for files produced by this dispatch 0068 //! It is empty if it has not been set or if it has been reset 0069 Standard_EXPORT const Handle(TCollection_HAsciiString)& RootName() const; 0070 0071 //! Stores (or Changes) the Final Selection for a Dispatch 0072 Standard_EXPORT void SetFinalSelection (const Handle(IFSelect_Selection)& sel); 0073 0074 //! Returns the Final Selection of a Dispatch 0075 //! we 'd like : C++ : return const & 0076 Standard_EXPORT Handle(IFSelect_Selection) FinalSelection() const; 0077 0078 //! Returns the complete list of source Selections (starting 0079 //! from FinalSelection) 0080 Standard_EXPORT IFSelect_SelectionIterator Selections() const; 0081 0082 //! Returns True if a Dispatch can have a Remainder, i.e. if its 0083 //! criterium can let entities apart. It is a potential answer, 0084 //! remainder can be empty at run-time even if answer is True. 0085 //! (to attach a RemainderFromDispatch Selection is not allowed if 0086 //! answer is True). 0087 //! Default answer given here is False (can be redefined) 0088 Standard_EXPORT virtual Standard_Boolean CanHaveRemainder() const; 0089 0090 //! Returns True if a Dispatch generates a count of Packets always 0091 //! less than or equal to a maximum value : it can be computed 0092 //! from the total count of Entities to be dispatched : <nbent>. 0093 //! If answer is False, no limited maximum is expected for account 0094 //! If answer is True, expected maximum is given in argument <max> 0095 //! Default answer given here is False (can be redefined) 0096 Standard_EXPORT virtual Standard_Boolean LimitedMax (const Standard_Integer nbent, Standard_Integer& max) const; 0097 0098 //! Returns a text which defines the way a Dispatch produces 0099 //! packets (which will become files) from its Input 0100 Standard_EXPORT virtual TCollection_AsciiString Label() const = 0; 0101 0102 //! Gets Unique Root Entities from the Final Selection, given an 0103 //! input Graph 0104 //! This the starting step for an Evaluation (Packets - Remainder) 0105 Standard_EXPORT Interface_EntityIterator GetEntities (const Interface_Graph& G) const; 0106 0107 //! Returns the list of produced Packets into argument <pack>. 0108 //! Each Packet corresponds to a Part, the Entities listed are the 0109 //! Roots given by the Selection. Input is given as a Graph. 0110 //! Thus, to create a file from a packet, it suffices to take the 0111 //! entities listed in a Part of Packets (that is, a Packet) 0112 //! without worrying about Shared entities 0113 //! This method can raise an Exception if data are not coherent 0114 Standard_EXPORT virtual void Packets (const Interface_Graph& G, IFGraph_SubPartsIterator& packs) const = 0; 0115 0116 //! Returns the list of all Input Entities (see GetEntities) which 0117 //! are put in a Packet. That is, Entities listed in GetEntities 0118 //! but not in Remainder (see below). Input is given as a Graph. 0119 Standard_EXPORT Interface_EntityIterator Packeted (const Interface_Graph& G) const; 0120 0121 //! Returns Remainder which is a set of Entities. Can be empty. 0122 //! Default evaluation is empty (has to be redefined if 0123 //! CanHaveRemainder is redefined to return True). 0124 Standard_EXPORT virtual Interface_EntityIterator Remainder (const Interface_Graph& G) const; 0125 0126 0127 0128 0129 DEFINE_STANDARD_RTTIEXT(IFSelect_Dispatch,Standard_Transient) 0130 0131 protected: 0132 0133 0134 0135 0136 private: 0137 0138 0139 Handle(TCollection_HAsciiString) thename; 0140 Handle(IFSelect_Selection) thefinal; 0141 0142 0143 }; 0144 0145 0146 0147 0148 0149 0150 0151 #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 |