0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / TObj / TObj_ModelIterator.hxx
CommitLineData
b311480e 1// Created on: 2001-01-31
2// Created by: Pavel TELKOV
973c2be1 3// Copyright (c) 2001-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 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
973c2be1 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.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
b311480e 15
7fd59977 16// The original implementation Copyright: (C) RINA S.p.A
17
18#ifndef TObj_ModelIterator_HeaderFile
19#define TObj_ModelIterator_HeaderFile
20
21#include <TObj_Object.hxx>
22#include <TObj_ObjectIterator.hxx>
23#include <TObj_SequenceOfIterator.hxx>
24
7fd59977 25
26/**
27* This class provides an iterator by all objects in the model.
28*/
29
30class TObj_ModelIterator : public TObj_ObjectIterator
31{
32 public:
33 /**
34 * Constructor
35 */
36 //! Creates Iterator and initialize it by Model`s label
37 Standard_EXPORT TObj_ModelIterator(const Handle(TObj_Model)& theModel);
38
39 public:
40 /**
41 * Methods to iterate on objects.
42 */
43
44 //! Returns True if iteration is not finished and method Value()
45 //! will give the object
79104795 46 virtual Standard_EXPORT Standard_Boolean More() const Standard_OVERRIDE;
7fd59977 47
48 //! Iterates to the next object
79104795 49 virtual Standard_EXPORT void Next () Standard_OVERRIDE;
7fd59977 50
51 //! Returns current object (or MainObj of Model if iteration has finished)
79104795 52 virtual Standard_EXPORT Handle(TObj_Object) Value () const Standard_OVERRIDE;
7fd59977 53
54 protected:
55 /**
56 * private methods
57 */
58
59 //! Add iterator on children of indicated object recursively.
60 virtual Standard_EXPORT void addIterator(const Handle(TObj_Object)& theObj);
61
62 protected:
63 /**
64 * Fields
65 */
66 Handle(TObj_Object) myObject; //!< Current object
67 TObj_SequenceOfIterator myIterSeq; //!< Sequence of iterators in model
68
69 public:
70 //! CASCADE RTTI
92efcf78 71 DEFINE_STANDARD_RTTIEXT(TObj_ModelIterator,TObj_ObjectIterator)
7fd59977 72};
73
74//! Define handle class for TObj_ObjectIterator
75DEFINE_STANDARD_HANDLE(TObj_ModelIterator,TObj_ObjectIterator)
76
77#endif
78
79#ifdef _MSC_VER
80#pragma once
81#endif