Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:22

0001 // Created on: 2004-11-23
0002 // Created by: Pavel TELKOV
0003 // Copyright (c) 2004-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 // The original implementation Copyright: (C) RINA S.p.A
0017 
0018 #ifndef TObj_SequenceIterator_HeaderFile
0019 #define TObj_SequenceIterator_HeaderFile
0020 
0021 #include <TObj_Container.hxx>
0022 #include <TObj_ObjectIterator.hxx>
0023 
0024 /**
0025 * This class is an iterator on sequence
0026 */
0027 
0028 class TObj_SequenceIterator : public TObj_ObjectIterator
0029 {
0030 
0031  protected:
0032   /**
0033   * Constructor
0034   */
0035 
0036   //! Creates an Empty Iterator
0037   Standard_EXPORT TObj_SequenceIterator();
0038 
0039  public:
0040   /**
0041   * Constructor
0042   */
0043 
0044   //! Creates an iterator an initialize it by sequence of objects.
0045   Standard_EXPORT TObj_SequenceIterator
0046                         (const Handle(TObj_HSequenceOfObject)& theObjects,
0047                          const Handle(Standard_Type)&              theType = NULL);
0048   
0049  public:
0050   /**
0051   * Redefined methods
0052   */
0053   
0054   //! Returns True if there is a current Item in the iteration.
0055   virtual Standard_EXPORT Standard_Boolean More () const Standard_OVERRIDE;
0056 
0057   //! Move to the next Item
0058   virtual Standard_EXPORT void Next () Standard_OVERRIDE;
0059 
0060   //! Returns the current item
0061   virtual Standard_EXPORT Handle(TObj_Object) Value () const Standard_OVERRIDE;
0062 
0063  protected:
0064   /**
0065   * Fields
0066   */
0067   Standard_Integer                   myIndex; //!< current index of object in sequence
0068   Handle(Standard_Type)              myType;  //!< type of object
0069   Handle(TObj_HSequenceOfObject) myObjects;   //!< sequence of objects
0070 
0071  public:
0072    //! CASCADE RTTI
0073   DEFINE_STANDARD_RTTIEXT(TObj_SequenceIterator,TObj_ObjectIterator)
0074 };
0075 
0076 //! Define handle class for TObj_SequenceIterator
0077 DEFINE_STANDARD_HANDLE(TObj_SequenceIterator,TObj_ObjectIterator)
0078 
0079 #endif
0080 
0081 #ifdef _MSC_VER
0082 #pragma once
0083 #endif