0033040: Coding - get rid of unused headers [Storage to TopOpeBRepTool]
[occt.git] / src / TNaming / TNaming_Iterator.hxx
1 // Created on: 1996-12-16
2 // Created by: Remi Lequette
3 // Copyright (c) 1996-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _TNaming_Iterator_HeaderFile
18 #define _TNaming_Iterator_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <TNaming_PtrNode.hxx>
25 #include <Standard_Integer.hxx>
26 #include <TNaming_Evolution.hxx>
27 class Standard_NoMoreObject;
28 class Standard_NoSuchObject;
29 class TNaming_NewShapeIterator;
30 class TNaming_OldShapeIterator;
31 class TNaming_NamedShape;
32 class TDF_Label;
33 class TopoDS_Shape;
34
35
36 //! A tool to visit the contents of a named shape attribute.
37 //! Pairs of shapes in the attribute are iterated, one
38 //! being the pre-modification or the old shape, and
39 //! the other the post-modification or the new shape.
40 //! This allows you to have a full access to all
41 //! contents of an attribute. If, on the other hand, you
42 //! are only interested in topological entities stored
43 //! in the attribute, you can use the functions
44 //! GetShape and CurrentShape in TNaming_Tool.
45 class TNaming_Iterator 
46 {
47 public:
48
49   DEFINE_STANDARD_ALLOC
50
51   
52   //! Iterates on all  the history records in
53   //! <anAtt>.
54   Standard_EXPORT TNaming_Iterator(const Handle(TNaming_NamedShape)& anAtt);
55   
56   //! Iterates on all  the history records in
57   //! the current transaction
58   Standard_EXPORT TNaming_Iterator(const TDF_Label& aLabel);
59   
60   //! Iterates on all  the history records in
61   //! the transaction <aTrans>
62   Standard_EXPORT TNaming_Iterator(const TDF_Label& aLabel, const Standard_Integer aTrans);
63   
64   //! Returns True if there is a current Item in
65   //! the iteration.
66     Standard_Boolean More() const;
67   
68   //! Moves the iteration to the next Item
69   Standard_EXPORT void Next();
70   
71   //! Returns the old shape in this iterator object.
72   //! This shape can be a null one.
73   Standard_EXPORT const TopoDS_Shape& OldShape() const;
74   
75   //! Returns the new shape in this iterator object.
76   Standard_EXPORT const TopoDS_Shape& NewShape() const;
77   
78   //! Returns true if the  new  shape is a modification  (split,
79   //! fuse,etc...) of the old shape.
80   Standard_EXPORT Standard_Boolean IsModification() const;
81   
82   Standard_EXPORT TNaming_Evolution Evolution() const;
83
84
85 friend class TNaming_NewShapeIterator;
86 friend class TNaming_OldShapeIterator;
87
88
89 protected:
90
91
92
93
94
95 private:
96
97
98
99   TNaming_PtrNode myNode;
100   Standard_Integer myTrans;
101
102
103 };
104
105
106 #include <TNaming_Iterator.lxx>
107
108
109
110
111
112 #endif // _TNaming_Iterator_HeaderFile