Salome HOME
Last checks of the new option for 3D surf
[tools/medcoupling.git] / src / INTERP_KERNEL / ExprEval / InterpKernelFunction.hxx
index f49c7594303c42938b811afe329a78610ecfe7f7..95ccbbd997f5e385d658becd242c6ebb9d5d2dc6 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -34,12 +34,12 @@ namespace INTERP_KERNEL
   class INTERPKERNEL_EXPORT FunctionsFactory
   {
   public:
-    static Function *buildFuncFromString(const char *type, int nbOfParams) throw(INTERP_KERNEL::Exception);
-    static Function *buildUnaryFuncFromString(const char *type) throw(INTERP_KERNEL::Exception);
-    //static Function *buildUnaryFuncFromString(char type) throw(INTERP_KERNEL::Exception);
-    static Function *buildBinaryFuncFromString(const char *type) throw(INTERP_KERNEL::Exception);
-    static Function *buildBinaryFuncFromString(char type) throw(INTERP_KERNEL::Exception);
-    static Function *buildTernaryFuncFromString(const char *type) throw(INTERP_KERNEL::Exception);
+    static Function *buildFuncFromString(const char *type, int nbOfParams);
+    static Function *buildUnaryFuncFromString(const char *type);
+    //static Function *buildUnaryFuncFromString(char type);
+    static Function *buildBinaryFuncFromString(const char *type);
+    static Function *buildBinaryFuncFromString(char type);
+    static Function *buildTernaryFuncFromString(const char *type);
   };
 
   class INTERPKERNEL_EXPORT Function
@@ -47,8 +47,8 @@ namespace INTERP_KERNEL
   public:
     virtual ~Function();
     virtual int getNbInputParams() const = 0;
-    virtual void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception) = 0;
-    virtual void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception) = 0;
+    virtual void operate(std::vector<Value *>& stack) const = 0;
+    virtual void operateX86(std::vector<std::string>& asmb) const = 0;
     virtual const char *getRepr() const = 0;
     virtual bool isACall() const = 0;
   };
@@ -63,8 +63,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~IdentityFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -75,8 +75,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~PositiveFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -87,8 +87,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~NegateFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -99,8 +99,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~CosFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -111,8 +111,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~SinFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -123,8 +123,80 @@ namespace INTERP_KERNEL
   {
   public:
     ~TanFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
+    const char *getRepr() const;
+    bool isACall() const;
+  public:
+    static const char REPR[];
+  };
+
+  class INTERPKERNEL_EXPORT ACosFunction : public UnaryFunction
+  {
+  public:
+    ~ACosFunction();
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
+    const char *getRepr() const;
+    bool isACall() const;
+  public:
+    static const char REPR[];
+  };
+
+  class INTERPKERNEL_EXPORT ASinFunction : public UnaryFunction
+  {
+  public:
+    ~ASinFunction();
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
+    const char *getRepr() const;
+    bool isACall() const;
+  public:
+    static const char REPR[];
+  };
+
+  class INTERPKERNEL_EXPORT ATanFunction : public UnaryFunction
+  {
+  public:
+    ~ATanFunction();
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
+    const char *getRepr() const;
+    bool isACall() const;
+  public:
+    static const char REPR[];
+  };
+
+  class INTERPKERNEL_EXPORT CoshFunction : public UnaryFunction
+  {
+  public:
+    ~CoshFunction();
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
+    const char *getRepr() const;
+    bool isACall() const;
+  public:
+    static const char REPR[];
+  };
+
+  class INTERPKERNEL_EXPORT SinhFunction : public UnaryFunction
+  {
+  public:
+    ~SinhFunction();
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
+    const char *getRepr() const;
+    bool isACall() const;
+  public:
+    static const char REPR[];
+  };
+
+  class INTERPKERNEL_EXPORT TanhFunction : public UnaryFunction
+  {
+  public:
+    ~TanhFunction();
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -135,8 +207,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~SqrtFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -147,8 +219,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~AbsFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -159,8 +231,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~ExpFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -171,8 +243,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~LnFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -183,8 +255,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~LogFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -195,8 +267,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~Log10Function();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -213,8 +285,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~PlusFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -225,8 +297,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~MinusFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -237,8 +309,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~MultFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -249,8 +321,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~DivFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -261,8 +333,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~PowFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -273,8 +345,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~MaxFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -285,8 +357,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~MinFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -297,8 +369,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~GreaterThanFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -309,8 +381,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~LowerThanFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public:
@@ -327,8 +399,8 @@ namespace INTERP_KERNEL
   {
   public:
     ~IfFunction();
-    void operate(std::vector<Value *>& stack) const throw(INTERP_KERNEL::Exception);
-    void operateX86(std::vector<std::string>& asmb) const throw(INTERP_KERNEL::Exception);
+    void operate(std::vector<Value *>& stack) const;
+    void operateX86(std::vector<std::string>& asmb) const;
     const char *getRepr() const;
     bool isACall() const;
   public: