|
|
|||
File indexing completed on 2026-07-07 08:36:56
0001 // Created by: DAUTRY Philippe 0002 // Copyright (c) 1998-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 // ------------------------- 0017 0018 // Version: 0.0 0019 // Version Date Purpose 0020 // 0.0 Feb 16 1998 Creation 0021 0022 #ifndef TDF_AttributeIterator_HeaderFile 0023 #define TDF_AttributeIterator_HeaderFile 0024 0025 #include <TDF_Label.hxx> 0026 #include <TDF_LabelNodePtr.hxx> 0027 0028 // This class provides a way to iterates on the 0029 // up-to-date (current) valid attributes of a label. 0030 // 0031 // This class should not be used for standard attributes workflow. 0032 // Application always knows what to search at particular label. 0033 // So, use IsAttribute and FindAttribute methods of 0034 // TDF_Label to check and get attributes in usual way. 0035 // This class may be used for processing of content of labels 0036 // in generic way, like copy-tool, specific save/restore algorithms, 0037 // etc. 0038 // 0039 // Even a forgotten attribute may be found if this 0040 // option is set. To use this possibility, look at 0041 // the constructor. 0042 0043 class TDF_AttributeIterator 0044 { 0045 0046 public: 0047 // Methods PUBLIC 0048 // 0049 Standard_EXPORT TDF_AttributeIterator(); 0050 Standard_EXPORT TDF_AttributeIterator(const TDF_Label& aLabel, 0051 const Standard_Boolean withoutForgotten = Standard_True); 0052 Standard_EXPORT TDF_AttributeIterator(const TDF_LabelNodePtr aLabelNode, 0053 const Standard_Boolean withoutForgotten = Standard_True); 0054 Standard_EXPORT void Initialize(const TDF_Label& aLabel, 0055 const Standard_Boolean withoutForgotten = Standard_True); 0056 inline Standard_Boolean More() const; 0057 Standard_EXPORT void Next(); 0058 inline Handle(TDF_Attribute) Value() const; 0059 0060 //! Provides an access to the internal pointer of the current attribute. 0061 //! The method has better performance as not-creating handle. 0062 inline const TDF_Attribute* PtrValue() const { return myValue; } 0063 0064 protected: 0065 // Methods PROTECTED 0066 // 0067 0068 // Fields PROTECTED 0069 // 0070 0071 private: 0072 // Methods PRIVATE 0073 // 0074 void goToNext(const Handle(TDF_Attribute)& anAttr); 0075 0076 // Fields PRIVATE 0077 // 0078 TDF_Attribute* myValue; 0079 Standard_Boolean myWithoutForgotten; 0080 }; 0081 0082 // other inline functions and methods (like "C++: function call" methods) 0083 // 0084 0085 inline Standard_Boolean TDF_AttributeIterator::More() const 0086 { 0087 return (myValue != 0L); 0088 } 0089 0090 inline Handle(TDF_Attribute) TDF_AttributeIterator::Value() const 0091 { 0092 return myValue; 0093 } 0094 0095 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|