Salome HOME
Last checks of the new option for 3D surf
[tools/medcoupling.git] / src / INTERP_KERNEL / ExprEval / InterpKernelValue.hxx
index 36c484b04bd6841b456236eb25b20d60b1b56b2b..618f94048c764e5ba4a153a2349518f4aaacc1c5 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
@@ -32,37 +32,37 @@ namespace INTERP_KERNEL
   public:
     virtual Value *newInstance() const = 0;
     virtual ~Value() { }
-    virtual void setDouble(double val) throw(INTERP_KERNEL::Exception) = 0;
-    virtual void setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception) = 0;
+    virtual void setDouble(double val) = 0;
+    virtual void setVarname(int fastPos, const std::string& var) = 0;
     //unary
-    virtual void positive() throw(INTERP_KERNEL::Exception) = 0;
-    virtual void negate() throw(INTERP_KERNEL::Exception) = 0;
-    virtual void sqrt() throw(INTERP_KERNEL::Exception) = 0;
-    virtual void cos() throw(INTERP_KERNEL::Exception) = 0;
-    virtual void sin() throw(INTERP_KERNEL::Exception) = 0;
-    virtual void tan() throw(INTERP_KERNEL::Exception) = 0;
-    virtual void acos() throw(INTERP_KERNEL::Exception) = 0;
-    virtual void asin() throw(INTERP_KERNEL::Exception) = 0;
-    virtual void atan() throw(INTERP_KERNEL::Exception) = 0;
-    virtual void cosh() throw(INTERP_KERNEL::Exception) = 0;
-    virtual void sinh() throw(INTERP_KERNEL::Exception) = 0;
-    virtual void tanh() throw(INTERP_KERNEL::Exception) = 0;
-    virtual void abs() throw(INTERP_KERNEL::Exception) = 0;
-    virtual void exp() throw(INTERP_KERNEL::Exception) = 0;
-    virtual void ln() throw(INTERP_KERNEL::Exception) = 0;
-    virtual void log10() throw(INTERP_KERNEL::Exception) = 0;
+    virtual void positive() = 0;
+    virtual void negate() = 0;
+    virtual void sqrt() = 0;
+    virtual void cos() = 0;
+    virtual void sin() = 0;
+    virtual void tan() = 0;
+    virtual void acos() = 0;
+    virtual void asin() = 0;
+    virtual void atan() = 0;
+    virtual void cosh() = 0;
+    virtual void sinh() = 0;
+    virtual void tanh() = 0;
+    virtual void abs() = 0;
+    virtual void exp() = 0;
+    virtual void ln() = 0;
+    virtual void log10() = 0;
     //binary
-    virtual Value *plus(const Value *other) const throw(INTERP_KERNEL::Exception) = 0;
-    virtual Value *minus(const Value *other) const throw(INTERP_KERNEL::Exception) = 0;
-    virtual Value *mult(const Value *other) const throw(INTERP_KERNEL::Exception) = 0;
-    virtual Value *div(const Value *other) const throw(INTERP_KERNEL::Exception) = 0;
-    virtual Value *pow(const Value *other) const throw(INTERP_KERNEL::Exception) = 0;
-    virtual Value *max(const Value *other) const throw(INTERP_KERNEL::Exception) = 0;
-    virtual Value *min(const Value *other) const throw(INTERP_KERNEL::Exception) = 0;
-    virtual Value *greaterThan(const Value *other) const throw(INTERP_KERNEL::Exception) = 0;
-    virtual Value *lowerThan(const Value *other) const throw(INTERP_KERNEL::Exception) = 0;
+    virtual Value *plus(const Value *other) const = 0;
+    virtual Value *minus(const Value *other) const = 0;
+    virtual Value *mult(const Value *other) const = 0;
+    virtual Value *div(const Value *other) const = 0;
+    virtual Value *pow(const Value *other) const = 0;
+    virtual Value *max(const Value *other) const = 0;
+    virtual Value *min(const Value *other) const = 0;
+    virtual Value *greaterThan(const Value *other) const = 0;
+    virtual Value *lowerThan(const Value *other) const = 0;
     //ternary
-    virtual Value *ifFunc(const Value *the, const Value *els) const throw(INTERP_KERNEL::Exception) = 0;
+    virtual Value *ifFunc(const Value *the, const Value *els) const = 0;
   };
 
   class INTERPKERNEL_EXPORT ValueDouble : public Value
@@ -70,86 +70,86 @@ namespace INTERP_KERNEL
   public:
     ValueDouble();
     Value *newInstance() const;
