|
||||
File indexing completed on 2024-11-15 09:47:08
0001 // Created on: 1993-10-19 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1993-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_GeneralModifier_HeaderFile 0018 #define _IFSelect_GeneralModifier_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Standard_Transient.hxx> 0024 class IFSelect_Selection; 0025 class IFSelect_Dispatch; 0026 class TCollection_AsciiString; 0027 0028 class IFSelect_GeneralModifier; 0029 DEFINE_STANDARD_HANDLE(IFSelect_GeneralModifier, Standard_Transient) 0030 0031 //! This class gives a frame for Actions which modify the effect 0032 //! of a Dispatch, i.e. : 0033 //! By Selections and Dispatches, an original Model can be 0034 //! split into one or more "target" Models : these Models 0035 //! contain Entities copied from the original one (that is, a 0036 //! part of it). Basically, these dispatched Entities are copied 0037 //! as identical to their original counterparts. Also the copied 0038 //! Models reproduce the Header of the original one. 0039 //! 0040 //! Modifiers allow to change this copied content : this is the 0041 //! way to be used for any kind of alterations, adaptations ... 0042 //! They are exploited by a ModelCopier, which firstly performs 0043 //! the copy operation described by Dispatches, then invokes the 0044 //! Modifiers to work on the result. 0045 //! 0046 //! Each GeneralModifier can be attached to : 0047 //! - all the Models produced 0048 //! - a Dispatch (it will be applied to all the Models obtained 0049 //! from this Dispatch) designated by its Ident in a ShareOut 0050 //! - in addition, to a Selection (facultative) : this adds a 0051 //! criterium, the Modifier is invoked on a produced Model only 0052 //! if this Model contains an Entity copied from one of the 0053 //! Entities designated by this Selection. 0054 //! (for special Modifiers from IFAdapt, while they must work on 0055 //! definite Entities, this Selection is mandatory to run) 0056 //! 0057 //! Remark : this class has no action attached, it only provides 0058 //! a frame to work on criteria. Then, sub-classes will define 0059 //! their kind of action, which can be applied at a precise step 0060 //! of the production of a File : see Modifier, and in the 0061 //! package IFAdapt, EntityModifier and EntityCopier 0062 class IFSelect_GeneralModifier : public Standard_Transient 0063 { 0064 0065 public: 0066 0067 //! Returns True if this modifier may change the graph of 0068 //! dependences (aknowledged at creation time) 0069 Standard_EXPORT Standard_Boolean MayChangeGraph() const; 0070 0071 //! Attaches to a Dispatch. If <disp> is Null, Resets it 0072 //! (to apply the Modifier on every Dispatch) 0073 Standard_EXPORT void SetDispatch (const Handle(IFSelect_Dispatch)& disp); 0074 0075 //! Returns the Dispatch to be matched, Null if not set 0076 Standard_EXPORT Handle(IFSelect_Dispatch) Dispatch() const; 0077 0078 //! Returns True if a Model obtained from the Dispatch <disp> 0079 //! is to be treated (apart from the Selection criterium) 0080 //! If Dispatch(me) is Null, returns True. Else, checks <disp> 0081 Standard_EXPORT Standard_Boolean Applies (const Handle(IFSelect_Dispatch)& disp) const; 0082 0083 //! Sets a Selection : a Model is treated if it contains one or 0084 //! more Entities designated by the Selection 0085 Standard_EXPORT void SetSelection (const Handle(IFSelect_Selection)& sel); 0086 0087 //! Resets the Selection : this criterium is not longer active 0088 Standard_EXPORT void ResetSelection(); 0089 0090 //! Returns True if a Selection is set as an additional criterium 0091 Standard_EXPORT Standard_Boolean HasSelection() const; 0092 0093 //! Returns the Selection, or a Null Handle if not set 0094 Standard_EXPORT Handle(IFSelect_Selection) Selection() const; 0095 0096 //! Returns a short text which defines the operation performed 0097 Standard_EXPORT virtual TCollection_AsciiString Label() const = 0; 0098 0099 DEFINE_STANDARD_RTTIEXT(IFSelect_GeneralModifier,Standard_Transient) 0100 0101 protected: 0102 0103 //! Sets the Modifier criteria to default Values 0104 //! (i.e. "always applies") 0105 //! <maychangegraph> must be provided at creation time, to : 0106 //! - False if this GeneralModifier surely lets the graph of 0107 //! dependencies unchanged (NO edition of any reference, BUT 0108 //! also NO entity added or replaced or removed) 0109 //! - True if there is a possibility of changing the graph of 0110 //! dependencies when this modifier is applied 0111 Standard_EXPORT IFSelect_GeneralModifier(const Standard_Boolean maychangegraph); 0112 0113 private: 0114 0115 Handle(IFSelect_Selection) thesel; 0116 Handle(IFSelect_Dispatch) thedisp; 0117 Standard_Boolean thechgr; 0118 0119 }; 0120 0121 #endif // _IFSelect_GeneralModifier_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |