From: ageay Date: Fri, 23 Aug 2013 09:53:32 +0000 (+0000) Subject: Unwarningization under Win. X-Git-Tag: B4AnonymousThrowMDL~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4b6699e15c397706bb87d130baa71c55594a7e04;p=modules%2Fmed.git Unwarningization under Win. --- diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelAsmX86.cxx b/src/INTERP_KERNEL/ExprEval/InterpKernelAsmX86.cxx index 92a70e993..12e2acb31 100644 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelAsmX86.cxx +++ b/src/INTERP_KERNEL/ExprEval/InterpKernelAsmX86.cxx @@ -34,7 +34,7 @@ const char *INTERP_KERNEL::AsmX86::OPS[NB_OF_OPS]={"mov","push","pop","fld","faddp","fsubp","fmulp","fdivp","fcos","fsin","fabs","fchs","fsqrt","sub","add","ret","leave","movsd","fst"}; -std::vector INTERP_KERNEL::AsmX86::convertIntoMachineLangage(const std::vector& asmb) const throw(INTERP_KERNEL::Exception) +std::vector INTERP_KERNEL::AsmX86::convertIntoMachineLangage(const std::vector& asmb) const { std::vector ret; for(std::vector::const_iterator iter=asmb.begin();iter!=asmb.end();iter++) @@ -59,7 +59,7 @@ char *INTERP_KERNEL::AsmX86::copyToExecMemZone(const std::vector& ml, unsi return ret; } -void INTERP_KERNEL::AsmX86::convertOneInstructionInML(const std::string& inst, std::vector& ml) const throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertOneInstructionInML(const std::string& inst, std::vector& ml) const { std::string::size_type pos=inst.find_first_of(' '); std::string op; @@ -147,7 +147,7 @@ void INTERP_KERNEL::AsmX86::convertOneInstructionInML(const std::string& inst, s #include -void INTERP_KERNEL::AsmX86::convertMov(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertMov(const std::string& inst, std::vector& ml) { const char ASM1[]="ebp,esp"; const unsigned char ML1[2]={0x89,0xe5}; @@ -181,7 +181,7 @@ void INTERP_KERNEL::AsmX86::convertMov(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertMovToEsp(const std::string& inst1, const std::string& inst2, std::vector& ml) { if(inst1[0]!='[' || inst1[inst1.length()-1]!=']') throw INTERP_KERNEL::Exception("not recognized convertMovToEsp exp !"); @@ -235,7 +235,7 @@ void INTERP_KERNEL::AsmX86::convertMovToEsp(const std::string& inst1, const std: throw INTERP_KERNEL::Exception("Not recognized exp : mov"); } -void INTERP_KERNEL::AsmX86::convertPush(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertPush(const std::string& inst, std::vector& ml) { std::string::size_type pos=inst.find_first_of(' '); std::string inst2=inst.substr(pos+1); @@ -263,7 +263,7 @@ void INTERP_KERNEL::AsmX86::convertPush(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertPop(const std::string& inst, std::vector& ml) { std::string::size_type pos=inst.find_first_of(' '); std::string inst2=inst.substr(pos+1); @@ -284,7 +284,7 @@ void INTERP_KERNEL::AsmX86::convertPop(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertFld(const std::string& inst, std::vector& ml) { std::string::size_type pos=inst.find_first_of(' '); std::string params=inst.substr(pos+1); @@ -335,61 +335,61 @@ void INTERP_KERNEL::AsmX86::convertFld(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertFaddp(const std::string& inst, std::vector& ml) { const unsigned char ML1[2]={0xde,0xc1}; ml.insert(ml.end(),ML1,ML1+sizeof(ML1)); } -void INTERP_KERNEL::AsmX86::convertFsubp(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertFsubp(const std::string& inst, std::vector& ml) { const unsigned char ML1[2]={0xde,0xe9}; ml.insert(ml.end(),ML1,ML1+sizeof(ML1)); } -void INTERP_KERNEL::AsmX86::convertFmulp(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertFmulp(const std::string& inst, std::vector& ml) { const unsigned char ML1[2]={0xde,0xc9}; ml.insert(ml.end(),ML1,ML1+sizeof(ML1)); } -void INTERP_KERNEL::AsmX86::convertFdivp(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertFdivp(const std::string& inst, std::vector& ml) { const unsigned char ML1[2]={0xde,0xf9}; ml.insert(ml.end(),ML1,ML1+sizeof(ML1)); } -void INTERP_KERNEL::AsmX86::convertFcos(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertFcos(const std::string& inst, std::vector& ml) { const unsigned char ML[2]={0xd9,0xff}; ml.insert(ml.end(),ML,ML+sizeof(ML)); } -void INTERP_KERNEL::AsmX86::convertFsin(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertFsin(const std::string& inst, std::vector& ml) { const unsigned char ML[2]={0xd9,0xfe}; ml.insert(ml.end(),ML,ML+sizeof(ML)); } -void INTERP_KERNEL::AsmX86::convertFabs(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertFabs(const std::string& inst, std::vector& ml) { const unsigned char ML[2]={0xd9,0xe1}; ml.insert(ml.end(),ML,ML+sizeof(ML)); } -void INTERP_KERNEL::AsmX86::convertFchs(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertFchs(const std::string& inst, std::vector& ml) { const unsigned char ML[2]={0xd9,0xe0}; ml.insert(ml.end(),ML,ML+sizeof(ML)); } -void INTERP_KERNEL::AsmX86::convertFsqrt(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertFsqrt(const std::string& inst, std::vector& ml) { const unsigned char ML[2]={0xd9,0xfa}; ml.insert(ml.end(),ML,ML+sizeof(ML)); } -void INTERP_KERNEL::AsmX86::convertSub(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertSub(const std::string& inst, std::vector& ml) { if(inst.substr(0,4)=="esp,") { @@ -408,7 +408,7 @@ void INTERP_KERNEL::AsmX86::convertSub(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertAdd(const std::string& inst, std::vector& ml) { if(inst.substr(0,4)=="esp,") { @@ -427,19 +427,19 @@ void INTERP_KERNEL::AsmX86::convertAdd(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertRet(const std::string& inst, std::vector& ml) { const unsigned char ML[1]={0xc3}; ml.insert(ml.end(),ML,ML+sizeof(ML)); } -void INTERP_KERNEL::AsmX86::convertLeave(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertLeave(const std::string& inst, std::vector& ml) { const unsigned char ML[1]={0xc9}; ml.insert(ml.end(),ML,ML+sizeof(ML)); } -void INTERP_KERNEL::AsmX86::convertMovsd(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertMovsd(const std::string& inst, std::vector& ml) { const char ASM1[]="[rsp],xmm0"; const unsigned char ML1[5]={0xf2,0x0f,0x11,0x04,0x24}; @@ -459,7 +459,7 @@ void INTERP_KERNEL::AsmX86::convertMovsd(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::convertFst(const std::string& inst, std::vector& ml) { const char ASM1[]="qword [rsp]"; const unsigned char ML1[3]={0xdd,0x14,0x24}; @@ -474,7 +474,7 @@ void INTERP_KERNEL::AsmX86::convertFst(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception) +void INTERP_KERNEL::AsmX86::appendAddress(const std::string& addr, int nbOfByte, std::vector& ml) { int i,j; char v; diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelAsmX86.hxx b/src/INTERP_KERNEL/ExprEval/InterpKernelAsmX86.hxx index 7ae47ac60..f538f0b38 100644 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelAsmX86.hxx +++ b/src/INTERP_KERNEL/ExprEval/InterpKernelAsmX86.hxx @@ -32,33 +32,33 @@ namespace INTERP_KERNEL class AsmX86 { public: - std::vector convertIntoMachineLangage(const std::vector& asmb) const throw(INTERP_KERNEL::Exception); + std::vector convertIntoMachineLangage(const std::vector& asmb) const; char *copyToExecMemZone(const std::vector& ml, unsigned& offset) const; private: - void convertOneInstructionInML(const std::string& inst, std::vector& ml) const throw(INTERP_KERNEL::Exception); + void convertOneInstructionInML(const std::string& inst, std::vector& ml) const; private: - static void convertMov(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertPush(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertPop(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertFld(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertFaddp(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertFsubp(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertFmulp(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertFdivp(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertFcos(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertFsin(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertFabs(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertFchs(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertFsqrt(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertSub(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertAdd(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertRet(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertLeave(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertMovsd(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void convertFst(const std::string& inst, std::vector& ml) throw(INTERP_KERNEL::Exception); + static void convertMov(const std::string& inst, std::vector& ml); + static void convertPush(const std::string& inst, std::vector& ml); + static void convertPop(const std::string& inst, std::vector& ml); + static void convertFld(const std::string& inst, std::vector& ml); + static void convertFaddp(const std::string& inst, std::vector& ml); + static void convertFsubp(const std::string& inst, std::vector& ml); + static void convertFmulp(const std::string& inst, std::vector& ml); + static void convertFdivp(const std::string& inst, std::vector& ml); + static void convertFcos(const std::string& inst, std::vector& ml); + static void convertFsin(const std::string& inst, std::vector& ml); + static void convertFabs(const std::string& inst, std::vector& ml); + static void convertFchs(const std::string& inst, std::vector& ml); + static void convertFsqrt(const std::string& inst, std::vector& ml); + static void convertSub(const std::string& inst, std::vector& ml); + static void convertAdd(const std::string& inst, std::vector& ml); + static void convertRet(const std::string& inst, std::vector& ml); + static void convertLeave(const std::string& inst, std::vector& ml); + static void convertMovsd(const std::string& inst, std::vector& ml); + static void convertFst(const std::string& inst, std::vector& ml); // - static void convertMovToEsp(const std::string& inst1, const std::string& inst2, std::vector& ml) throw(INTERP_KERNEL::Exception); - static void appendAddress(const std::string& addr, int nbOfByte, std::vector& ml) throw(INTERP_KERNEL::Exception); + static void convertMovToEsp(const std::string& inst1, const std::string& inst2, std::vector& ml); + static void appendAddress(const std::string& addr, int nbOfByte, std::vector& ml); private: static const int NB_OF_OPS=19; static const char *OPS[NB_OF_OPS]; diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.cxx b/src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.cxx index c29ceffad..42630e3ab 100644 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.cxx +++ b/src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.cxx @@ -38,7 +38,7 @@ const char ExprParser::WHITE_SPACES[]=" \n"; const char ExprParser::EXPR_PARSE_ERR_MSG[]="Invalid expression detected : "; -LeafExpr *LeafExpr::buildInstanceFrom(const std::string& expr) throw(INTERP_KERNEL::Exception) +LeafExpr *LeafExpr::buildInstanceFrom(const std::string& expr) { std::istringstream stream; stream.str(expr); @@ -70,12 +70,12 @@ LeafExprVal::~LeafExprVal() { } -void LeafExprVal::fillValue(Value *val) const throw(INTERP_KERNEL::Exception) +void LeafExprVal::fillValue(Value *val) const { val->setDouble(_value); } -void LeafExprVal::replaceValues(const std::vector& valuesInExpr) throw(INTERP_KERNEL::Exception) +void LeafExprVal::replaceValues(const std::vector& valuesInExpr) { int pos=(int)_value; int lgth=(int)valuesInExpr.size(); @@ -88,12 +88,12 @@ LeafExprVar::LeafExprVar(const std::string& var):_fast_pos(-1),_var_name(var) { } -void LeafExprVar::fillValue(Value *val) const throw(INTERP_KERNEL::Exception) +void LeafExprVar::fillValue(Value *val) const { val->setVarname(_fast_pos,_var_name); } -void LeafExprVar::prepareExprEvaluation(const std::vector& vars, int nbOfCompo, int targetNbOfCompo) const throw(INTERP_KERNEL::Exception) +void LeafExprVar::prepareExprEvaluation(const std::vector& vars, int nbOfCompo, int targetNbOfCompo) const { std::vector::const_iterator iter=std::find(vars.begin(),vars.end(),_var_name); if(iter==vars.end()) @@ -125,7 +125,7 @@ void LeafExprVar::prepareExprEvaluation(const std::vector& vars, in } } -void LeafExprVar::prepareExprEvaluationVec() const throw(INTERP_KERNEL::Exception) +void LeafExprVar::prepareExprEvaluationVec() const { if(!isRecognizedKeyVar(_var_name,_fast_pos)) _fast_pos=-2; @@ -148,7 +148,7 @@ bool LeafExprVar::isRecognizedKeyVar(const std::string& var, int& pos) /*! * Nothing to do it is not a bug. */ -void LeafExprVar::replaceValues(const std::vector& valuesInExpr) throw(INTERP_KERNEL::Exception) +void LeafExprVar::replaceValues(const std::vector& valuesInExpr) { } @@ -225,7 +225,7 @@ std::string ExprParser::deleteWhiteSpaces(const std::string& expr) return ret; } -void ExprParser::parse() throw(INTERP_KERNEL::Exception) +void ExprParser::parse() { _is_parsed=true; _is_parsing_ok=false; @@ -245,7 +245,7 @@ void ExprParser::parse() throw(INTERP_KERNEL::Exception) _is_parsing_ok=true; } -double ExprParser::evaluate() const throw(INTERP_KERNEL::Exception) +double ExprParser::evaluate() const { Value *gen=new ValueDouble; ValueDouble *res=(ValueDouble *)evaluateLowLev(gen); @@ -255,7 +255,7 @@ double ExprParser::evaluate() const throw(INTERP_KERNEL::Exception) return ret; } -DecompositionInUnitBase ExprParser::evaluateUnit() const throw(INTERP_KERNEL::Exception) +DecompositionInUnitBase ExprParser::evaluateUnit() const { Value *gen=new ValueUnit; ValueUnit *res=0; @@ -274,7 +274,7 @@ DecompositionInUnitBase ExprParser::evaluateUnit() const throw(INTERP_KERNEL::Ex return ret; } -void ExprParser::evaluateExpr(int szOfOutParam, const double *inParam, double *outParam) const throw(INTERP_KERNEL::Exception) +void ExprParser::evaluateExpr(int szOfOutParam, const double *inParam, double *outParam) const { Value *gen=new ValueDoubleExpr(szOfOutParam,inParam); ValueDoubleExpr *res=0; @@ -292,7 +292,7 @@ void ExprParser::evaluateExpr(int szOfOutParam, const double *inParam, double *o delete res; } -void ExprParser::prepareExprEvaluation(const std::vector& vars, int nbOfCompo, int targetNbOfCompo) const throw(INTERP_KERNEL::Exception) +void ExprParser::prepareExprEvaluation(const std::vector& vars, int nbOfCompo, int targetNbOfCompo) const { if(_leaf) { @@ -305,7 +305,7 @@ void ExprParser::prepareExprEvaluation(const std::vector& vars, int (*iter).prepareExprEvaluation(vars,nbOfCompo,targetNbOfCompo); } -void ExprParser::prepareExprEvaluationVec() const throw(INTERP_KERNEL::Exception) +void ExprParser::prepareExprEvaluationVec() const { std::set trueVars; getTrueSetOfVars(trueVars); @@ -319,7 +319,7 @@ void ExprParser::prepareExprEvaluationVec() const throw(INTERP_KERNEL::Exception prepareExprEvaluationVecLowLev(); } -void ExprParser::prepareExprEvaluationVecLowLev() const throw(INTERP_KERNEL::Exception) +void ExprParser::prepareExprEvaluationVecLowLev() const { if(_leaf) { @@ -332,7 +332,7 @@ void ExprParser::prepareExprEvaluationVecLowLev() const throw(INTERP_KERNEL::Exc (*iter).prepareExprEvaluationVecLowLev(); } -Value *ExprParser::evaluateLowLev(Value *valGen) const throw(INTERP_KERNEL::Exception) +Value *ExprParser::evaluateLowLev(Value *valGen) const { if(!_is_parsing_ok) throw INTERP_KERNEL::Exception("Parsing fails ! Invalid expression !"); @@ -402,7 +402,7 @@ void ExprParser::getTrueSetOfVars(std::set& trueVars) const } } -void ExprParser::parseDeeper() throw(INTERP_KERNEL::Exception) +void ExprParser::parseDeeper() { for(std::list::iterator iter=_sub_expr.begin();iter!=_sub_expr.end();iter++) if(!(*iter).simplify()) @@ -414,7 +414,7 @@ void ExprParser::parseDeeper() throw(INTERP_KERNEL::Exception) * Something defined as the contain of highest level barckets. * Typically '(3*x+2)' and 'cos(4*l+p*n)' will be intercepted by this method whereas '3*x+2' not...etc.. */ -void ExprParser::parseUnaryFunc() throw(INTERP_KERNEL::Exception) +void ExprParser::parseUnaryFunc() { if(_expr[_expr.length()-1]!=')') return ; @@ -461,7 +461,7 @@ void ExprParser::parseUnaryFunc() throw(INTERP_KERNEL::Exception) * \return true if no recursion needed, false if this->_expr is too complex to be interpreted at this level. * \throw exception if this->_expr is simple enough to try to interprate this and this expression contains an error. */ -bool ExprParser::tryToInterpALeaf() throw(INTERP_KERNEL::Exception) +bool ExprParser::tryToInterpALeaf() { std::size_t pos=_expr.find_first_not_of("+-",0,2); std::string minimizedExpr=_expr.substr(pos); @@ -480,7 +480,7 @@ bool ExprParser::tryToInterpALeaf() throw(INTERP_KERNEL::Exception) return true; } -void ExprParser::parseForCmp() throw(INTERP_KERNEL::Exception) +void ExprParser::parseForCmp() { std::string::const_iterator iter; int curLevel=0; @@ -540,7 +540,7 @@ void ExprParser::parseForCmp() throw(INTERP_KERNEL::Exception) } } -void ExprParser::parseForAddMin() throw(INTERP_KERNEL::Exception) +void ExprParser::parseForAddMin() { std::string::const_iterator iter; int curLevel=0; @@ -602,7 +602,7 @@ void ExprParser::parseForAddMin() throw(INTERP_KERNEL::Exception) } } -void ExprParser::parseForMulDiv() throw(INTERP_KERNEL::Exception) +void ExprParser::parseForMulDiv() { std::string::const_iterator iter; int curLevel=0; @@ -665,7 +665,7 @@ void ExprParser::parseForMulDiv() throw(INTERP_KERNEL::Exception) } } -void ExprParser::parseForPow() throw(INTERP_KERNEL::Exception) +void ExprParser::parseForPow() { std::string::const_iterator iter; int curLevel=0; @@ -737,7 +737,7 @@ void ExprParser::releaseFunctions() * This method first try to see if this->_expr is a leaf, if not it try a unary function of something (see INTERP_KERNEL::ExprParser::parseUnaryFunc method) * If true is returned, no deeper parsing needed, if false is returned for a full parsing of this->_expr INTERP_KERNEL::ExprParser::parseDeeper call needed. */ -bool ExprParser::simplify() throw(INTERP_KERNEL::Exception) +bool ExprParser::simplify() { if(tryToInterpALeaf()) return true; @@ -767,7 +767,7 @@ bool ExprParser::simplify() throw(INTERP_KERNEL::Exception) return false; } -void ExprParser::checkBracketsParity() const throw(INTERP_KERNEL::Exception) +void ExprParser::checkBracketsParity() const { std::string::const_iterator iter; int curLevel=0; @@ -802,7 +802,7 @@ void ExprParser::checkBracketsParity() const throw(INTERP_KERNEL::Exception) * If double representation is invalid an exception is thrown. * This method returns a delta that is the delta to operate to pos in expr after substitution. */ -double ExprParser::ReplaceAndTraduce(std::string& expr, int id, std::size_t bg, std::size_t end, int& delta) throw(INTERP_KERNEL::Exception) +double ExprParser::ReplaceAndTraduce(std::string& expr, int id, std::size_t bg, std::size_t end, int& delta) { static const char MSG[]="Interal error : A string expected to be a float is not one ! Bug to signal !"; std::istringstream stream; @@ -829,7 +829,7 @@ double ExprParser::ReplaceAndTraduce(std::string& expr, int id, std::size_t bg, * This method scans _expr finding in greedy mode the following pattern : * {0..9}+{.}?{0..9}*{{eE}{-}?{0..9}+}? */ -void ExprParser::fillValuesInExpr(std::vector& valuesInExpr) throw(INTERP_KERNEL::Exception) +void ExprParser::fillValuesInExpr(std::vector& valuesInExpr) { const char FIGURES[]="0123456789"; const std::string other("+-*^/(<>,"); @@ -918,7 +918,7 @@ void ExprParser::fillValuesInExpr(std::vector& valuesInExpr) throw(INTER } } -void ExprParser::replaceValues(const std::vector& valuesInExpr) throw(INTERP_KERNEL::Exception) +void ExprParser::replaceValues(const std::vector& valuesInExpr) { if(_leaf) _leaf->replaceValues(valuesInExpr); diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.hxx b/src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.hxx index 959505b17..85c4ac35b 100644 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.hxx +++ b/src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.hxx @@ -39,11 +39,11 @@ namespace INTERP_KERNEL { public: INTERPKERNEL_EXPORT virtual ~LeafExpr(); - INTERPKERNEL_EXPORT virtual void fillValue(Value *val) const throw(INTERP_KERNEL::Exception) = 0; + INTERPKERNEL_EXPORT virtual void fillValue(Value *val) const = 0; INTERPKERNEL_EXPORT virtual void compileX86(std::vector& ass) const = 0; INTERPKERNEL_EXPORT virtual void compileX86_64(std::vector& ass) const = 0; - INTERPKERNEL_EXPORT virtual void replaceValues(const std::vector& valuesInExpr) throw(INTERP_KERNEL::Exception) = 0; - INTERPKERNEL_EXPORT static LeafExpr *buildInstanceFrom(const std::string& expr) throw(INTERP_KERNEL::Exception); + INTERPKERNEL_EXPORT virtual void replaceValues(const std::vector& valuesInExpr) = 0; + INTERPKERNEL_EXPORT static LeafExpr *buildInstanceFrom(const std::string& expr); }; class LeafExprVal : public LeafExpr @@ -53,8 +53,8 @@ namespace INTERP_KERNEL INTERPKERNEL_EXPORT ~LeafExprVal(); INTERPKERNEL_EXPORT void compileX86(std::vector& ass) const; INTERPKERNEL_EXPORT void compileX86_64(std::vector& ass) const; - INTERPKERNEL_EXPORT void fillValue(Value *val) const throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void replaceValues(const std::vector& valuesInExpr) throw(INTERP_KERNEL::Exception); + INTERPKERNEL_EXPORT void fillValue(Value *val) const; + INTERPKERNEL_EXPORT void replaceValues(const std::vector& valuesInExpr); private: double _value; }; @@ -66,11 +66,11 @@ namespace INTERP_KERNEL INTERPKERNEL_EXPORT ~LeafExprVar(); INTERPKERNEL_EXPORT void compileX86(std::vector& ass) const; INTERPKERNEL_EXPORT void compileX86_64(std::vector& ass) const; - INTERPKERNEL_EXPORT void fillValue(Value *val) const throw(INTERP_KERNEL::Exception); + INTERPKERNEL_EXPORT void fillValue(Value *val) const; INTERPKERNEL_EXPORT std::string getVar() const { return _var_name; } - INTERPKERNEL_EXPORT void prepareExprEvaluation(const std::vector& vars, int nbOfCompo, int targetNbOfCompo) const throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void prepareExprEvaluationVec() const throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void replaceValues(const std::vector& valuesInExpr) throw(INTERP_KERNEL::Exception); + INTERPKERNEL_EXPORT void prepareExprEvaluation(const std::vector& vars, int nbOfCompo, int targetNbOfCompo) const; + INTERPKERNEL_EXPORT void prepareExprEvaluationVec() const; + INTERPKERNEL_EXPORT void replaceValues(const std::vector& valuesInExpr); INTERPKERNEL_EXPORT static bool isRecognizedKeyVar(const std::string& var, int& pos); public: static const char END_OF_RECOGNIZED_VAR[]; @@ -85,13 +85,13 @@ namespace INTERP_KERNEL INTERPKERNEL_EXPORT ExprParser(const char *expr, ExprParser *father=0); INTERPKERNEL_EXPORT ExprParser(const char *expr, int lgth, ExprParser *father=0); INTERPKERNEL_EXPORT ~ExprParser(); - INTERPKERNEL_EXPORT void parse() throw(INTERP_KERNEL::Exception); + INTERPKERNEL_EXPORT void parse(); INTERPKERNEL_EXPORT bool isParsingSuccessfull() const { return _is_parsing_ok; } - INTERPKERNEL_EXPORT double evaluate() const throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT DecompositionInUnitBase evaluateUnit() const throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void prepareExprEvaluation(const std::vector& vars, int nbOfCompo, int targetNbOfCompo) const throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void evaluateExpr(int szOfOutParam, const double *inParam, double *outParam) const throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void prepareExprEvaluationVec() const throw(INTERP_KERNEL::Exception); + INTERPKERNEL_EXPORT double evaluate() const; + INTERPKERNEL_EXPORT DecompositionInUnitBase evaluateUnit() const; + INTERPKERNEL_EXPORT void prepareExprEvaluation(const std::vector& vars, int nbOfCompo, int targetNbOfCompo) const; + INTERPKERNEL_EXPORT void evaluateExpr(int szOfOutParam, const double *inParam, double *outParam) const; + INTERPKERNEL_EXPORT void prepareExprEvaluationVec() const; INTERPKERNEL_EXPORT void getSetOfVars(std::set& vars) const; INTERPKERNEL_EXPORT void getTrueSetOfVars(std::set& vars) const; // @@ -104,22 +104,22 @@ namespace INTERP_KERNEL INTERPKERNEL_EXPORT static std::string buildStringFromFortran(const char *expr, int lgth); INTERPKERNEL_EXPORT static std::string deleteWhiteSpaces(const std::string& expr); private: - Value *evaluateLowLev(Value *valGen) const throw(INTERP_KERNEL::Exception); + Value *evaluateLowLev(Value *valGen) const; private: - void prepareExprEvaluationVecLowLev() const throw(INTERP_KERNEL::Exception); - bool tryToInterpALeaf() throw(INTERP_KERNEL::Exception); - void parseUnaryFunc() throw(INTERP_KERNEL::Exception); - void parseForCmp() throw(INTERP_KERNEL::Exception); - void parseForAddMin() throw(INTERP_KERNEL::Exception); - void parseForMulDiv() throw(INTERP_KERNEL::Exception); - void parseForPow() throw(INTERP_KERNEL::Exception); - void parseDeeper() throw(INTERP_KERNEL::Exception); - bool simplify() throw(INTERP_KERNEL::Exception); + void prepareExprEvaluationVecLowLev() const; + bool tryToInterpALeaf(); + void parseUnaryFunc(); + void parseForCmp(); + void parseForAddMin(); + void parseForMulDiv(); + void parseForPow(); + void parseDeeper(); + bool simplify(); void releaseFunctions(); - void checkBracketsParity() const throw(INTERP_KERNEL::Exception); - void fillValuesInExpr(std::vector& valuesInExpr) throw(INTERP_KERNEL::Exception); - void replaceValues(const std::vector& valuesInExpr) throw(INTERP_KERNEL::Exception); - static double ReplaceAndTraduce(std::string& expr, int id, std::size_t bg, std::size_t end, int& delta) throw(INTERP_KERNEL::Exception); + void checkBracketsParity() const; + void fillValuesInExpr(std::vector& valuesInExpr); + void replaceValues(const std::vector& valuesInExpr); + static double ReplaceAndTraduce(std::string& expr, int id, std::size_t bg, std::size_t end, int& delta); static std::size_t FindCorrespondingOpenBracket(const std::string& expr, std::size_t posOfCloseBracket); static void LocateError(std::ostream& stringToDisp, const std::string& srcOfErr, int posOfErr); private: diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelFunction.cxx b/src/INTERP_KERNEL/ExprEval/InterpKernelFunction.cxx index bd5ef1687..4833f6edb 100644 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelFunction.cxx +++ b/src/INTERP_KERNEL/ExprEval/InterpKernelFunction.cxx @@ -81,7 +81,7 @@ const char LowerThanFunction::REPR[]="<"; const char IfFunction::REPR[]="if"; -Function *FunctionsFactory::buildFuncFromString(const char *type, int nbOfParams) throw(INTERP_KERNEL::Exception) +Function *FunctionsFactory::buildFuncFromString(const char *type, int nbOfParams) { switch(nbOfParams) { @@ -96,7 +96,7 @@ Function *FunctionsFactory::buildFuncFromString(const char *type, int nbOfParams } } -Function *FunctionsFactory::buildUnaryFuncFromString(const char *type) throw(INTERP_KERNEL::Exception) +Function *FunctionsFactory::buildUnaryFuncFromString(const char *type) { std::string tmp(type); if(tmp.empty()) @@ -141,7 +141,7 @@ Function *FunctionsFactory::buildUnaryFuncFromString(const char *type) throw(INT throw INTERP_KERNEL::Exception(msg.c_str()); } -Function *FunctionsFactory::buildBinaryFuncFromString(const char *type) throw(INTERP_KERNEL::Exception) +Function *FunctionsFactory::buildBinaryFuncFromString(const char *type) { std::string tmp(type); if(tmp==PositiveFunction::REPR) @@ -167,7 +167,7 @@ Function *FunctionsFactory::buildBinaryFuncFromString(const char *type) throw(IN throw INTERP_KERNEL::Exception(msg.c_str()); } -Function *FunctionsFactory::buildTernaryFuncFromString(const char *type) throw(INTERP_KERNEL::Exception) +Function *FunctionsFactory::buildTernaryFuncFromString(const char *type) { std::string tmp(type); if(tmp==IfFunction::REPR) @@ -177,7 +177,7 @@ Function *FunctionsFactory::buildTernaryFuncFromString(const char *type) throw(I throw INTERP_KERNEL::Exception(msg.c_str()); } -Function *FunctionsFactory::buildBinaryFuncFromString(char type) throw(INTERP_KERNEL::Exception) +Function *FunctionsFactory::buildBinaryFuncFromString(char type) { char tmp[2]; tmp[0]=type; tmp[1]='\0'; return buildBinaryFuncFromString(tmp); @@ -191,11 +191,11 @@ IdentityFunction::~IdentityFunction() { } -void IdentityFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void IdentityFunction::operate(std::vector& stack) const { } -void IdentityFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void IdentityFunction::operateX86(std::vector& asmb) const { } @@ -218,11 +218,11 @@ int UnaryFunction::getNbInputParams() const return 1; } -void PositiveFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void PositiveFunction::operate(std::vector& stack) const { } -void PositiveFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void PositiveFunction::operateX86(std::vector& asmb) const { } @@ -240,13 +240,13 @@ NegateFunction::~NegateFunction() { } -void NegateFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void NegateFunction::operate(std::vector& stack) const { Value *val=stack.back(); val->negate(); } -void NegateFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void NegateFunction::operateX86(std::vector& asmb) const { asmb.push_back("fchs"); } @@ -265,13 +265,13 @@ CosFunction::~CosFunction() { } -void CosFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void CosFunction::operate(std::vector& stack) const { Value *val=stack.back(); val->cos(); } -void CosFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void CosFunction::operateX86(std::vector& asmb) const { asmb.push_back("fcos"); } @@ -290,13 +290,13 @@ SinFunction::~SinFunction() { } -void SinFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void SinFunction::operate(std::vector& stack) const { Value *val=stack.back(); val->sin(); } -void SinFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void SinFunction::operateX86(std::vector& asmb) const { asmb.push_back("fsin"); } @@ -315,13 +315,13 @@ TanFunction::~TanFunction() { } -void TanFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void TanFunction::operate(std::vector& stack) const { Value *val=stack.back(); val->tan(); } -void TanFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void TanFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly Not implemented yet !"); } @@ -340,13 +340,13 @@ ACosFunction::~ACosFunction() { } -void ACosFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void ACosFunction::operate(std::vector& stack) const { Value *val=stack.back(); val->acos(); } -void ACosFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void ACosFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly Not implemented yet !"); } @@ -365,13 +365,13 @@ ASinFunction::~ASinFunction() { } -void ASinFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void ASinFunction::operate(std::vector& stack) const { Value *val=stack.back(); val->asin(); } -void ASinFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void ASinFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly Not implemented yet !"); } @@ -390,13 +390,13 @@ ATanFunction::~ATanFunction() { } -void ATanFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void ATanFunction::operate(std::vector& stack) const { Value *val=stack.back(); val->atan(); } -void ATanFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void ATanFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly Not implemented yet !"); } @@ -415,13 +415,13 @@ CoshFunction::~CoshFunction() { } -void CoshFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void CoshFunction::operate(std::vector& stack) const { Value *val=stack.back(); val->cosh(); } -void CoshFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void CoshFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly Not implemented yet !"); } @@ -440,13 +440,13 @@ SinhFunction::~SinhFunction() { } -void SinhFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void SinhFunction::operate(std::vector& stack) const { Value *val=stack.back(); val->sinh(); } -void SinhFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void SinhFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly Not implemented yet !"); } @@ -465,13 +465,13 @@ TanhFunction::~TanhFunction() { } -void TanhFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void TanhFunction::operate(std::vector& stack) const { Value *val=stack.back(); val->tanh(); } -void TanhFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void TanhFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly Not implemented yet !"); } @@ -490,13 +490,13 @@ SqrtFunction::~SqrtFunction() { } -void SqrtFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void SqrtFunction::operate(std::vector& stack) const { Value *val=stack.back(); val->sqrt(); } -void SqrtFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void SqrtFunction::operateX86(std::vector& asmb) const { asmb.push_back("fsqrt"); } @@ -515,13 +515,13 @@ AbsFunction::~AbsFunction() { } -void AbsFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void AbsFunction::operate(std::vector& stack) const { Value *val=stack.back(); val->abs(); } -void AbsFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void AbsFunction::operateX86(std::vector& asmb) const { asmb.push_back("fabs"); } @@ -536,13 +536,13 @@ bool AbsFunction::isACall() const return false; } -void ExpFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void ExpFunction::operate(std::vector& stack) const { Value *val=stack.back(); val->exp(); } -void ExpFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void ExpFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly Not implemented yet !"); } @@ -561,13 +561,13 @@ LnFunction::~LnFunction() { } -void LnFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void LnFunction::operate(std::vector& stack) const { Value *val=stack.back(); val->ln(); } -void LnFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void LnFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly Not implemented yet !"); } @@ -586,13 +586,13 @@ LogFunction::~LogFunction() { } -void LogFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void LogFunction::operate(std::vector& stack) const { Value *val=stack.back(); val->ln(); } -void LogFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void LogFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly for log Not implemented yet !"); } @@ -611,13 +611,13 @@ Log10Function::~Log10Function() { } -void Log10Function::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void Log10Function::operate(std::vector& stack) const { Value *val=stack.back(); val->log10(); } -void Log10Function::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void Log10Function::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly for log Not implemented yet !"); } @@ -641,7 +641,7 @@ PlusFunction::~PlusFunction() { } -void PlusFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void PlusFunction::operate(std::vector& stack) const { Value *val1=stack.back(); stack.pop_back(); @@ -661,7 +661,7 @@ void PlusFunction::operate(std::vector& stack) const throw(INTERP_KERNE val2=val3; } -void PlusFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void PlusFunction::operateX86(std::vector& asmb) const { asmb.push_back("faddp st1"); } @@ -680,7 +680,7 @@ MinusFunction::~MinusFunction() { } -void MinusFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void MinusFunction::operate(std::vector& stack) const { Value *val1=stack.back(); stack.pop_back(); @@ -700,7 +700,7 @@ void MinusFunction::operate(std::vector& stack) const throw(INTERP_KERN val2=val3; } -void MinusFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void MinusFunction::operateX86(std::vector& asmb) const { asmb.push_back("fsubp st1"); } @@ -719,7 +719,7 @@ MultFunction::~MultFunction() { } -void MultFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void MultFunction::operate(std::vector& stack) const { Value *val1=stack.back(); stack.pop_back(); @@ -730,7 +730,7 @@ void MultFunction::operate(std::vector& stack) const throw(INTERP_KERNE val2=val3; } -void MultFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void MultFunction::operateX86(std::vector& asmb) const { asmb.push_back("fmulp st1"); } @@ -749,7 +749,7 @@ DivFunction::~DivFunction() { } -void DivFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void DivFunction::operate(std::vector& stack) const { Value *val1=stack.back(); stack.pop_back(); @@ -769,7 +769,7 @@ void DivFunction::operate(std::vector& stack) const throw(INTERP_KERNEL val2=val3; } -void DivFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void DivFunction::operateX86(std::vector& asmb) const { asmb.push_back("fdivp st1"); } @@ -788,7 +788,7 @@ PowFunction::~PowFunction() { } -void PowFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void PowFunction::operate(std::vector& stack) const { Value *val1=stack.back(); stack.pop_back(); @@ -808,7 +808,7 @@ void PowFunction::operate(std::vector& stack) const throw(INTERP_KERNEL val2=val3; } -void PowFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void PowFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly Not implemented yet !"); } @@ -831,7 +831,7 @@ MaxFunction::~MaxFunction() { } -void MaxFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void MaxFunction::operate(std::vector& stack) const { Value *val1=stack.back(); stack.pop_back(); @@ -851,7 +851,7 @@ void MaxFunction::operate(std::vector& stack) const throw(INTERP_KERNEL val2=val3; } -void MaxFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void MaxFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly Not implemented yet !"); } @@ -870,7 +870,7 @@ MinFunction::~MinFunction() { } -void MinFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void MinFunction::operate(std::vector& stack) const { Value *val1=stack.back(); stack.pop_back(); @@ -890,7 +890,7 @@ void MinFunction::operate(std::vector& stack) const throw(INTERP_KERNEL val2=val3; } -void MinFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void MinFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly Not implemented yet !"); } @@ -909,7 +909,7 @@ GreaterThanFunction::~GreaterThanFunction() { } -void GreaterThanFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void GreaterThanFunction::operate(std::vector& stack) const { Value *val1=stack.back(); stack.pop_back(); @@ -929,7 +929,7 @@ void GreaterThanFunction::operate(std::vector& stack) const throw(INTER val2=val3; } -void GreaterThanFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void GreaterThanFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly Not implemented yet !"); } @@ -948,7 +948,7 @@ LowerThanFunction::~LowerThanFunction() { } -void LowerThanFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void LowerThanFunction::operate(std::vector& stack) const { Value *val1=stack.back(); stack.pop_back(); @@ -968,7 +968,7 @@ void LowerThanFunction::operate(std::vector& stack) const throw(INTERP_ val2=val3; } -void LowerThanFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void LowerThanFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly Not implemented yet !"); } @@ -992,7 +992,7 @@ IfFunction::~IfFunction() { } -void IfFunction::operate(std::vector& stack) const throw(INTERP_KERNEL::Exception) +void IfFunction::operate(std::vector& stack) const { Value *val1=stack.back(); stack.pop_back(); @@ -1016,7 +1016,7 @@ void IfFunction::operate(std::vector& stack) const throw(INTERP_KERNEL: val3=val4; } -void IfFunction::operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) +void IfFunction::operateX86(std::vector& asmb) const { throw INTERP_KERNEL::Exception("Assembly Not implemented yet !"); } diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelFunction.hxx b/src/INTERP_KERNEL/ExprEval/InterpKernelFunction.hxx index ef7dab8eb..033c921d4 100644 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelFunction.hxx +++ b/src/INTERP_KERNEL/ExprEval/InterpKernelFunction.hxx @@ -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& stack) const throw(INTERP_KERNEL::Exception) = 0; - virtual void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception) = 0; + virtual void operate(std::vector& stack) const = 0; + virtual void operateX86(std::vector& 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& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -75,8 +75,8 @@ namespace INTERP_KERNEL { public: ~PositiveFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -87,8 +87,8 @@ namespace INTERP_KERNEL { public: ~NegateFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -99,8 +99,8 @@ namespace INTERP_KERNEL { public: ~CosFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -111,8 +111,8 @@ namespace INTERP_KERNEL { public: ~SinFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -123,8 +123,8 @@ namespace INTERP_KERNEL { public: ~TanFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -135,8 +135,8 @@ namespace INTERP_KERNEL { public: ~ACosFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -147,8 +147,8 @@ namespace INTERP_KERNEL { public: ~ASinFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -159,8 +159,8 @@ namespace INTERP_KERNEL { public: ~ATanFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -171,8 +171,8 @@ namespace INTERP_KERNEL { public: ~CoshFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -183,8 +183,8 @@ namespace INTERP_KERNEL { public: ~SinhFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -195,8 +195,8 @@ namespace INTERP_KERNEL { public: ~TanhFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -207,8 +207,8 @@ namespace INTERP_KERNEL { public: ~SqrtFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -219,8 +219,8 @@ namespace INTERP_KERNEL { public: ~AbsFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -231,8 +231,8 @@ namespace INTERP_KERNEL { public: ~ExpFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -243,8 +243,8 @@ namespace INTERP_KERNEL { public: ~LnFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -255,8 +255,8 @@ namespace INTERP_KERNEL { public: ~LogFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -267,8 +267,8 @@ namespace INTERP_KERNEL { public: ~Log10Function(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -285,8 +285,8 @@ namespace INTERP_KERNEL { public: ~PlusFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -297,8 +297,8 @@ namespace INTERP_KERNEL { public: ~MinusFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -309,8 +309,8 @@ namespace INTERP_KERNEL { public: ~MultFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -321,8 +321,8 @@ namespace INTERP_KERNEL { public: ~DivFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -333,8 +333,8 @@ namespace INTERP_KERNEL { public: ~PowFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -345,8 +345,8 @@ namespace INTERP_KERNEL { public: ~MaxFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -357,8 +357,8 @@ namespace INTERP_KERNEL { public: ~MinFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -369,8 +369,8 @@ namespace INTERP_KERNEL { public: ~GreaterThanFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -381,8 +381,8 @@ namespace INTERP_KERNEL { public: ~LowerThanFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: @@ -399,8 +399,8 @@ namespace INTERP_KERNEL { public: ~IfFunction(); - void operate(std::vector& stack) const throw(INTERP_KERNEL::Exception); - void operateX86(std::vector& asmb) const throw(INTERP_KERNEL::Exception); + void operate(std::vector& stack) const; + void operateX86(std::vector& asmb) const; const char *getRepr() const; bool isACall() const; public: diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelUnit.cxx b/src/INTERP_KERNEL/ExprEval/InterpKernelUnit.cxx index aca6748ea..7d6bf79ad 100644 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelUnit.cxx +++ b/src/INTERP_KERNEL/ExprEval/InterpKernelUnit.cxx @@ -213,7 +213,7 @@ bool DecompositionInUnitBase::isUnitary() const return areDoubleEquals(_add_to_base,0.) && areDoubleEquals(_mult_fact_to_base,1.); } -void DecompositionInUnitBase::tryToConvertInUnit(double val) throw(INTERP_KERNEL::Exception) +void DecompositionInUnitBase::tryToConvertInUnit(double val) { int valI=(int)val; if((val-(double)valI)!=0.) @@ -296,7 +296,7 @@ bool DecompositionInUnitBase::areDoubleEquals(double a, double b) return fabs((a-b)/ref)<1e-7; } -int DecompositionInUnitBase::couldItBeConsideredAsInt(double val) throw(INTERP_KERNEL::Exception) +int DecompositionInUnitBase::couldItBeConsideredAsInt(double val) { int ret=(int)val; double valT=(double) ret; diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelUnit.hxx b/src/INTERP_KERNEL/ExprEval/InterpKernelUnit.hxx index c6d49935c..5d6f65007 100644 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelUnit.hxx +++ b/src/INTERP_KERNEL/ExprEval/InterpKernelUnit.hxx @@ -67,13 +67,13 @@ namespace INTERP_KERNEL //! \b WARNING no test is done on the fact that unit is adimensionnal. INTERPKERNEL_EXPORT void negate(); INTERPKERNEL_EXPORT bool isAdimensional() const; - INTERPKERNEL_EXPORT void tryToConvertInUnit(double val) throw(INTERP_KERNEL::Exception); + INTERPKERNEL_EXPORT void tryToConvertInUnit(double val); INTERPKERNEL_EXPORT DecompositionInUnitBase &operator*(const DecompositionInUnitBase& other); INTERPKERNEL_EXPORT DecompositionInUnitBase &operator/(const DecompositionInUnitBase& other); INTERPKERNEL_EXPORT DecompositionInUnitBase &operator^(const DecompositionInUnitBase& other) throw(INTERP_KERNEL::Exception); private: void dealWithAddFactor(const DecompositionInUnitBase& other); - static int couldItBeConsideredAsInt(double val) throw(INTERP_KERNEL::Exception); + static int couldItBeConsideredAsInt(double val); static bool areDoubleEquals(double a, double b); static double powInt(double val, int exp); private: diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelValue.cxx b/src/INTERP_KERNEL/ExprEval/InterpKernelValue.cxx index 20f18b2ec..8677a0ea0 100644 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelValue.cxx +++ b/src/INTERP_KERNEL/ExprEval/InterpKernelValue.cxx @@ -40,152 +40,152 @@ ValueDouble::ValueDouble(double val):_data(val) { } -void ValueDouble::setDouble(double val) throw(INTERP_KERNEL::Exception) +void ValueDouble::setDouble(double val) { _data=val; } -void ValueDouble::setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception) +void ValueDouble::setVarname(int fastPos, const std::string& var) { std::string msg("Error var : "); msg+=var; msg+=" not numeric : use another expression evaluator !"; throw INTERP_KERNEL::Exception(msg.c_str()); } -void ValueDouble::positive() throw(INTERP_KERNEL::Exception) +void ValueDouble::positive() { } -void ValueDouble::negate() throw(INTERP_KERNEL::Exception) +void ValueDouble::negate() { _data=-_data; } -void ValueDouble::sqrt() throw(INTERP_KERNEL::Exception) +void ValueDouble::sqrt() { _data=std::sqrt(_data); } -void ValueDouble::cos() throw(INTERP_KERNEL::Exception) +void ValueDouble::cos() { _data=std::cos(_data); } -void ValueDouble::sin() throw(INTERP_KERNEL::Exception) +void ValueDouble::sin() { _data=std::sin(_data); } -void ValueDouble::tan() throw(INTERP_KERNEL::Exception) +void ValueDouble::tan() { _data=std::tan(_data); } -void ValueDouble::acos() throw(INTERP_KERNEL::Exception) +void ValueDouble::acos() { _data=std::acos(_data); } -void ValueDouble::asin() throw(INTERP_KERNEL::Exception) +void ValueDouble::asin() { _data=std::asin(_data); } -void ValueDouble::atan() throw(INTERP_KERNEL::Exception) +void ValueDouble::atan() { _data=std::atan(_data); } -void ValueDouble::cosh() throw(INTERP_KERNEL::Exception) +void ValueDouble::cosh() { _data=std::cosh(_data); } -void ValueDouble::sinh() throw(INTERP_KERNEL::Exception) +void ValueDouble::sinh() { _data=std::sinh(_data); } -void ValueDouble::tanh() throw(INTERP_KERNEL::Exception) +void ValueDouble::tanh() { _data=std::tanh(_data); } -void ValueDouble::abs() throw(INTERP_KERNEL::Exception) +void ValueDouble::abs() { if(_data<0.) _data=-_data; } -void ValueDouble::exp() throw(INTERP_KERNEL::Exception) +void ValueDouble::exp() { _data=std::exp(_data); } -void ValueDouble::ln() throw(INTERP_KERNEL::Exception) +void ValueDouble::ln() { _data=std::log(_data); } -void ValueDouble::log10() throw(INTERP_KERNEL::Exception) +void ValueDouble::log10() { _data=std::log10(_data); } -Value *ValueDouble::plus(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDouble::plus(const Value *other) const { const ValueDouble *valC=checkSameType(other); return new ValueDouble(_data+valC->_data); } -Value *ValueDouble::minus(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDouble::minus(const Value *other) const { const ValueDouble *valC=checkSameType(other); return new ValueDouble(_data-valC->_data); } -Value *ValueDouble::mult(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDouble::mult(const Value *other) const { const ValueDouble *valC=checkSameType(other); return new ValueDouble(_data*valC->_data); } -Value *ValueDouble::div(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDouble::div(const Value *other) const { const ValueDouble *valC=checkSameType(other); return new ValueDouble(_data/valC->_data); } -Value *ValueDouble::pow(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDouble::pow(const Value *other) const { const ValueDouble *valC=checkSameType(other); return new ValueDouble(std::pow(_data,valC->_data)); } -Value *ValueDouble::max(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDouble::max(const Value *other) const { const ValueDouble *valC=checkSameType(other); return new ValueDouble(std::max(_data,valC->_data)); } -Value *ValueDouble::min(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDouble::min(const Value *other) const { const ValueDouble *valC=checkSameType(other); return new ValueDouble(std::min(_data,valC->_data)); } -Value *ValueDouble::greaterThan(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDouble::greaterThan(const Value *other) const { const ValueDouble *valC=checkSameType(other); return new ValueDouble(_data>valC->_data?std::numeric_limits::max():-std::numeric_limits::max()); } -Value *ValueDouble::lowerThan(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDouble::lowerThan(const Value *other) const { const ValueDouble *valC=checkSameType(other); return new ValueDouble(_data_data?std::numeric_limits::max():-std::numeric_limits::max()); } -Value *ValueDouble::ifFunc(const Value *the, const Value *els) const throw(INTERP_KERNEL::Exception) +Value *ValueDouble::ifFunc(const Value *the, const Value *els) const { const ValueDouble *theC=checkSameType(the); const ValueDouble *elsC=checkSameType(els); @@ -196,7 +196,7 @@ Value *ValueDouble::ifFunc(const Value *the, const Value *els) const throw(INTER throw INTERP_KERNEL::Exception("ValueDouble::ifFunc : The fist element of ternary function if is not a binary op !"); } -const ValueDouble *ValueDouble::checkSameType(const Value *val) throw(INTERP_KERNEL::Exception) +const ValueDouble *ValueDouble::checkSameType(const Value *val) { const ValueDouble *valC=dynamic_cast(val); if(!valC) @@ -217,129 +217,129 @@ ValueUnit::ValueUnit(const DecompositionInUnitBase& unit):_data(unit) { } -void ValueUnit::setDouble(double val) throw(INTERP_KERNEL::Exception) +void ValueUnit::setDouble(double val) { _data.tryToConvertInUnit(val); } -void ValueUnit::setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception) +void ValueUnit::setVarname(int fastPos, const std::string& var) { double add,mul; const short *projInBase=UnitDataBase::_uniqueMapForExpr.getInfoForUnit(var,add,mul); _data.setInfo(projInBase,add,mul); } -void ValueUnit::positive() throw(INTERP_KERNEL::Exception) +void ValueUnit::positive() { unsupportedOp(PositiveFunction::REPR); } -void ValueUnit::negate() throw(INTERP_KERNEL::Exception) +void ValueUnit::negate() { _data.negate(); } -void ValueUnit::sqrt() throw(INTERP_KERNEL::Exception) +void ValueUnit::sqrt() { unsupportedOp(SqrtFunction::REPR); } -void ValueUnit::cos() throw(INTERP_KERNEL::Exception) +void ValueUnit::cos() { unsupportedOp(CosFunction::REPR); } -void ValueUnit::sin() throw(INTERP_KERNEL::Exception) +void ValueUnit::sin() { unsupportedOp(SinFunction::REPR); } -void ValueUnit::tan() throw(INTERP_KERNEL::Exception) +void ValueUnit::tan() { unsupportedOp(TanFunction::REPR); } -void ValueUnit::acos() throw(INTERP_KERNEL::Exception) +void ValueUnit::acos() { unsupportedOp(ACosFunction::REPR); } -void ValueUnit::asin() throw(INTERP_KERNEL::Exception) +void ValueUnit::asin() { unsupportedOp(ASinFunction::REPR); } -void ValueUnit::atan() throw(INTERP_KERNEL::Exception) +void ValueUnit::atan() { unsupportedOp(ATanFunction::REPR); } -void ValueUnit::cosh() throw(INTERP_KERNEL::Exception) +void ValueUnit::cosh() { unsupportedOp(CoshFunction::REPR); } -void ValueUnit::sinh() throw(INTERP_KERNEL::Exception) +void ValueUnit::sinh() { unsupportedOp(SinhFunction::REPR); } -void ValueUnit::tanh() throw(INTERP_KERNEL::Exception) +void ValueUnit::tanh() { unsupportedOp(TanhFunction::REPR); } -void ValueUnit::abs() throw(INTERP_KERNEL::Exception) +void ValueUnit::abs() { unsupportedOp(AbsFunction::REPR); } -void ValueUnit::exp() throw(INTERP_KERNEL::Exception) +void ValueUnit::exp() { unsupportedOp(ExpFunction::REPR); } -void ValueUnit::ln() throw(INTERP_KERNEL::Exception) +void ValueUnit::ln() { unsupportedOp(LnFunction::REPR); } -void ValueUnit::log10() throw(INTERP_KERNEL::Exception) +void ValueUnit::log10() { unsupportedOp(Log10Function::REPR); } -Value *ValueUnit::plus(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueUnit::plus(const Value *other) const { unsupportedOp(PlusFunction::REPR); return 0; } -Value *ValueUnit::minus(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueUnit::minus(const Value *other) const { unsupportedOp(MinusFunction::REPR); return 0; } -Value *ValueUnit::greaterThan(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueUnit::greaterThan(const Value *other) const { unsupportedOp(GreaterThanFunction::REPR); return 0; } -Value *ValueUnit::lowerThan(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueUnit::lowerThan(const Value *other) const { unsupportedOp(LowerThanFunction::REPR); return 0; } -Value *ValueUnit::ifFunc(const Value *the, const Value *els) const throw(INTERP_KERNEL::Exception) +Value *ValueUnit::ifFunc(const Value *the, const Value *els) const { unsupportedOp(IfFunction::REPR); return 0; } -Value *ValueUnit::mult(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueUnit::mult(const Value *other) const { const ValueUnit *valC=checkSameType(other); DecompositionInUnitBase tmp=_data; @@ -347,7 +347,7 @@ Value *ValueUnit::mult(const Value *other) const throw(INTERP_KERNEL::Exception) return new ValueUnit(tmp); } -Value *ValueUnit::div(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueUnit::div(const Value *other) const { const ValueUnit *valC=checkSameType(other); DecompositionInUnitBase tmp=_data; @@ -355,7 +355,7 @@ Value *ValueUnit::div(const Value *other) const throw(INTERP_KERNEL::Exception) return new ValueUnit(tmp); } -Value *ValueUnit::pow(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueUnit::pow(const Value *other) const { const ValueUnit *valC=checkSameType(other); DecompositionInUnitBase tmp=_data; @@ -363,19 +363,19 @@ Value *ValueUnit::pow(const Value *other) const throw(INTERP_KERNEL::Exception) return new ValueUnit(tmp); } -Value *ValueUnit::max(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueUnit::max(const Value *other) const { unsupportedOp(MaxFunction::REPR); return 0; } -Value *ValueUnit::min(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueUnit::min(const Value *other) const { unsupportedOp(MinFunction::REPR); return 0; } -const ValueUnit *ValueUnit::checkSameType(const Value *val) throw(INTERP_KERNEL::Exception) +const ValueUnit *ValueUnit::checkSameType(const Value *val) { const ValueUnit *valC=dynamic_cast(val); if(!valC) @@ -383,7 +383,7 @@ const ValueUnit *ValueUnit::checkSameType(const Value *val) throw(INTERP_KERNEL: return valC; } -void ValueUnit::unsupportedOp(const char *type) throw(INTERP_KERNEL::Exception) +void ValueUnit::unsupportedOp(const char *type) { const char msg[]="Unsupported operation for units :"; std::string msgStr(msg); @@ -405,12 +405,12 @@ Value *ValueDoubleExpr::newInstance() const return new ValueDoubleExpr(_sz_dest_data,_src_data); } -void ValueDoubleExpr::setDouble(double val) throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::setDouble(double val) { std::fill(_dest_data,_dest_data+_sz_dest_data,val); } -void ValueDoubleExpr::setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::setVarname(int fastPos, const std::string& var) { if(fastPos==-2) std::copy(_src_data,_src_data+_sz_dest_data,_dest_data); @@ -423,16 +423,16 @@ void ValueDoubleExpr::setVarname(int fastPos, const std::string& var) throw(INTE } } -void ValueDoubleExpr::positive() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::positive() { } -void ValueDoubleExpr::negate() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::negate() { std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::negate()); } -void ValueDoubleExpr::sqrt() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::sqrt() { double *it=std::find_if(_dest_data,_dest_data+_sz_dest_data,std::bind2nd(std::less(),0.)); if(it!=_dest_data+_sz_dest_data) @@ -440,22 +440,22 @@ void ValueDoubleExpr::sqrt() throw(INTERP_KERNEL::Exception) std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::sqrt)); } -void ValueDoubleExpr::cos() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::cos() { std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::cos)); } -void ValueDoubleExpr::sin() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::sin() { std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::sin)); } -void ValueDoubleExpr::tan() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::tan() { std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::tan)); } -void ValueDoubleExpr::acos() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::acos() { double *it=std::find_if(_dest_data,_dest_data+_sz_dest_data,std::bind2nd(std::less(),-1.)); if(it!=_dest_data+_sz_dest_data) @@ -466,7 +466,7 @@ void ValueDoubleExpr::acos() throw(INTERP_KERNEL::Exception) std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::acos)); } -void ValueDoubleExpr::asin() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::asin() { double *it=std::find_if(_dest_data,_dest_data+_sz_dest_data,std::bind2nd(std::less(),-1.)); if(it!=_dest_data+_sz_dest_data) @@ -477,37 +477,37 @@ void ValueDoubleExpr::asin() throw(INTERP_KERNEL::Exception) std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::asin)); } -void ValueDoubleExpr::atan() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::atan() { std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::atan)); } -void ValueDoubleExpr::cosh() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::cosh() { std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::cosh)); } -void ValueDoubleExpr::sinh() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::sinh() { std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::sinh)); } -void ValueDoubleExpr::tanh() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::tanh() { std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::tanh)); } -void ValueDoubleExpr::abs() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::abs() { std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(fabs)); } -void ValueDoubleExpr::exp() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::exp() { std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::exp)); } -void ValueDoubleExpr::ln() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::ln() { double *it=std::find_if(_dest_data,_dest_data+_sz_dest_data,std::bind2nd(std::less_equal(),0.)); if(it!=_dest_data+_sz_dest_data) @@ -515,7 +515,7 @@ void ValueDoubleExpr::ln() throw(INTERP_KERNEL::Exception) std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::log)); } -void ValueDoubleExpr::log10() throw(INTERP_KERNEL::Exception) +void ValueDoubleExpr::log10() { double *it=std::find_if(_dest_data,_dest_data+_sz_dest_data,std::bind2nd(std::less_equal(),0.)); if(it!=_dest_data+_sz_dest_data) @@ -523,7 +523,7 @@ void ValueDoubleExpr::log10() throw(INTERP_KERNEL::Exception) std::transform(_dest_data,_dest_data+_sz_dest_data,_dest_data,std::ptr_fun(std::log10)); } -Value *ValueDoubleExpr::plus(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDoubleExpr::plus(const Value *other) const { const ValueDoubleExpr *otherC=static_cast(other); ValueDoubleExpr *ret=new ValueDoubleExpr(_sz_dest_data,_src_data); @@ -531,7 +531,7 @@ Value *ValueDoubleExpr::plus(const Value *other) const throw(INTERP_KERNEL::Exce return ret; } -Value *ValueDoubleExpr::minus(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDoubleExpr::minus(const Value *other) const { const ValueDoubleExpr *otherC=static_cast(other); ValueDoubleExpr *ret=new ValueDoubleExpr(_sz_dest_data,_src_data); @@ -539,7 +539,7 @@ Value *ValueDoubleExpr::minus(const Value *other) const throw(INTERP_KERNEL::Exc return ret; } -Value *ValueDoubleExpr::mult(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDoubleExpr::mult(const Value *other) const { const ValueDoubleExpr *otherC=static_cast(other); ValueDoubleExpr *ret=new ValueDoubleExpr(_sz_dest_data,_src_data); @@ -547,7 +547,7 @@ Value *ValueDoubleExpr::mult(const Value *other) const throw(INTERP_KERNEL::Exce return ret; } -Value *ValueDoubleExpr::div(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDoubleExpr::div(const Value *other) const { const ValueDoubleExpr *otherC=static_cast(other); double *it=std::find(otherC->getData(),otherC->getData()+_sz_dest_data,0.); @@ -558,7 +558,7 @@ Value *ValueDoubleExpr::div(const Value *other) const throw(INTERP_KERNEL::Excep return ret; } -Value *ValueDoubleExpr::pow(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDoubleExpr::pow(const Value *other) const { const ValueDoubleExpr *otherC=static_cast(other); double p=otherC->getData()[0]; @@ -570,7 +570,7 @@ Value *ValueDoubleExpr::pow(const Value *other) const throw(INTERP_KERNEL::Excep return ret; } -Value *ValueDoubleExpr::max(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDoubleExpr::max(const Value *other) const { const ValueDoubleExpr *otherC=static_cast(other); ValueDoubleExpr *ret=new ValueDoubleExpr(_sz_dest_data,_src_data); @@ -578,7 +578,7 @@ Value *ValueDoubleExpr::max(const Value *other) const throw(INTERP_KERNEL::Excep return ret; } -Value *ValueDoubleExpr::min(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDoubleExpr::min(const Value *other) const { const ValueDoubleExpr *otherC=static_cast(other); ValueDoubleExpr *ret=new ValueDoubleExpr(_sz_dest_data,_src_data); @@ -586,7 +586,7 @@ Value *ValueDoubleExpr::min(const Value *other) const throw(INTERP_KERNEL::Excep return ret; } -Value *ValueDoubleExpr::greaterThan(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDoubleExpr::greaterThan(const Value *other) const { const ValueDoubleExpr *otherC=static_cast(other); ValueDoubleExpr *ret=new ValueDoubleExpr(_sz_dest_data,_src_data); @@ -600,7 +600,7 @@ Value *ValueDoubleExpr::greaterThan(const Value *other) const throw(INTERP_KERNE return ret; } -Value *ValueDoubleExpr::lowerThan(const Value *other) const throw(INTERP_KERNEL::Exception) +Value *ValueDoubleExpr::lowerThan(const Value *other) const { const ValueDoubleExpr *otherC=static_cast(other); ValueDoubleExpr *ret=new ValueDoubleExpr(_sz_dest_data,_src_data); @@ -614,7 +614,7 @@ Value *ValueDoubleExpr::lowerThan(const Value *other) const throw(INTERP_KERNEL: return ret; } -Value *ValueDoubleExpr::ifFunc(const Value *the, const Value *els) const throw(INTERP_KERNEL::Exception) +Value *ValueDoubleExpr::ifFunc(const Value *the, const Value *els) const { const ValueDoubleExpr *theC=static_cast(the); const ValueDoubleExpr *elsC=static_cast(els); diff --git a/src/INTERP_KERNEL/ExprEval/InterpKernelValue.hxx b/src/INTERP_KERNEL/ExprEval/InterpKernelValue.hxx index 506d458af..8f6454d9f 100644 --- a/src/INTERP_KERNEL/ExprEval/InterpKernelValue.hxx +++ b/src/INTERP_KERNEL/ExprEval/InterpKernelValue.hxx @@ -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,41 +70,41 @@ 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; }; @@ -114,42 +114,42 @@ namespace INTERP_KERNEL public: INTERPKERNEL_EXPORT ValueUnit(); INTERPKERNEL_EXPORT Value *newInstance() const; - INTERPKERNEL_EXPORT void setDouble(double val) throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception); + INTERPKERNEL_EXPORT void setDouble(double val); + INTERPKERNEL_EXPORT void setVarname(int fastPos, const std::string& var); // INTERPKERNEL_EXPORT DecompositionInUnitBase getData() const { return _data; } - INTERPKERNEL_EXPORT void positive() throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void negate() throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void sqrt() throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void cos() throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void sin() throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void tan() throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void acos() throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void asin() throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void atan() throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void cosh() throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void sinh() throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void tanh() throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void abs() throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void exp() throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void ln() throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT void log10() throw(INTERP_KERNEL::Exception); + 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(); // - INTERPKERNEL_EXPORT Value *plus(const Value *other) const throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT Value *minus(const Value *other) const throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT Value *mult(const Value *other) const throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT Value *div(const Value *other) const throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT Value *pow(const Value *other) const throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT Value *max(const Value *other) const throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT Value *min(const Value *other) const throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT Value *greaterThan(const Value *other) const throw(INTERP_KERNEL::Exception); - INTERPKERNEL_EXPORT 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; // - INTERPKERNEL_EXPORT 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; diff --git a/src/INTERP_KERNEL/GenMathFormulae.hxx b/src/INTERP_KERNEL/GenMathFormulae.hxx index d1b3da2b3..4f6cc5b5c 100644 --- a/src/INTERP_KERNEL/GenMathFormulae.hxx +++ b/src/INTERP_KERNEL/GenMathFormulae.hxx @@ -60,7 +60,7 @@ namespace INTERP_KERNEL * matrix[3]=m_xy, matrix[4]=m_yz, matrix[5]=m_xz * This method returns the eigenvector of the corresponding eigenvalue in 'eigenVal'. The returned eigenValue is normalized. */ - void computeEigenVectorForEigenValue6(const double *matrix, double eigenVal, double eps, double *eigenVector) throw(INTERP_KERNEL::Exception) + void computeEigenVectorForEigenValue6(const double *matrix, double eigenVal, double eps, double *eigenVector) { //if(fabs(eigenVal)>eps) { diff --git a/src/INTERP_KERNEL/Interpolation.hxx b/src/INTERP_KERNEL/Interpolation.hxx index 8bc48a771..93b2b8fea 100644 --- a/src/INTERP_KERNEL/Interpolation.hxx +++ b/src/INTERP_KERNEL/Interpolation.hxx @@ -43,7 +43,7 @@ namespace INTERP_KERNEL int fromIntegralUniform(const MyMeshType& meshT, MatrixType& result, const char *method) { return fromToIntegralUniform(false,meshT,result,method); } template int toIntegralUniform(const MyMeshType& meshS, MatrixType& result, const char *method) { return fromToIntegralUniform(true,meshS,result,method); } - static void CheckAndSplitInterpolationMethod(const char *method, std::string& srcMeth, std::string& trgMeth) throw(INTERP_KERNEL::Exception); + static void CheckAndSplitInterpolationMethod(const char *method, std::string& srcMeth, std::string& trgMeth); template static double CalculateCharacteristicSizeOfMeshes(const MyMeshType& myMeshS, const MyMeshType& myMeshT, const int printLevel); protected: diff --git a/src/INTERP_KERNEL/Interpolation.txx b/src/INTERP_KERNEL/Interpolation.txx index 282e17da8..8e44937e1 100644 --- a/src/INTERP_KERNEL/Interpolation.txx +++ b/src/INTERP_KERNEL/Interpolation.txx @@ -56,7 +56,7 @@ namespace INTERP_KERNEL } template - void Interpolation::CheckAndSplitInterpolationMethod(const char *method, std::string& srcMeth, std::string& trgMeth) throw(INTERP_KERNEL::Exception) + void Interpolation::CheckAndSplitInterpolationMethod(const char *method, std::string& srcMeth, std::string& trgMeth) { const int NB_OF_METH_MANAGED=4; const char *METH_MANAGED[NB_OF_METH_MANAGED]={"P0P0","P0P1","P1P0","P1P1"}; diff --git a/src/INTERP_KERNEL/VolSurfUser.cxx b/src/INTERP_KERNEL/VolSurfUser.cxx index 7e60abdaa..963b7319c 100644 --- a/src/INTERP_KERNEL/VolSurfUser.cxx +++ b/src/INTERP_KERNEL/VolSurfUser.cxx @@ -28,7 +28,7 @@ namespace INTERP_KERNEL { - double SquareDistanceFromPtToSegInSpaceDim2(const double *pt, const double *pt0Seg2, const double *pt1Seg2, std::size_t &nbOfHint) throw(INTERP_KERNEL::Exception) + double SquareDistanceFromPtToSegInSpaceDim2(const double *pt, const double *pt0Seg2, const double *pt1Seg2, std::size_t &nbOfHint) { double dx=pt1Seg2[0]-pt0Seg2[0],dy=pt1Seg2[1]-pt0Seg2[1]; double norm=sqrt(dx*dx+dy*dy); @@ -44,7 +44,7 @@ namespace INTERP_KERNEL return (x-pt[0])*(x-pt[0])+(y-pt[1])*(y-pt[1]); } - double DistanceFromPtToTriInSpaceDim3(const double *pt, const double *pt0Tri3, const double *pt1Tri3, const double *pt2Tri3) throw(INTERP_KERNEL::Exception) + double DistanceFromPtToTriInSpaceDim3(const double *pt, const double *pt0Tri3, const double *pt1Tri3, const double *pt2Tri3) { double matrix[12]; if(!ComputeRotTranslationMatrixToPut3PointsOnOXY(pt0Tri3,pt1Tri3,pt2Tri3,matrix)) @@ -69,7 +69,7 @@ namespace INTERP_KERNEL return sqrt(ret); } - double DistanceFromPtToPolygonInSpaceDim3(const double *pt, const int *connOfPolygonBg, const int *connOfPolygonEnd, const double *coords) throw(INTERP_KERNEL::Exception) + double DistanceFromPtToPolygonInSpaceDim3(const double *pt, const int *connOfPolygonBg, const int *connOfPolygonEnd, const double *coords) { std::size_t nbOfEdges=std::distance(connOfPolygonBg,connOfPolygonEnd); if(nbOfEdges<3) diff --git a/src/INTERP_KERNEL/VolSurfUser.hxx b/src/INTERP_KERNEL/VolSurfUser.hxx index 7b23137d0..344855fdb 100644 --- a/src/INTERP_KERNEL/VolSurfUser.hxx +++ b/src/INTERP_KERNEL/VolSurfUser.hxx @@ -39,11 +39,11 @@ namespace INTERP_KERNEL template void computeBarycenter2(NormalizedCellType type, const ConnType *connec, int lgth, const double *coords, int spaceDim, double *res); - double INTERPKERNEL_EXPORT SquareDistanceFromPtToSegInSpaceDim2(const double *pt, const double *pt0Seg2, const double *pt1Seg2, std::size_t &nbOfHint) throw(INTERP_KERNEL::Exception); + double INTERPKERNEL_EXPORT SquareDistanceFromPtToSegInSpaceDim2(const double *pt, const double *pt0Seg2, const double *pt1Seg2, std::size_t &nbOfHint); - double INTERPKERNEL_EXPORT DistanceFromPtToTriInSpaceDim3(const double *pt, const double *pt0Tri3, const double *pt1Tri3, const double *pt2Tri3) throw(INTERP_KERNEL::Exception); + double INTERPKERNEL_EXPORT DistanceFromPtToTriInSpaceDim3(const double *pt, const double *pt0Tri3, const double *pt1Tri3, const double *pt2Tri3); - double INTERPKERNEL_EXPORT DistanceFromPtToPolygonInSpaceDim3(const double *pt, const int *connOfPolygonBg, const int *connOfPolygonEnd, const double *coords) throw(INTERP_KERNEL::Exception); + double INTERPKERNEL_EXPORT DistanceFromPtToPolygonInSpaceDim3(const double *pt, const int *connOfPolygonBg, const int *connOfPolygonEnd, const double *coords); bool ComputeRotTranslationMatrixToPut3PointsOnOXY(const double *pt0Tri3, const double *pt1Tri3, const double *pt2Tri3, double *matrix); }