Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:26

0001 // Created on: 1991-01-14
0002 // Created by: Arnaud BOUZY
0003 // Copyright (c) 1991-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Expr_GeneralRelation_HeaderFile
0018 #define _Expr_GeneralRelation_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Transient.hxx>
0024 #include <Standard_Integer.hxx>
0025 class Expr_GeneralExpression;
0026 class Expr_NamedUnknown;
0027 class TCollection_AsciiString;
0028 
0029 
0030 class Expr_GeneralRelation;
0031 DEFINE_STANDARD_HANDLE(Expr_GeneralRelation, Standard_Transient)
0032 
0033 //! Defines the general purposes of any relation between
0034 //! expressions.
0035 class Expr_GeneralRelation : public Standard_Transient
0036 {
0037 
0038 public:
0039 
0040   
0041   //! Returns the current status of the relation
0042   Standard_EXPORT virtual Standard_Boolean IsSatisfied() const = 0;
0043   
0044   //! Tests if <me> is linear between its NamedUnknowns.
0045   Standard_EXPORT virtual Standard_Boolean IsLinear() const = 0;
0046   
0047   //! Returns a GeneralRelation after replacement of
0048   //! NamedUnknowns by an associated expression, and after
0049   //! values computation.
0050   Standard_EXPORT virtual Handle(Expr_GeneralRelation) Simplified() const = 0;
0051   
0052   //! Replaces NamedUnknowns by associated expressions,
0053   //! and computes values in <me>.
0054   Standard_EXPORT virtual void Simplify() = 0;
0055   
0056   //! Returns a copy of <me> having the same unknowns and
0057   //! functions.
0058   Standard_EXPORT virtual Handle(Expr_GeneralRelation) Copy() const = 0;
0059   
0060   //! Returns the number of relations contained in <me>.
0061   Standard_EXPORT virtual Standard_Integer NbOfSubRelations() const = 0;
0062   
0063   //! Returns the number of SingleRelations contained in
0064   //! <me>.
0065   Standard_EXPORT virtual Standard_Integer NbOfSingleRelations() const = 0;
0066   
0067   //! Returns the relation denoted by <index> in <me>.
0068   //! An exception is raised if <index> is out of range.
0069   Standard_EXPORT virtual Handle(Expr_GeneralRelation) SubRelation (const Standard_Integer index) const = 0;
0070   
0071   //! Tests if <exp> contains <var>.
0072   Standard_EXPORT virtual Standard_Boolean Contains (const Handle(Expr_GeneralExpression)& exp) const = 0;
0073   
0074   //! Replaces all occurrences of <var> with <with> in <me>.
0075   Standard_EXPORT virtual void Replace (const Handle(Expr_NamedUnknown)& var, const Handle(Expr_GeneralExpression)& with) = 0;
0076   
0077   //! returns a string representing <me> in a readable way.
0078   Standard_EXPORT virtual TCollection_AsciiString String() const = 0;
0079 
0080 
0081 
0082 
0083   DEFINE_STANDARD_RTTIEXT(Expr_GeneralRelation,Standard_Transient)
0084 
0085 protected:
0086 
0087 
0088 
0089 
0090 private:
0091 
0092 
0093 
0094 
0095 };
0096 
0097 
0098 
0099 
0100 
0101 
0102 
0103 #endif // _Expr_GeneralRelation_HeaderFile