-    void setDouble(double val) throw(INTERP_KERNEL::Exception);
-    void setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception);
+    void setDouble(double val);
+    void setVarname(int fastPos, const std::string& var);
     //
     double getData() const { return _data; }
-    void positive() throw(INTERP_KERNEL::Exception);
-    void negate() throw(INTERP_KERNEL::Exception);
-    void sqrt() throw(INTERP_KERNEL::Exception);
-    void cos() throw(INTERP_KERNEL::Exception);
-    void sin() throw(INTERP_KERNEL::Exception);
-    void tan() throw(INTERP_KERNEL::Exception);
-    void acos() throw(INTERP_KERNEL::Exception);
-    void asin() throw(INTERP_KERNEL::Exception);
-    void atan() throw(INTERP_KERNEL::Exception);
-    void cosh() throw(INTERP_KERNEL::Exception);
-    void sinh() throw(INTERP_KERNEL::Exception);
-    void tanh() throw(INTERP_KERNEL::Exception);
-    void abs() throw(INTERP_KERNEL::Exception);
-    void exp() throw(INTERP_KERNEL::Exception);
-    void ln() throw(INTERP_KERNEL::Exception);
-    void log10() throw(INTERP_KERNEL::Exception);
+    void positive();
+    void negate();
+    void sqrt();
+    void cos();
+    void sin();
+    void tan();
+    void acos();
+    void asin();
+    void atan();
+    void cosh();
+    void sinh();
+    void tanh();
+    void abs();
+    void exp();
+    void ln();
+    void log10();
     //
