0032806: Coding - get rid of unused headers [Contap to Extrema]
[occt.git] / src / Expr / Expr_SystemRelation.hxx
1 // Created on: 1991-01-14
2 // Created by: Arnaud BOUZY
3 // Copyright (c) 1991-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 _Expr_SystemRelation_HeaderFile
18 #define _Expr_SystemRelation_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <Expr_SequenceOfGeneralRelation.hxx>
24 #include <Expr_GeneralRelation.hxx>
25 #include <Standard_Integer.hxx>
26 class Expr_GeneralExpression;
27 class Expr_NamedUnknown;
28 class TCollection_AsciiString;
29
30
31 class Expr_SystemRelation;
32 DEFINE_STANDARD_HANDLE(Expr_SystemRelation, Expr_GeneralRelation)
33
34
35 class Expr_SystemRelation : public Expr_GeneralRelation
36 {
37
38 public:
39
40   
41   //! Creates a system with one relation
42   Standard_EXPORT Expr_SystemRelation(const Handle(Expr_GeneralRelation)& relation);
43   
44   //! Appends <relation> in the list of components of <me>.
45   Standard_EXPORT void Add (const Handle(Expr_GeneralRelation)& relation);
46   
47   Standard_EXPORT void Remove (const Handle(Expr_GeneralRelation)& relation);
48   
49   //! Tests if <me> is linear between its NamedUnknowns.
50   Standard_EXPORT Standard_Boolean IsLinear() const Standard_OVERRIDE;
51   
52   //! Returns the number of relations contained in <me>.
53   Standard_EXPORT Standard_Integer NbOfSubRelations() const Standard_OVERRIDE;
54   
55   //! Returns the number of SingleRelations contained in
56   //! <me>.
57   Standard_EXPORT Standard_Integer NbOfSingleRelations() const Standard_OVERRIDE;
58   
59   //! Returns the relation denoted by <index> in <me>.
60   //! An exception is raised if <index> is out of range.
61   Standard_EXPORT Handle(Expr_GeneralRelation) SubRelation (const Standard_Integer index) const Standard_OVERRIDE;
62   
63   Standard_EXPORT Standard_Boolean IsSatisfied() const Standard_OVERRIDE;
64   
65   //! Returns a GeneralRelation after replacement of
66   //! NamedUnknowns by an associated expression, and after
67   //! values computation.
68   Standard_EXPORT Handle(Expr_GeneralRelation) Simplified() const Standard_OVERRIDE;
69   
70   //! Replaces NamedUnknowns by associated expressions,
71   //! and computes values in <me>.
72   Standard_EXPORT void Simplify() Standard_OVERRIDE;
73   
74   //! Returns a copy of <me> having the same unknowns and functions.
75   Standard_EXPORT Handle(Expr_GeneralRelation) Copy() const Standard_OVERRIDE;
76   
77   //! Tests if <me> contains <exp>.
78   Standard_EXPORT Standard_Boolean Contains (const Handle(Expr_GeneralExpression)& exp) const Standard_OVERRIDE;
79   
80   //! Replaces all occurrences of <var> with <with> in <me>.
81   Standard_EXPORT void Replace (const Handle(Expr_NamedUnknown)& var, const Handle(Expr_GeneralExpression)& with) Standard_OVERRIDE;
82   
83   //! returns a string representing <me> in a readable way.
84   Standard_EXPORT TCollection_AsciiString String() const Standard_OVERRIDE;
85
86
87
88
89   DEFINE_STANDARD_RTTIEXT(Expr_SystemRelation,Expr_GeneralRelation)
90
91 protected:
92
93
94
95
96 private:
97
98
99   Expr_SequenceOfGeneralRelation myRelations;
100
101
102 };
103
104
105
106
107
108
109
110 #endif // _Expr_SystemRelation_HeaderFile