0031939: Coding - correction of spelling errors in comments [part 6]
[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_Boolean.hxx>
26 #include <Standard_Integer.hxx>
27 class Standard_OutOfRange;
28 class Standard_NoSuchObject;
29 class Standard_DimensionMismatch;
30 class Standard_NumericError;
31 class Expr_GeneralRelation;
32 class Expr_GeneralExpression;
33 class Expr_NamedUnknown;
34 class TCollection_AsciiString;
35
36
37 class Expr_SystemRelation;
38 DEFINE_STANDARD_HANDLE(Expr_SystemRelation, Expr_GeneralRelation)
39
40
41 class Expr_SystemRelation : public Expr_GeneralRelation
42 {
43
44 public:
45
46   
47   //! Creates a system with one relation
48   Standard_EXPORT Expr_SystemRelation(const Handle(Expr_GeneralRelation)& relation);
49   
50   //! Appends <relation> in the list of components of <me>.
51   Standard_EXPORT void Add (const Handle(Expr_GeneralRelation)& relation);
52   
53   Standard_EXPORT void Remove (const Handle(Expr_GeneralRelation)& relation);
54   
55   //! Tests if <me> is linear between its NamedUnknowns.
56   Standard_EXPORT Standard_Boolean IsLinear() const Standard_OVERRIDE;
57   
58   //! Returns the number of relations contained in <me>.
59   Standard_EXPORT Standard_Integer NbOfSubRelations() const Standard_OVERRIDE;
60   
61   //! Returns the number of SingleRelations contained in
62   //! <me>.
63   Standard_EXPORT Standard_Integer NbOfSingleRelations() const Standard_OVERRIDE;
64   
65   //! Returns the relation denoted by <index> in <me>.
66   //! An exception is raised if <index> is out of range.
67   Standard_EXPORT Handle(Expr_GeneralRelation) SubRelation (const Standard_Integer index) const Standard_OVERRIDE;
68   
69   Standard_EXPORT Standard_Boolean IsSatisfied() const Standard_OVERRIDE;
70   
71   //! Returns a GeneralRelation after replacement of
72   //! NamedUnknowns by an associated expression, and after
73   //! values computation.
74   Standard_EXPORT Handle(Expr_GeneralRelation) Simplified() const Standard_OVERRIDE;
75   
76   //! Replaces NamedUnknowns by associated expressions,
77   //! and computes values in <me>.
78   Standard_EXPORT void Simplify() Standard_OVERRIDE;
79   
80   //! Returns a copy of <me> having the same unknowns and functions.
81   Standard_EXPORT Handle(Expr_GeneralRelation) Copy() const Standard_OVERRIDE;
82   
83   //! Tests if <me> contains <exp>.
84   Standard_EXPORT Standard_Boolean Contains (const Handle(Expr_GeneralExpression)& exp) const Standard_OVERRIDE;
85   
86   //! Replaces all occurrences of <var> with <with> in <me>.
87   Standard_EXPORT void Replace (const Handle(Expr_NamedUnknown)& var, const Handle(Expr_GeneralExpression)& with) Standard_OVERRIDE;
88   
89   //! returns a string representing <me> in a readable way.
90   Standard_EXPORT TCollection_AsciiString String() const Standard_OVERRIDE;
91
92
93
94
95   DEFINE_STANDARD_RTTIEXT(Expr_SystemRelation,Expr_GeneralRelation)
96
97 protected:
98
99
100
101
102 private:
103
104
105   Expr_SequenceOfGeneralRelation myRelations;
106
107
108 };
109
110
111
112
113
114
115
116 #endif // _Expr_SystemRelation_HeaderFile