0022904: Clean up sccsid variables
[occt.git] / src / Expr / Expr_Different.cxx
1 // Copyright:   Matra-Datavision 1991
2 // File:        Expr_Different.cxx
3 // Created:     Mon Jun 10 17:50:47 1991
4 // Author:      Arnaud BOUZY
5 //              <adn>
6
7 #include <Expr_Different.ixx>
8 #include <Expr.hxx>
9 #include <Expr_GeneralExpression.hxx>
10
11 Expr_Different::Expr_Different (const Handle(Expr_GeneralExpression)& exp1, const Handle(Expr_GeneralExpression)& exp2)
12 {
13   SetFirstMember(exp1);
14   SetSecondMember(exp2);
15 }
16
17 Standard_Boolean Expr_Different::IsSatisfied () const
18 {
19   Handle(Expr_GeneralExpression) fm = FirstMember();
20   Handle(Expr_GeneralExpression) sm = SecondMember();
21   fm = fm->Simplified();
22   sm = sm->Simplified();
23   return (!fm->IsIdentical(sm));
24 }
25
26 Handle(Expr_GeneralRelation) Expr_Different::Simplified () const
27 {
28   Handle(Expr_GeneralExpression) fm = FirstMember();
29   Handle(Expr_GeneralExpression) sm = SecondMember();
30   return new Expr_Different(fm->Simplified(),sm->Simplified());
31 }
32
33 void Expr_Different::Simplify ()
34 {
35   Handle(Expr_GeneralExpression) fm = FirstMember();
36   Handle(Expr_GeneralExpression) sm = SecondMember();
37   SetFirstMember(fm->Simplified());
38   SetSecondMember(sm->Simplified());
39 }
40
41 Handle(Expr_GeneralRelation) Expr_Different::Copy () const
42 {
43   return new Expr_Different(Expr::CopyShare(FirstMember()),
44                             Expr::CopyShare(SecondMember()));
45 }
46
47
48 TCollection_AsciiString Expr_Different::String() const
49 {
50   return FirstMember()->String() + " <> " + SecondMember()->String();
51 }