File indexing completed on 2026-09-27 09:17:23
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Expr_NamedFunction_HeaderFile
0018 #define _Expr_NamedFunction_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022
0023 #include <TCollection_AsciiString.hxx>
0024 #include <Expr_GeneralFunction.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <NCollection_Array1.hxx>
0027 class Expr_GeneralExpression;
0028 class Expr_NamedUnknown;
0029
0030 class Expr_NamedFunction : public Expr_GeneralFunction
0031 {
0032
0033 public:
0034
0035
0036 Standard_EXPORT Expr_NamedFunction(
0037 const TCollection_AsciiString& name,
0038 const occ::handle<Expr_GeneralExpression>& exp,
0039 const NCollection_Array1<occ::handle<Expr_NamedUnknown>>& vars);
0040
0041
0042 Standard_EXPORT void SetName(const TCollection_AsciiString& newname);
0043
0044
0045 Standard_EXPORT TCollection_AsciiString GetName() const;
0046
0047
0048 Standard_EXPORT int NbOfVariables() const override;
0049
0050
0051
0052
0053 Standard_EXPORT occ::handle<Expr_NamedUnknown> Variable(const int index) const override;
0054
0055
0056
0057
0058 Standard_EXPORT double Evaluate(const NCollection_Array1<occ::handle<Expr_NamedUnknown>>& vars,
0059 const NCollection_Array1<double>& values) const override;
0060
0061
0062 Standard_EXPORT occ::handle<Expr_GeneralFunction> Copy() const override;
0063
0064
0065 Standard_EXPORT occ::handle<Expr_GeneralFunction> Derivative(
0066 const occ::handle<Expr_NamedUnknown>& var) const override;
0067
0068
0069
0070 Standard_EXPORT occ::handle<Expr_GeneralFunction> Derivative(
0071 const occ::handle<Expr_NamedUnknown>& var,
0072 const int deg) const override;
0073
0074
0075
0076 Standard_EXPORT bool IsIdentical(const occ::handle<Expr_GeneralFunction>& func) const override;
0077
0078
0079 Standard_EXPORT bool IsLinearOnVariable(const int index) const override;
0080
0081 Standard_EXPORT TCollection_AsciiString GetStringName() const override;
0082
0083
0084 Standard_EXPORT occ::handle<Expr_GeneralExpression> Expression() const;
0085
0086
0087
0088 Standard_EXPORT void SetExpression(const occ::handle<Expr_GeneralExpression>& exp);
0089
0090 DEFINE_STANDARD_RTTIEXT(Expr_NamedFunction, Expr_GeneralFunction)
0091
0092 private:
0093 TCollection_AsciiString myName;
0094 occ::handle<Expr_GeneralExpression> myExp;
0095 NCollection_Array1<occ::handle<Expr_NamedUnknown>> myVariables;
0096 };
0097
0098 #endif