0022904: Clean up sccsid variables
[occt.git] / src / Expr / Expr_RUIterator.cxx
CommitLineData
7fd59977 1// Copyright: Matra-Datavision 1991
2// File: Expr_RUIterator.cxx
3// Created: Thu Jun 13 17:17:50 1991
4// Author: Arnaud BOUZY
5// <adn>
6
7#include <Expr_RUIterator.ixx>
8#include <Standard_NoMoreObject.hxx>
9#include <Standard_NoSuchObject.hxx>
10#include <Expr_RelationIterator.hxx>
11#include <Expr_UnknownIterator.hxx>
12#include <Expr_SingleRelation.hxx>
13#include <Expr.hxx>
14
15Expr_RUIterator::Expr_RUIterator (const Handle(Expr_GeneralRelation)& rel)
16{
17 Expr_RelationIterator ri(rel);
18 Handle(Expr_SingleRelation) srel;
19 Handle(Expr_NamedUnknown) var;
20 myCurrent =1;
21 while (ri.More()) {
22 srel = ri.Value();
23 ri.Next();
24 Expr_UnknownIterator ui1(srel->FirstMember());
25 while (ui1.More()) {
26 var = ui1.Value();
27 ui1.Next();
28 if (!myMap.Contains(var)) {
29 myMap.Add(var);
30 }
31 }
32 Expr_UnknownIterator ui2(srel->SecondMember());
33 while (ui2.More()) {
34 var = ui2.Value();
35 ui2.Next();
36 if (!myMap.Contains(var)) {
37 myMap.Add(var);
38 }
39 }
40 }
41}
42
43Standard_Boolean Expr_RUIterator::More () const
44{
45 return (myCurrent <= myMap.Extent());
46}
47
48void Expr_RUIterator::Next ()
49{
50 if (!More()) {
51 Standard_NoMoreObject::Raise();
52 }
53 myCurrent++;
54}
55
56Handle(Expr_NamedUnknown) Expr_RUIterator::Value () const
57{
58 return myMap(myCurrent);
59}
60