-    Value *plus(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *minus(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *mult(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *div(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *pow(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *max(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *min(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *greaterThan(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *lowerThan(const Value *other) const throw(INTERP_KERNEL::Exception);
+    Value *plus(const Value *other) const;
+    Value *minus(const Value *other) const;
+    Value *mult(const Value *other) const;
+    Value *div(const Value *other) const;
+    Value *pow(const Value *other) const;
+    Value *max(const Value *other) const;
+    Value *min(const Value *other) const;
+    Value *greaterThan(const Value *other) const;
+    Value *lowerThan(const Value *other) const;
     //
-    Value *ifFunc(const Value *the, const Value *els) const throw(INTERP_KERNEL::Exception);
+    Value *ifFunc(const Value *the, const Value *els) const;
   private:
     ValueDouble(double val);
-    static const ValueDouble *checkSameType(const Value *val) throw(INTERP_KERNEL::Exception);
+    static const ValueDouble *checkSameType(const Value *val);
   private:
     double _data;
   };
 
-  class INTERPKERNEL_EXPORT ValueUnit : public Value
+  class ValueUnit : public Value
   {
   public:
-    ValueUnit();
-    Value *newInstance() const;
-    void setDouble(double val) throw(INTERP_KERNEL::Exception);
-    void setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception);
+    INTERPKERNEL_EXPORT ValueUnit();
+    INTERPKERNEL_EXPORT Value *newInstance() const;
+    INTERPKERNEL_EXPORT void setDouble(double val);
+    INTERPKERNEL_EXPORT void setVarname(int fastPos, const std::string& var);
     //
-    DecompositionInUnitBase getData() const { return _data; }
-    void positive() throw(INTERP_KERNEL::Exception);
-    void negate() throw(INTERP_KERNEL::Exception);
-    void sqrt() throw(INTERP_KERNEL::Exception);
-    void cos() throw(INTERP_KERNEL::Exception);
-    void sin() throw(INTERP_KERNEL::Exception);
-    void tan() throw(INTERP_KERNEL::Exception);
-    void acos() throw(INTERP_KERNEL::Exception);
-    void asin() throw(INTERP_KERNEL::Exception);
-    void atan() throw(INTERP_KERNEL::Exception);
-    void cosh() throw(INTERP_KERNEL::Exception);
-    void sinh() throw(INTERP_KERNEL::Exception);
-    void tanh() throw(INTERP_KERNEL::Exception);
-    void abs() throw(INTERP_KERNEL::Exception);
-    void exp() throw(INTERP_KERNEL::Exception);
-    void ln() throw(INTERP_KERNEL::Exception);
-    void log10() throw(INTERP_KERNEL::Exception);
+    INTERPKERNEL_EXPORT DecompositionInUnitBase getData() const { return _data; }
+    INTERPKERNEL_EXPORT void positive();
+    INTERPKERNEL_EXPORT void negate();
+    INTERPKERNEL_EXPORT void sqrt();
+    INTERPKERNEL_EXPORT void cos();
+    INTERPKERNEL_EXPORT void sin();
+    INTERPKERNEL_EXPORT void tan();
+    INTERPKERNEL_EXPORT void acos();
+    INTERPKERNEL_EXPORT void asin();
+    INTERPKERNEL_EXPORT void atan();
+    INTERPKERNEL_EXPORT void cosh();
+    INTERPKERNEL_EXPORT void sinh();
+    INTERPKERNEL_EXPORT void tanh();
+    INTERPKERNEL_EXPORT void abs();
+    INTERPKERNEL_EXPORT void exp();
+    INTERPKERNEL_EXPORT void ln();
+    INTERPKERNEL_EXPORT void log10();
     //
-    Value *plus(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *minus(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *mult(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *div(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *pow(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *max(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *min(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *greaterThan(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *lowerThan(const Value *other) const throw(INTERP_KERNEL::Exception);
+    INTERPKERNEL_EXPORT Value *plus(const Value *other) const;
+    INTERPKERNEL_EXPORT Value *minus(const Value *other) const;
+    INTERPKERNEL_EXPORT Value *mult(const Value *other) const;
+    INTERPKERNEL_EXPORT Value *div(const Value *other) const;
+    INTERPKERNEL_EXPORT Value *pow(const Value *other) const;
+    INTERPKERNEL_EXPORT Value *max(const Value *other) const;
+    INTERPKERNEL_EXPORT Value *min(const Value *other) const;
+    INTERPKERNEL_EXPORT Value *greaterThan(const Value *other) const;
+    INTERPKERNEL_EXPORT Value *lowerThan(const Value *other) const;
     //
-    Value *ifFunc(const Value *the, const Value *els) const throw(INTERP_KERNEL::Exception);
+    INTERPKERNEL_EXPORT Value *ifFunc(const Value *the, const Value *els) const;
   private:
     ValueUnit(const DecompositionInUnitBase& unit);
-    static void unsupportedOp(const char *type) throw(INTERP_KERNEL::Exception);
-    static const ValueUnit *checkSameType(const Value *val) throw(INTERP_KERNEL::Exception);
+    static void unsupportedOp(const char *type);
+    static const ValueUnit *checkSameType(const Value *val);
   private:
     DecompositionInUnitBase _data;
   };
@@ -161,37 +161,37 @@ namespace INTERP_KERNEL
     ~ValueDoubleExpr();
     double *getData() const { return _dest_data; }
     Value *newInstance() const;
-    void setDouble(double val) throw(INTERP_KERNEL::Exception);
-    void setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception);
+    void setDouble(double val);
+    void setVarname(int fastPos, const std::string& var);
     //
-    void positive() throw(INTERP_KERNEL::Exception);
-    void negate() throw(INTERP_KERNEL::Exception);
-    void sqrt() throw(INTERP_KERNEL::Exception);
-    void cos() throw(INTERP_KERNEL::Exception);
-    void sin() throw(INTERP_KERNEL::Exception);
-    void tan() throw(INTERP_KERNEL::Exception);
-    void acos() throw(INTERP_KERNEL::Exception);
-    void asin() throw(INTERP_KERNEL::Exception);
-    void atan() throw(INTERP_KERNEL::Exception);
-    void cosh() throw(INTERP_KERNEL::Exception);
-    void sinh() throw(INTERP_KERNEL::Exception);
-    void tanh() throw(INTERP_KERNEL::Exception);
-    void abs() throw(INTERP_KERNEL::Exception);
-    void exp() throw(INTERP_KERNEL::Exception);
-    void ln() throw(INTERP_KERNEL::Exception);
-    void log10() throw(INTERP_KERNEL::Exception);
+    void positive();
+    void negate();
+    void sqrt();
+    void cos();
+    void sin();
+    void tan();
+    void acos();
+    void asin();
+    void atan();
+    void cosh();
+    void sinh();
+    void tanh();
+    void abs();
+    void exp();
+    void ln();
+    void log10();
     //
-    Value *plus(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *minus(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *mult(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *div(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *pow(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *max(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *min(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *greaterThan(const Value *other) const throw(INTERP_KERNEL::Exception);
-    Value *lowerThan(const Value *other) const throw(INTERP_KERNEL::Exception);
+    Value *plus(const Value *other) const;
+    Value *minus(const Value *other) const;
+    Value *mult(const Value *other) const;
+    Value *div(const Value *other) const;
+    Value *pow(const Value *other) const;
+    Value *max(const Value *other) const;
+    Value *min(const Value *other) const;
+    Value *greaterThan(const Value *other) const;
+    Value *lowerThan(const Value *other) const;
     //
-    Value *ifFunc(const Value *the, const Value *els) const throw(INTERP_KERNEL::Exception);
+    Value *ifFunc(const Value *the, const Value *els) const;
   private:
     int _sz_dest_data;
     double *_dest_data;