|
|
|||
File indexing completed on 2026-10-05 09:24:24
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 bool withoutForgotten = true); 0052 Standard_EXPORT TDF_AttributeIterator(const TDF_LabelNodePtr aLabelNode, 0053 const bool withoutForgotten = true); 0054 Standard_EXPORT void Initialize(const TDF_Label& aLabel, const bool withoutForgotten = true); 0055 inline bool More() const; 0056 Standard_EXPORT void Next(); 0057 inline occ::handle<TDF_Attribute> Value() const; 0058 0059 //! Provides an access to the internal pointer of the current attribute. 0060 //! The method has better performance as not-creating handle. 0061 inline const TDF_Attribute* PtrValue() const { return myValue; } 0062 0063 private: 0064 // Methods PRIVATE 0065 // 0066 void goToNext(const occ::handle<TDF_Attribute>& anAttr); 0067 0068 // Fields PRIVATE 0069 // 0070 TDF_Attribute* myValue; 0071 bool myWithoutForgotten; 0072 }; 0073 0074 // other inline functions and methods (like "C++: function call" methods) 0075 // 0076 0077 inline bool TDF_AttributeIterator::More() const 0078 { 0079 return (myValue != nullptr); 0080 } 0081 0082 inline occ::handle<TDF_Attribute> TDF_AttributeIterator::Value() const 0083 { 0084 return myValue; 0085 } 0086 0087 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|