0022904: Clean up sccsid variables
[occt.git] / src / Expr / Expr_Different.cxx
CommitLineData
7fd59977 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
11Expr_Different::Expr_Different (const Handle(Expr_GeneralExpression)& exp1, const Handle(Expr_GeneralExpression)& exp2)
12{
13 SetFirstMember(exp1);
14 SetSecondMember(exp2);
15}
16
17Standard_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
26Handle(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
33void 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
41Handle(Expr_GeneralRelation) Expr_Different::Copy () const
42{
43 return new Expr_Different(Expr::CopyShare(FirstMember()),
44 Expr::CopyShare(SecondMember()));
45}
46
47
48TCollection_AsciiString Expr_Different::String() const
49{
50 return FirstMember()->String() + " <> " + SecondMember()->String();
51}