Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/TDF_ChildIDIterator.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 //! Iterates on the children of a label, to find
0029 //! attributes having ID as Attribute ID.
0030 //!
0031 //! Level option works as TDF_ChildIterator.
0032 class TDF_ChildIDIterator
0033 {
0034 public:
0035   DEFINE_STANDARD_ALLOC
0036 
0037   //! Creates an empty iterator.
0038   Standard_EXPORT TDF_ChildIDIterator();
0039 
0040   //! Iterates on the children of the given label. If
0041   //! <allLevels> option is set to true, it explores not
0042   //! only the first, but all the sub label levels.
0043   Standard_EXPORT TDF_ChildIDIterator(const TDF_Label&     aLabel,
0044                                       const Standard_GUID& anID,
0045                                       const bool           allLevels = false);
0046 
0047   //! Initializes the iteration on the children of the
0048   //! given label. If <allLevels> option is set to true,
0049   //! it explores not only the first, but all the sub
0050   //! label levels.
0051   Standard_EXPORT void Initialize(const TDF_Label&     aLabel,
0052                                   const Standard_GUID& anID,
0053                                   const bool           allLevels = false);
0054 
0055   //! Returns True if there is a current Item in the
0056   //! iteration.
0057   bool More() const;
0058 
0059   //! Move to the next Item
0060   Standard_EXPORT void Next();
0061 
0062   //! Move to the next Brother. If there is none, go up
0063   //! etc. This method is interesting only with
0064   //! "allLevels" behavior, because it avoids to explore
0065   //! the current label children.
0066   Standard_EXPORT void NextBrother();
0067 
0068   //! Returns the current item; a null handle if there is none.
0069   occ::handle<TDF_Attribute> Value() const;
0070 
0071 private:
0072   Standard_GUID              myID;
0073   TDF_ChildIterator          myItr;
0074   occ::handle<TDF_Attribute> myAtt;
0075 };
0076 
0077 #include <TDF_ChildIDIterator.lxx>
0078 
0079 #endif // _TDF_ChildIDIterator_HeaderFile