|
||||
File indexing completed on 2025-01-18 10:03:53
0001 // Created on: 1994-05-02 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1994-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_AppliedModifiers_HeaderFile 0018 #define _IFSelect_AppliedModifiers_HeaderFile 0019 0020 #include <Standard.hxx> 0021 0022 #include <IFSelect_SequenceOfGeneralModifier.hxx> 0023 #include <Interface_IntList.hxx> 0024 #include <Standard_Integer.hxx> 0025 #include <Standard_Transient.hxx> 0026 #include <TColStd_HSequenceOfInteger.hxx> 0027 class IFSelect_GeneralModifier; 0028 0029 class IFSelect_AppliedModifiers; 0030 DEFINE_STANDARD_HANDLE(IFSelect_AppliedModifiers, Standard_Transient) 0031 0032 //! This class allows to memorize and access to the modifiers 0033 //! which are to be applied to a file. To each modifier, is bound 0034 //! a list of integers (optional) : if this list is absent, 0035 //! the modifier applies to all the file. Else, it applies to the 0036 //! entities designated by these numbers in the produced file. 0037 //! 0038 //! To record a modifier, and a possible list of entity numbers to be applied on: 0039 //! AddModif (amodifier); 0040 //! loop on AddNum (anumber); 0041 //! 0042 //! To query it, Count gives the count of recorded modifiers, then for each one: 0043 //! Item (numodif, amodifier, entcount); 0044 //! IsForAll () -> can be called, if True, applies on the whole file 0045 //! 0046 //! for (i = 1; i <= entcount; i ++) 0047 //! nument = ItemNum (i); -> return an entity number 0048 class IFSelect_AppliedModifiers : public Standard_Transient 0049 { 0050 public: 0051 0052 //! Creates an AppliedModifiers, ready to record up to <nbmax> 0053 //! modifiers, on a model of <nbent> entities 0054 Standard_EXPORT IFSelect_AppliedModifiers(const Standard_Integer nbmax, const Standard_Integer nbent); 0055 0056 //! Records a modifier. By default, it is to apply on all a 0057 //! produced file. Further calls to AddNum will restrict this. 0058 //! Returns True if done, False if too many modifiers are already 0059 //! recorded 0060 Standard_EXPORT Standard_Boolean AddModif (const Handle(IFSelect_GeneralModifier)& modif); 0061 0062 //! Adds a number of entity of the output file to be applied on. 0063 //! If a sequence of AddNum is called after AddModif, this 0064 //! Modifier will be applied on the list of designated entities. 0065 //! Else, it will be applied on all the file 0066 //! Returns True if done, False if no modifier has yet been added 0067 Standard_EXPORT Standard_Boolean AddNum (const Standard_Integer nument); 0068 0069 //! Returns the count of recorded modifiers 0070 Standard_EXPORT Standard_Integer Count() const; 0071 0072 //! Returns the description for applied modifier n0 <num> : 0073 //! the modifier itself, and the count of entities to be applied 0074 //! on. If no specific list of number has been defined, returns 0075 //! the total count of entities of the file 0076 //! If this count is zero, then the modifier applies to all 0077 //! the file (see below). Else, the numbers are then queried by 0078 //! calls to ItemNum between 1 and <entcount> 0079 //! Returns True if OK, False if <num> is out of range 0080 Standard_EXPORT Standard_Boolean Item (const Standard_Integer num, Handle(IFSelect_GeneralModifier)& modif, Standard_Integer& entcount); 0081 0082 //! Returns a numero of entity to be applied on, given its rank 0083 //! in the list. If no list is defined (i.e. for all the file), 0084 //! returns <nument> itself, to give all the entities of the file 0085 //! Returns 0 if <nument> out of range 0086 Standard_EXPORT Standard_Integer ItemNum (const Standard_Integer nument) const; 0087 0088 //! Returns the list of entities to be applied on (see Item) 0089 //! as a HSequence (IsForAll produces the complete list of all 0090 //! the entity numbers of the file 0091 Standard_EXPORT Handle(TColStd_HSequenceOfInteger) ItemList() const; 0092 0093 //! Returns True if the applied modifier queried by last call to 0094 //! Item is to be applied to all the produced file. 0095 //! Else, <entcount> returned by Item gives the count of entity 0096 //! numbers, each one is queried by ItemNum 0097 Standard_EXPORT Standard_Boolean IsForAll() const; 0098 0099 DEFINE_STANDARD_RTTIEXT(IFSelect_AppliedModifiers,Standard_Transient) 0100 0101 private: 0102 0103 IFSelect_SequenceOfGeneralModifier themodifs; 0104 Interface_IntList thelists; 0105 Standard_Integer thenbent; 0106 Standard_Integer theentcnt; 0107 0108 }; 0109 0110 #endif // _IFSelect_AppliedModifiers_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |