1 // Created on: 2001-01-31
2 // Created by: Pavel TELKOV
3 // Copyright (c) 2001-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 // The original implementation Copyright: (C) RINA S.p.A
18 #ifndef TObj_ModelIterator_HeaderFile
19 #define TObj_ModelIterator_HeaderFile
21 #include <TObj_Object.hxx>
22 #include <TObj_ObjectIterator.hxx>
23 #include <TObj_SequenceOfIterator.hxx>
27 * This class provides an iterator by all objects in the model.
30 class TObj_ModelIterator : public TObj_ObjectIterator
36 //! Creates Iterator and initialize it by Model`s label
37 Standard_EXPORT TObj_ModelIterator(const Handle(TObj_Model)& theModel);
41 * Methods to iterate on objects.
44 //! Returns True if iteration is not finished and method Value()
45 //! will give the object
46 virtual Standard_EXPORT Standard_Boolean More() const Standard_OVERRIDE;
48 //! Iterates to the next object
49 virtual Standard_EXPORT void Next () Standard_OVERRIDE;
51 //! Returns current object (or MainObj of Model if iteration has finished)
52 virtual Standard_EXPORT Handle(TObj_Object) Value () const Standard_OVERRIDE;
59 //! Add iterator on children of indicated object recursively.
60 virtual Standard_EXPORT void addIterator(const Handle(TObj_Object)& theObj);
66 Handle(TObj_Object) myObject; //!< Current object
67 TObj_SequenceOfIterator myIterSeq; //!< Sequence of iterators in model
71 DEFINE_STANDARD_RTTIEXT(TObj_ModelIterator,TObj_ObjectIterator)
74 //! Define handle class for TObj_ObjectIterator
75 DEFINE_STANDARD_HANDLE(TObj_ModelIterator,TObj_ObjectIterator)