Changeset a6be476 in tol
- Timestamp:
- Mar 25, 2013, 5:17:33 PM (14 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 98778a7
- Parents:
- 54000af
- Location:
- tol/btol/timeset_type
- Files:
-
- 4 edited
-
tms.cpp (modified) (1 diff)
-
tmsgrav.cpp (modified) (7 diffs)
-
tol_btmset.h (modified) (1 diff)
-
tol_btmsgrav.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/timeset_type/tms.cpp
r54000af ra6be476 857 857 858 858 #define CheckTestAborted(t0,maxTimeSim,interval) \ 859 if(Abort edMessageSended()) \859 if(AbortMessageSent(-1)) \ 860 860 { \ 861 return(TestAborted("0001",msg=BText(" aborted ")+maxTimeSim+" seconds.",interval)); \861 return(TestAborted("0001",msg=BText(" predecessor aborted ")+maxTimeSim+" seconds.",interval)); \ 862 862 } \ 863 else if(time(0)-t0>maxTimeSim) \ 863 if(AbortMessageSent(+1)) \ 864 { \ 865 return(TestAborted("0001",msg=BText(" successor aborted ")+maxTimeSim+" seconds.",interval)); \ 866 } \ 867 if(time(0)-t0>maxTimeSim) \ 864 868 { \ 865 869 return(TestAborted("0002",msg=BText("exceeded maximum simulation time of ")+maxTimeSim+" seconds.",interval)); \ -
tol/btol/timeset_type/tmsgrav.cpp
r54000af ra6be476 249 249 //-------------------------------------------------------------------- 250 250 { 251 if(abort edMessageSended_)251 if(abortSuccMessageSent_) 252 252 { 253 253 //Std(BText("\nabortSucc[")+abortSuccFirst_+","+abortSuccLast_+"]"); … … 273 273 //-------------------------------------------------------------------- 274 274 { 275 if(abort edMessageSended_)275 if(abortPredMessageSent_) 276 276 { 277 277 //Std(BText("\nabortPred[")+abortPredFirst_+","+abortPredLast_+"]"); … … 299 299 //-------------------------------------------------------------------- 300 300 { 301 if(! abortedMessageSended_) { return; }301 if(!AbortMessageSent(sign)) { return; } 302 302 BTmsAbortable* T = (BTmsAbortable*)this; 303 303 if(sign<0) 304 304 { 305 if(abortPredFirst_.IsUnknown() || abortPredLast_.IsUnknown()) 306 { 307 T->abortPredFirst_ = d2; 305 if(abortPredLast_.IsUnknown()) 306 { 308 307 T->abortPredLast_ = d1; 309 308 } 310 else 311 { 312 if(abortPredLast_ <d1) { T->abortPredLast_ = d1; } 313 //if(abortPredFirst_>d2) { T->abortPredFirst_ = d2; } 309 else if(abortPredLast_ <d1) 310 { 311 T->abortPredLast_ = d1; 314 312 } 315 313 } 316 314 else 317 315 { 318 if( abortSuccFirst_.IsUnknown() || abortSuccLast_.IsUnknown())316 if(abortSuccFirst_.IsUnknown()) 319 317 { 320 318 T->abortSuccFirst_ = d1; 321 T->abortSuccLast_ = d2; 322 } 323 else 324 { 325 if(abortSuccFirst_>d1) { T->abortSuccFirst_ = d1; } 326 //if(abortSuccLast_< d2) { T->abortSuccLast_ = d2; } 319 } 320 else if(abortSuccFirst_>d1) 321 { 322 T->abortSuccFirst_ = d1; 327 323 } 328 324 } … … 336 332 //-------------------------------------------------------------------- 337 333 { 338 if(! abortedMessageSended_)334 if(!AbortMessageSent(sign)) 339 335 { 340 336 BText id = Identify(); … … 344 340 I2(" has been aborted ", 345 341 " ha sido abortado ")+id+ 346 I2(" operating between dates "," operando entre las fechas [")+d1+","+d2+"]"+"\n"+ 347 I2("Probably this is an expression of empty or bounded time set.", 348 "Probablemente se trata de una expresión de conjunto temporal vacío o acotado.")); 349 ((BTmsAbortable*)(this))->abortedMessageSended_ = true; 342 I2(" running "," ejecutando operaciones de tipo ")+ 343 ((sign>0)?I2("successor","sucesor"):I2("predecessor","predecesor"))+ 344 I2("-like operator between dates "," ejecutando entre las fechas [")+ 345 d1+","+d2+"]"+"\n"+ 346 I2("Probably this is an expression of empty time set, or out of valid time range.", 347 "Probablemente se trata de una expresión del conjunto temporal vacío o " 348 "acotado, o está fuera del rango temporal admitido.")); 349 if(sign>0) 350 { 351 ((BTmsAbortable*)(this))->abortSuccMessageSent_ = true; 352 } 353 else 354 { 355 ((BTmsAbortable*)(this))->abortPredMessageSent_ = true; 356 } 350 357 } 351 358 AbortSaveInfo(d1,d2, sign); … … 359 366 //-------------------------------------------------------------------- 360 367 { 361 if(! abortedMessageSended_)368 if(!AbortMessageSent(sign)) 362 369 { 363 370 int M = (int)OutOfRange().Value(); … … 368 375 I2(" has been aborted because it has fall out of calculation range ", 369 376 " ha sido abortado porque se ha salido del rango de cálculo ")+id+ 370 I2(" operating between dates "," operando entre las fechas [")+d1+","+d2+"]"+"\n"+ 371 I2("Probably this is an expression of empty time set.", 372 "Probablemente se trata de una expresión del conjunto temporal vacío o acotado.")); 373 ((BTmsAbortable*)(this))->abortedMessageSended_ = true; 377 I2(" running "," ejecutando operaciones de tipo ")+ 378 ((sign>0)?I2("successor","sucesor"):I2("predecessor","predecesor"))+ 379 I2("-like operator between dates "," ejecutando entre las fechas [")+ 380 d1+","+d2+"]"+"\n"+ 381 I2("Probably this is an expression of empty time set, or out of valid time range.", 382 "Probablemente se trata de una expresión del conjunto temporal vacío o " 383 "acotado, o está fuera del rango temporal admitido.")); 384 if(sign>0) 385 { 386 ((BTmsAbortable*)(this))->abortSuccMessageSent_ = true; 387 } 388 else 389 { 390 ((BTmsAbortable*)(this))->abortPredMessageSent_ = true; 391 } 374 392 } 375 393 AbortSaveInfo(d1,d2,sign); -
tol/btol/timeset_type/tol_btmset.h
r54000af ra6be476 119 119 const BText& msg, 120 120 const BText& interval); 121 virtual bool Abort edMessageSended() const{ return(false); }121 virtual bool AbortMessageSent(bool sign) { return(false); } 122 122 123 123 BBool IsCompatibleWith (const BTimeSet& tms, -
tol/btol/timeset_type/tol_btmsgrav.h
r54000af ra6be476 198 198 static BDat outOfRange_; 199 199 static BDat cutRangeFactor_; 200 bool abortedMessageSended_; 200 bool abortSuccMessageSent_; 201 bool abortPredMessageSent_; 201 202 BDate abortSuccFirst_; 202 203 BDate abortSuccLast_; … … 206 207 BTmsAbortable(BList* arg=NULL) 207 208 : BTmsCached(arg), 208 abortedMessageSended_(false), 209 abortSuccMessageSent_(false), 210 abortPredMessageSent_(false), 209 211 abortSuccFirst_(BDate::Unknown()), 210 212 abortSuccLast_ (BDate::Unknown()), … … 217 219 static BDat GetOutOfRange() { return(outOfRange_); } 218 220 static BDat GetCutRangeFactor() { return(cutRangeFactor_); } 219 bool AbortedMessageSended() const { return(abortedMessageSended_); } 221 bool AbortSuccMessageSent() const { return(abortSuccMessageSent_); } 222 bool AbortPredMessageSent() const { return(abortPredMessageSent_); } 223 bool AbortMessageSent(short sign) const 224 { 225 bool sent = (abortSuccMessageSent_ && (sign>0)) || 226 (abortPredMessageSent_ && (sign<0)); 227 return(sent); 228 } 220 229 221 230 protected:
Note: See TracChangeset
for help on using the changeset viewer.
