|
||||
File indexing completed on 2025-01-18 10:04:02
0001 // Created on: 1994-05-31 0002 // Created by: Modelistation 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 _IGESSelect_CounterOfLevelNumber_HeaderFile 0018 #define _IGESSelect_CounterOfLevelNumber_HeaderFile 0019 0020 #include <TColStd_HArray1OfInteger.hxx> 0021 #include <IFSelect_SignCounter.hxx> 0022 #include <TColStd_HSequenceOfInteger.hxx> 0023 0024 class Interface_InterfaceModel; 0025 class TCollection_HAsciiString; 0026 0027 class IGESSelect_CounterOfLevelNumber; 0028 DEFINE_STANDARD_HANDLE(IGESSelect_CounterOfLevelNumber, IFSelect_SignCounter) 0029 0030 //! This class gives information about Level Number. It counts 0031 //! entities according level number, considering also the 0032 //! multiple level (see the class LevelList) for which an entity 0033 //! is attached to each of the listed levels. 0034 //! 0035 //! Data are available, as level number, or as their alphanumeric 0036 //! counterparts ("LEVEL nnnnnnn", " NO LEVEL", " LEVEL LIST") 0037 class IGESSelect_CounterOfLevelNumber : public IFSelect_SignCounter 0038 { 0039 0040 public: 0041 0042 0043 //! Creates a CounterOfLevelNumber, clear, ready to work 0044 //! <withmap> and <withlist> are transmitted to SignCounter 0045 Standard_EXPORT IGESSelect_CounterOfLevelNumber(const Standard_Boolean withmap = Standard_True, const Standard_Boolean withlist = Standard_False); 0046 0047 //! Resets already memorized information : also numeric data 0048 Standard_EXPORT virtual void Clear() Standard_OVERRIDE; 0049 0050 //! Adds an entity by considering its lrvrl number(s) 0051 //! A level is added both in numeric and alphanumeric form, 0052 //! i.e. LevelList gives "LEVEL LIST", others (no level or 0053 //! positive level) displays level number on 7 digits (C : %7d) 0054 //! Remark : an entity attached to a Level List is added for 0055 //! " LEVEL LIST", and for each of its constituent levels 0056 Standard_EXPORT virtual void AddSign (const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) Standard_OVERRIDE; 0057 0058 //! The internal action to record a new level number, positive, 0059 //! null (no level) or negative (level list) 0060 Standard_EXPORT void AddLevel (const Handle(Standard_Transient)& ent, const Standard_Integer level); 0061 0062 //! Returns the highest value found for a level number 0063 Standard_EXPORT Standard_Integer HighestLevel() const; 0064 0065 //! Returns the number of times a level is used, 0066 //! 0 if it has not been recorded at all 0067 //! <level> = 0 counts entities attached to no level 0068 //! <level> < 0 counts entities attached to a LevelList 0069 Standard_EXPORT Standard_Integer NbTimesLevel (const Standard_Integer level) const; 0070 0071 //! Returns the ordered list of used positive Level numbers 0072 Standard_EXPORT Handle(TColStd_HSequenceOfInteger) Levels() const; 0073 0074 //! Determines and returns the value of the signature for an 0075 //! entity as an HAsciiString. Redefined, gives the same result 0076 //! as AddSign, see this method ("LEVEL LIST" or "nnnnnnn") 0077 Standard_EXPORT virtual Handle(TCollection_HAsciiString) Sign (const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE; 0078 0079 //! Prints the counts of items (not the list) then the Highest 0080 //! Level Number recorded 0081 Standard_EXPORT virtual void PrintCount (Standard_OStream& S) const Standard_OVERRIDE; 0082 0083 0084 0085 0086 DEFINE_STANDARD_RTTIEXT(IGESSelect_CounterOfLevelNumber,IFSelect_SignCounter) 0087 0088 protected: 0089 0090 0091 0092 0093 private: 0094 0095 0096 Standard_Integer thehigh; 0097 Standard_Integer thenblists; 0098 Handle(TColStd_HArray1OfInteger) thelevels; 0099 0100 0101 }; 0102 0103 0104 0105 0106 0107 0108 0109 #endif // _IGESSelect_CounterOfLevelNumber_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |