|
||||
File indexing completed on 2025-01-18 10:05:20
0001 // Created by: DAUTRY Philippe 0002 // Copyright (c) 1997-1999 Matra Datavision 0003 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef _TDF_ChildIDIterator_HeaderFile 0017 #define _TDF_ChildIDIterator_HeaderFile 0018 0019 #include <Standard.hxx> 0020 #include <Standard_DefineAlloc.hxx> 0021 #include <Standard_Handle.hxx> 0022 0023 #include <Standard_GUID.hxx> 0024 #include <TDF_ChildIterator.hxx> 0025 class TDF_Attribute; 0026 class TDF_Label; 0027 0028 0029 //! Iterates on the children of a label, to find 0030 //! attributes having ID as Attribute ID. 0031 //! 0032 //! Level option works as TDF_ChildIterator. 0033 class TDF_ChildIDIterator 0034 { 0035 public: 0036 0037 DEFINE_STANDARD_ALLOC 0038 0039 0040 //! Creates an empty iterator. 0041 Standard_EXPORT TDF_ChildIDIterator(); 0042 0043 //! Iterates on the children of the given label. If 0044 //! <allLevels> option is set to true, it explores not 0045 //! only the first, but all the sub label levels. 0046 Standard_EXPORT TDF_ChildIDIterator(const TDF_Label& aLabel, const Standard_GUID& anID, const Standard_Boolean allLevels = Standard_False); 0047 0048 //! Initializes the iteration on the children of the 0049 //! given label. If <allLevels> option is set to true, 0050 //! it explores not only the first, but all the sub 0051 //! label levels. 0052 Standard_EXPORT void Initialize (const TDF_Label& aLabel, const Standard_GUID& anID, const Standard_Boolean allLevels = Standard_False); 0053 0054 //! Returns True if there is a current Item in the 0055 //! iteration. 0056 Standard_Boolean More() const; 0057 0058 //! Move to the next Item 0059 Standard_EXPORT void Next(); 0060 0061 //! Move to the next Brother. If there is none, go up 0062 //! etc. This method is interesting only with 0063 //! "allLevels" behavior, because it avoids to explore 0064 //! the current label children. 0065 Standard_EXPORT void NextBrother(); 0066 0067 //! Returns the current item; a null handle if there is none. 0068 Handle(TDF_Attribute) Value() const; 0069 0070 0071 0072 0073 protected: 0074 0075 0076 0077 0078 0079 private: 0080 0081 0082 0083 Standard_GUID myID; 0084 TDF_ChildIterator myItr; 0085 Handle(TDF_Attribute) myAtt; 0086 0087 0088 }; 0089 0090 0091 #include <TDF_ChildIDIterator.lxx> 0092 0093 0094 0095 0096 0097 #endif // _TDF_ChildIDIterator_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |