Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-13 09:18:12

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 <NCollection_DataMap.hxx>
0022 #include <TCollection_AsciiString.hxx>
0023 #include <TCollection_HExtendedString.hxx>
0024 #include <TDF_Label.hxx>
0025 #include <NCollection_Sequence.hxx>
0026 #include <NCollection_HSequence.hxx>
0027 #include <TObj_ObjectIterator.hxx>
0028 class TObj_Object;
0029 
0030 /**
0031  * This class is an iterator on sequence
0032  */
0033 
0034 class TObj_SequenceIterator : public TObj_ObjectIterator
0035 {
0036 
0037 protected:
0038   /**
0039    * Constructor
0040    */
0041 
0042   //! Creates an Empty Iterator
0043   Standard_EXPORT TObj_SequenceIterator();
0044 
0045 public:
0046   /**
0047    * Constructor
0048    */
0049 
0050   //! Creates an iterator an initialize it by sequence of objects.
0051   Standard_EXPORT TObj_SequenceIterator(
0052     const occ::handle<NCollection_HSequence<occ::handle<TObj_Object>>>& theObjects,
0053     const occ::handle<Standard_Type>&                                   theType = nullptr);
0054 
0055 public:
0056   /**
0057    * Redefined methods
0058    */
0059 
0060   //! Returns True if there is a current Item in the iteration.
0061   Standard_EXPORT bool More() const override;
0062 
0063   //! Move to the next Item
0064   Standard_EXPORT void Next() override;
0065 
0066   //! Returns the current item
0067   Standard_EXPORT occ::handle<TObj_Object> Value() const override;
0068 
0069 protected:
0070   /**
0071    * Fields
0072    */
0073   int                        myIndex; //!< current index of object in sequence
0074   occ::handle<Standard_Type> myType;  //!< type of object
0075   occ::handle<NCollection_HSequence<occ::handle<TObj_Object>>> myObjects; //!< sequence of objects
0076 
0077 public:
0078   //! CASCADE RTTI
0079   DEFINE_STANDARD_RTTIEXT(TObj_SequenceIterator, TObj_ObjectIterator)
0080 };
0081 
0082 //! Define handle class for TObj_SequenceIterator
0083 #endif
0084 
0085 #ifdef _MSC_VER
0086 #pragma once
0087 #endif