1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 863 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688
|
Author: Alastair McKinstry <[email protected]>
Description: Move auto_ptr -> std::unique_ptr() for c 11 standard
Last-Updated: 2017-03-24
Forwarded: no
Index: metview-5.1.0/src/Desktop/Log.cc
===================================================================
--- metview-5.1.0.orig/src/Desktop/Log.cc
metview-5.1.0/src/Desktop/Log.cc
@@ -56,11 56,11 @@ Log::operator ostream&()
if(tee_.get() == 0)
{
- auto_ptr<ostream> o(new ofstream(path_.str().c_str(),ios::app));
- out_ = o;
unique_ptr<ostream> o(new ofstream(path_.str().c_str(),ios::app));
out_ = move(o);
- auto_ptr<ostream> t(new TeeStream(global(),*out_));
- tee_ = t;
unique_ptr<ostream> t(new TeeStream(global(),*out_));
tee_ = move(t);
}
@@ -138,4 138,4 @@ ostream& Log::find(IconObject* o)
string str;
str=string(buf);
return str;
-}*/
\ No newline at end of file
}*/
Index: metview-5.1.0/src/Desktop/Log.h
===================================================================
--- metview-5.1.0.orig/src/Desktop/Log.h
metview-5.1.0/src/Desktop/Log.h
@@ -41,8 41,8 @@ private:
Log& operator=(const Log&);
Path path_;
- auto_ptr<ostream> out_;
- auto_ptr<ostream> tee_;
std::unique_ptr<ostream> out_;
std::unique_ptr<ostream> tee_;
IconObject* object_;
static ostream& global();
Index: metview-5.1.0/src/Macro/grib.cc
===================================================================
--- metview-5.1.0.orig/src/Macro/grib.cc
metview-5.1.0/src/Macro/grib.cc
@@ -456,10 456,10 @@ nontested_grib_api_port("GenerateFunctio
field *g = get_field(v,i,expand_mem);
field *h = get_field(w,i,expand_mem);
- auto_ptr<MvGridBase> grd( MvGridFactory( g ) );
unique_ptr<MvGridBase> grd( MvGridFactory( g ) );
if( ! grd->hasLocationInfo() )
return Error("GenerateFunction: unimplemented or spectral data - unable to extract location data");
- auto_ptr<MvGridBase> grdOut( MvGridFactory( h ) );
unique_ptr<MvGridBase> grdOut( MvGridFactory( h ) );
bool cont = true;
while( cont ) //-- process current field
@@ -606,11 606,11 @@ Value MaskFunction::Execute(int arity,Va
for(i = 0; i < v->count ;i )
{
- auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
unique_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
if(! grd->hasLocationInfo() )
return Error( "mask: unimplemented or spectral data - unable to extract location data" );
- auto_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
unique_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
for( int j=0; j < grd->length(); j )
{
@@ -709,7 709,7 @@ Value RMaskFunction::Execute( int arity,
for( i = 0; i < v->count; i ) //-- for all fields in a fieldset
{
- auto_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
unique_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
if(! newGrd->hasLocationInfo() )
return Error( "rmask: unimplemented or spectral data - unable to extract location data" );
@@ -805,7 805,7 @@ Value GridDistanceFunction::Execute( int
for( i = 0; i < v->count; i ) //-- for all fields in a fieldset
{
- auto_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
unique_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
if(! newGrd->hasLocationInfo() )
return Error( "distance: unimplemented or spectral data - unable to extract location data" );
@@ -1917,11 1917,11 @@ Value CosLatFunction::Execute(int,Value
for(i = 0; i < v->count ;i )
{
- auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
unique_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
if(! grd->hasLocationInfo() )
return Error( "coslat: unimplemented or spectral data - unable to extract location data" );
- auto_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
unique_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
for( int j=0; j < grd->length(); j )
{
@@ -1959,11 1959,11 @@ Value SinLatFunction::Execute(int,Value
for(i = 0; i < v->count ;i )
{
- auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
unique_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
if(! grd->hasLocationInfo() )
return Error( "sinlat: unimplemented or spectral data - unable to extract location data" );
- auto_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
unique_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
for( int j=0; j < grd->length(); j )
{
@@ -2077,7 2077,7 @@ Value GridLatLonsFunction::Execute(int /
for(i = 0; i < fs->count ;i ) // for each field...
{
- auto_ptr<MvGridBase> grid( MvGridFactory( fs->fields[i] ) );
unique_ptr<MvGridBase> grid( MvGridFactory( fs->fields[i] ) );
if(! grid->hasLocationInfo() )
return Error( "gridlats/gridlons: unimplemented or spectral data - unable to extract location data" );
@@ -2710,15 2710,15 @@ Value IntegrateFunction::Execute(int ari
for(i = 0; i < v->count ;i )
{
- auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
unique_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
if(! grd->hasLocationInfo() )
return Error( "integrate: unimplemented or spectral data - unable to extract location data" );
- auto_ptr<MvGridBase> maskgrd;
unique_ptr<MvGridBase> maskgrd;
if( z )
{
- auto_ptr<MvGridBase> tmp( MvGridFactory( z->fields[ z->count>1 ? i : 0 ] ) );
- maskgrd = tmp;
unique_ptr<MvGridBase> tmp( MvGridFactory( z->fields[ z->count>1 ? i : 0 ] ) );
maskgrd = move(tmp);
}
if( maskgrd.get() && ! maskgrd->isEqual( grd.get() ) )
@@ -2830,7 2830,7 @@ Value MinMaxAreaFunction::Execute(int, V
for(i = 0; i < v->count ;i )
{
- auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
unique_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
if(! grd->hasLocationInfo() )
return Error( "minvalue/maxvalue: unimplemented or spectral data - unable to extract location data" );
@@ -2971,7 2971,7 @@ Value InterpolateFunction::Execute(int a
release_field(g);
#else
- auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
unique_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
if( ! grd->hasLocationInfo() )
{
@@ -3272,7 3272,7 @@ Value NearestGridpointFunction::Execute(
vvals = new CVector(vlat->Count());
- auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
unique_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
if( ! grd->hasLocationInfo() )
{
@@ -3501,15 3501,15 @@ Value FindFunction::Execute(int arity,Va
for(i = 0; i < v->count ;i )
{
- auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
unique_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
if(! grd->hasLocationInfo() )
return Error( "find: unimplemented or spectral data - unable to extract location data" );
- auto_ptr<MvGridBase> maskgrd;
unique_ptr<MvGridBase> maskgrd;
if( z )
{
- auto_ptr<MvGridBase> tmp( MvGridFactory( z->fields[ z->count>1 ? i : 0 ] ) );
- maskgrd = tmp;
unique_ptr<MvGridBase> tmp( MvGridFactory( z->fields[ z->count>1 ? i : 0 ] ) );
maskgrd = move(tmp);
}
if( maskgrd.get() && ! maskgrd->isEqual( grd.get() ) )
@@ -3621,7 3621,7 @@ Value GFindFunction::Execute(int arity,V
for(int i = 0; i < v->count ;i )
{
- auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
unique_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
if(! grd->hasLocationInfo() )
return Error( "gfind: unimplemented or spectral data - unable to extract location data" );
@@ -3695,7 3695,7 @@ Value VertIntFunction::Execute(int arity
{
field *g = GetIndexedFieldWithAtLeastPackedMem (v,i);
//gribsec1 *s1 = (gribsec1*)&g->ksec1[0];
- auto_ptr<MvGridBase> grd( MvGridFactory( g ) );
unique_ptr<MvGridBase> grd( MvGridFactory( g ) );
//if(s1->parameter == 152) n = i;
if( grd->getLong(parameterKey) == 152 )
n = i;
@@ -4037,7 4037,7 @@ Value UniVertIntFunction::Execute(int /*
for(int i = 0; (i < fs_data->count) && (n_lnsp == -1) ; i)
{
f_lnsp_orig = GetIndexedFieldWithAtLeastPackedMem(fs_data,i);
- auto_ptr<MvGridBase> grd( MvGridFactory( f_lnsp_orig ) );
unique_ptr<MvGridBase> grd( MvGridFactory( f_lnsp_orig ) );
if( grd->getLong(parameterKey) == lnsp_ )
{
n_lnsp = i; //-- lnsp found - stop the loop
@@ -4605,7 4605,7 @@ Value UniThicknessAndPressureFunction::E
for(i = 0; i < w->count ;i )
{
field *g = GetIndexedFieldWithAtLeastPackedMem(w,i);
- auto_ptr<MvField> fld( new MvField( g ) );
unique_ptr<MvField> fld( new MvField( g ) );
levels[i] = (int)fld->level();
release_field(g);
}
@@ -4619,7 4619,7 @@ Value UniThicknessAndPressureFunction::E
for(int i = 0; i < v->count ;i )
{
- auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
unique_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
if(! grd->isValid() )
return Error( "unipressure/unithickness: cannot process this type of grid!" );
long param = grd->getLong(parameterKey);
@@ -4648,7 4648,7 @@ Value UniThicknessAndPressureFunction::E
grd->init();
field* h = copy_field(g,false);
- auto_ptr<MvGridBase> grdOut( MvGridFactory( h ) );
unique_ptr<MvGridBase> grdOut( MvGridFactory( h ) );
double a1, b1, a0, b0;
if( ! grd->vertCoordCoefs( a1, b1, level ) )
@@ -4880,7 4880,7 @@ Value GribMatrixFunction::Execute(int,Va
{
field *g = get_field(v,i,expand_mem);
//gribsec2_ll *s2 = (gribsec2_ll*) &g->ksec2[0];
- auto_ptr<MvGridBase> grd( MvGridFactory( g ) );
unique_ptr<MvGridBase> grd( MvGridFactory( g ) );
string gridType = grd->gridType();
if ((gridType != cLatLonGrid) && (gridType != cSatelliteImage))
@@ -4951,18 4951,18 @@ Value GribDirectionFunction::Execute(int
for(int i = 0; i < u->count ;i )
{
- auto_ptr<MvGridBase> gu( MvGridFactory( u->fields[i] ) );
unique_ptr<MvGridBase> gu( MvGridFactory( u->fields[i] ) );
if( gu->gridType() == "NA" )
return Error( "direction: U: cannot process this type of field!" );
- auto_ptr<MvGridBase> gv( MvGridFactory( v->fields[i] ) );
unique_ptr<MvGridBase> gv( MvGridFactory( v->fields[i] ) );
if( gv->gridType() == "NA" )
return Error( "direction: V: cannot process this type of field!" );
if( ! gu->isEqual( gv.get() ) )
return Error( "direction: U and V: different grids!" );
- auto_ptr<MvGridBase> gdir( MvGridFactory( dir->fields[i] ) );
unique_ptr<MvGridBase> gdir( MvGridFactory( dir->fields[i] ) );
for( int j=0; j < gu->length(); j )
{
@@ -5026,7 5026,7 @@ Value MeanEwFunction::Execute(int,Value
for( int i = 0; i < v->count; i )
{
- auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
unique_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
if(! grd->hasLocationInfo() )
return Error( "mean_ew: unimplemented grid type: %s", grd->gridType().c_str() );
@@ -5037,7 5037,7 @@ Value MeanEwFunction::Execute(int,Value
grd->gridType() != cGaussianReducedGrid )
return Error( "mean_ew: unsuitable grid type: %s", grd->gridType().c_str() );
- auto_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
unique_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
double currentLatRow = grd->lat_y();
bool cont = true;
@@ -5142,7 5142,7 @@ LatLonAverageFunction::Execute(int,Value
for( int fi = 0; fi < fs->count; fi ) //-- loop over fields in fieldset
{
- auto_ptr<MvGridBase> grd( MvGridFactory( fs->fields[fi] ) );
unique_ptr<MvGridBase> grd( MvGridFactory( fs->fields[fi] ) );
if(! grd->hasLocationInfo() )
return Error( "average_xx: unimplemented grid type: %s", grd->gridType().c_str() );
@@ -5326,12 5326,12 @@ Value GribIntToFloatFunction::Execute( i
for( int i = 0; i < v->count; i ) //-- for all fields in a fieldset
{
field *g = get_field(v,i,expand_mem);
- auto_ptr<MvGridBase> grd( MvGridFactory( g ) );
unique_ptr<MvGridBase> grd( MvGridFactory( g ) );
if(! grd->isValid() )
return Error( "float: unimplemented grid type: %s", grd->gridType().c_str() );
field *h = get_field(z,i,expand_mem);
- auto_ptr<MvGridBase> grdOut( MvGridFactory( h ) );
unique_ptr<MvGridBase> grdOut( MvGridFactory( h ) );
if(! grdOut->isValid() )
return Error( "float: unimplemented grid type: %s", grdOut->gridType().c_str() );
@@ -5404,12 5404,12 @@ Value GribFloatToIntFunction::Execute( i
for( int i = 0; i < v->count; i ) //-- for all fields in a fieldset
{
field *g = get_field(v,i,expand_mem); //-- input field
- auto_ptr<MvGridBase> grd( MvGridFactory( g ) );
unique_ptr<MvGridBase> grd( MvGridFactory( g ) );
if(! grd->isValid() )
return Error( "integer: unimplemented grid type: %s", grd->gridType().c_str() );
field *h = get_field(z,i,expand_mem); //-- output field
- auto_ptr<MvGridBase> grdOut( MvGridFactory( h ) );
unique_ptr<MvGridBase> grdOut( MvGridFactory( h ) );
if(! grdOut->isValid() )
return Error( "integer: unimplemented grid type: %s", grdOut->gridType().c_str() );
@@ -5565,11 5565,11 @@ Value CovarianceFunction::Execute(int ar
double CovarFunc( field* f1, field* f2, const MvGeoBox& area )
{
- auto_ptr<MvGridBase> grd1( MvGridFactory( f1 ) );
unique_ptr<MvGridBase> grd1( MvGridFactory( f1 ) );
if(! grd1->hasLocationInfo() )
throw MvException( "Unimplemented or spectral data - unable to extract location data" );
- auto_ptr<MvGridBase> grd2( MvGridFactory( f2 ) );
unique_ptr<MvGridBase> grd2( MvGridFactory( f2 ) );
if(! grd2->hasLocationInfo() )
throw MvException( "Unimplemented or spectral data - unable to extract location data" );
@@ -5903,7 5903,7 @@ Value FrequenciesFunction::Execute(int a
bool found;
for(i = 0; i < v->count ;i )
{
- auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
unique_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
if(! grd->hasLocationInfo() )
return Error( "frequencies: unimplemented or spectral data - unable to extract location data" );
@@ -5972,11 5972,11 @@ Value FillMVEWFunction::Execute(int,Valu
for( int i = 0; i < v->count; i )
{
- auto_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
unique_ptr<MvGridBase> grd( MvGridFactory( v->fields[i] ) );
if(! grd->isRegularLatLongGrid() )
return Error( "fill_missing_values_ew: implemented only for regular latlong format" );
- auto_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
unique_ptr<MvGridBase> newGrd( MvGridFactory( z->fields[i] ) );
// Copy first point
v1 = grd->value();
Index: metview-5.1.0/src/libMetview/MvFieldSet.cc
===================================================================
--- metview-5.1.0.orig/src/libMetview/MvFieldSet.cc
metview-5.1.0/src/libMetview/MvFieldSet.cc
@@ -1331,7 1331,7 @@ double MvField::covar( MvField& other,
}
//-- cReleaseMemoryFalse or cReleaseMemoryTrue???
- auto_ptr<MvGridBase> grd2( MvGridFactory( other.libmars_field(), cReleaseMemoryTrue ) );
std::unique_ptr<MvGridBase> grd2( MvGridFactory( other.libmars_field(), cReleaseMemoryTrue ) );
if( ! mvgrid_->isEqual( grd2.get() ) )
{
Index: metview-5.1.0/src/uPlot/Canvas.h
===================================================================
--- metview-5.1.0.orig/src/uPlot/Canvas.h
metview-5.1.0/src/uPlot/Canvas.h
@@ -195,7 195,7 @@ protected:
// Members
Device& myDevice_; // pointer to the device
-//D auto_ptr <DeviceDriver> canvasDeviceDriver_; // Pointer to the deviceDriver
//D unique_ptr <DeviceDriver> canvasDeviceDriver_; // Pointer to the deviceDriver
double aspectRatio_; // aspectRatio must be preserved
Index: metview-5.1.0/src/uPlot/CartesianView.cc
===================================================================
--- metview-5.1.0.orig/src/uPlot/CartesianView.cc
metview-5.1.0/src/uPlot/CartesianView.cc
@@ -313,7 313,7 @@ void CartesianView::DecodeDataUnit ( MvI
// Build a new data decoder, which will provide information
// about the data
- auto_ptr<Decoder> decoder ( DecoderFactory::Make ( givenUnit.Request() ) );
unique_ptr<Decoder> decoder ( DecoderFactory::Make ( givenUnit.Request() ) );
ensure (decoder.get() != 0);
int subpageId = 0;
Index: metview-5.1.0/src/uPlot/CommonXSectView.cc
===================================================================
--- metview-5.1.0.orig/src/uPlot/CommonXSectView.cc
metview-5.1.0/src/uPlot/CommonXSectView.cc
@@ -387,7 387,7 @@ void CommonXSectView::DecodeDataUnit ( M
// Build a new data decoder, which will provide information
// about the data
- auto_ptr<Decoder> decoder ( DecoderFactory::Make ( dataUnit.Request() ) );
unique_ptr<Decoder> decoder ( DecoderFactory::Make ( dataUnit.Request() ) );
ensure (decoder.get() != 0);
int subpageId = 0;
@@ -514,7 514,7 @@ bool CommonXSectView::NetCDFtoMatrix(MvI
MvRequest Matrix = du.Request();
MvRequest dcRequest = Matrix.getSubrequest("_DC_REQUEST" );
- auto_ptr<Decoder> decoder ( DecoderFactory::Make ( dcRequest ) );
unique_ptr<Decoder> decoder ( DecoderFactory::Make ( dcRequest ) );
int offset = Matrix("_OFFSET");
const char *fullName = Matrix("_FILE_NAME");
Index: metview-5.1.0/src/uPlot/DataBuilder.cc
===================================================================
--- metview-5.1.0.orig/src/uPlot/DataBuilder.cc
metview-5.1.0/src/uPlot/DataBuilder.cc
@@ -50,7 50,7 @@ DataBuilder::Execute (PmContext& context
// Then try to get from contents of file
if ( ! (const char *)viewName )
{
- auto_ptr<Decoder> decoder ( DecoderFactory::Make ( context.InRequest() ) );
unique_ptr<Decoder> decoder ( DecoderFactory::Make ( context.InRequest() ) );
viewName = decoder->GetView();
}
#endif
Index: metview-5.1.0/src/uPlot/GeoView.cc
===================================================================
--- metview-5.1.0.orig/src/uPlot/GeoView.cc
metview-5.1.0/src/uPlot/GeoView.cc
@@ -213,7 213,7 @@ void GeoView::DecodeDataUnit ( MvIcon& d
MvIconDataBase& dataBase = Owner().IconDataBase();
// Build a new data decoder, which will provide information about the data
- auto_ptr<Decoder> decoder ( DecoderFactory::Make ( dataUnit.Request() ) );
unique_ptr<Decoder> decoder ( DecoderFactory::Make ( dataUnit.Request() ) );
ensure (decoder.get() != 0);
// Inquire if this Page is empty
@@ -877,7 877,7 @@ void GeoView::UpdateView ( MvRequest& vi
viewRequest_ = viewRequest;
// Create a view associated to the page
- auto_ptr <PlotModView> view ( PlotModViewFactory::Make (Owner(), viewRequest ) );
unique_ptr <PlotModView> view ( PlotModViewFactory::Make (Owner(), viewRequest ) );
Owner().SetView(view);
#endif
}
Index: metview-5.1.0/src/uPlot/MapView.cc
===================================================================
--- metview-5.1.0.orig/src/uPlot/MapView.cc
metview-5.1.0/src/uPlot/MapView.cc
@@ -208,7 208,7 @@ void MapView::DecodeDataUnit ( MvIcon& d
// Build a new data decoder, which will provide information
// about the data
- auto_ptr<Decoder> decoder ( DecoderFactory::Make ( dataUnit.Request() ) );
unique_ptr<Decoder> decoder ( DecoderFactory::Make ( dataUnit.Request() ) );
ensure (decoder.get() != 0);
// Inquire if this Page is empty
@@ -379,7 379,7 @@ MapView::UpdateView ( MvRequest& viewReq
viewRequest_ = viewReq;
// Create a view associated to the page
- auto_ptr <PlotModView> view ( PlotModViewFactory::Make (Owner(), viewReq ) );
unique_ptr <PlotModView> view ( PlotModViewFactory::Make (Owner(), viewReq ) );
Owner().SetView(view);
#endif
}
Index: metview-5.1.0/src/uPlot/Page.cc
===================================================================
--- metview-5.1.0.orig/src/uPlot/Page.cc
metview-5.1.0/src/uPlot/Page.cc
@@ -30,15 30,15 @@ Page::Page ( MvRequest& pageRequest ):
dropShouldStay_(false)
{
// Each page has its own graphics engine
- auto_ptr <GraphicsEngine> eng ( GraphicsEngineFactory::Make ( *this ) );
- engine_ = eng;
unique_ptr <GraphicsEngine> eng ( GraphicsEngineFactory::Make ( *this ) );
engine_ = move(eng);
// Find out if there is a view associated with the request
MvRequest viewRequest = pageRequest.getSubrequest( "VIEW" );
const char* viewClass = (const char*)viewRequest.getVerb();
if ( viewClass && ObjectList::IsGeographicalView(viewClass) )
{
- auto_ptr <PmProjection> proj ( PmProjectionFactory::Make ( viewRequest ) );
unique_ptr <PmProjection> proj ( PmProjectionFactory::Make ( viewRequest ) );
// If AREA is not given, Magics will use the default value
if ( (const char*)viewRequest("AREA") )
@@ -75,8 75,8 @@ Page::Page ( MvRequest& pageRequest ):
}
// Create a view associated to the page
- auto_ptr <PlotModView> view ( PlotModViewFactory::Make (*this, viewRequest ) );
- myView_ = view;
unique_ptr <PlotModView> view ( PlotModViewFactory::Make (*this, viewRequest ) );
myView_ = move(view);
// By default, indicates that a drawing needs to be performed later.
// This default will be overrulled if the dropping icon triggers a call
@@ -98,16 98,16 @@ Page::Page ( const Page & old ):
{
// ZoomStacks not copied
// Easiest to make new projection from view request
- auto_ptr<PmProjection> proj( PmProjectionFactory::Make ( old.myView_->ViewRequest() ) );
- projection_ = proj;
unique_ptr<PmProjection> proj( PmProjectionFactory::Make ( old.myView_->ViewRequest() ) );
projection_ = move(proj);
// Each page has its own graphics engine, create one for this page
- auto_ptr <GraphicsEngine> eng ( GraphicsEngineFactory::Make ( *this ) );
- engine_ = eng;
unique_ptr <GraphicsEngine> eng ( GraphicsEngineFactory::Make ( *this ) );
engine_ = move(eng);
// Clone the view associated to the page and set the new owner.
- auto_ptr <PlotModView> view ( old.GetView().Clone() ) ;
- myView_ = view;
unique_ptr <PlotModView> view ( old.GetView().Clone() ) ;
myView_ = move(view);
myView_->Owner(*this);
}
@@ -1248,9 1248,9 @@ void
Page::SetProjection ( const MvRequest& viewRequest )
{
// Initialize projection based on a request
- auto_ptr <PmProjection> proj ( PmProjectionFactory::Make ( viewRequest ) );
unique_ptr <PmProjection> proj ( PmProjectionFactory::Make ( viewRequest ) );
- projection_ = proj;
projection_ = move(proj);
}
#if 0
Index: metview-5.1.0/src/uPlot/Page.h
===================================================================
--- metview-5.1.0.orig/src/uPlot/Page.h
metview-5.1.0/src/uPlot/Page.h
@@ -237,7 237,7 @@ public:
virtual PlotModView& GetView() const
{ return *myView_; }
- void SetView(auto_ptr<PlotModView>& newView)
void SetView(unique_ptr<PlotModView>& newView)
{ myView_ = newView; }
int FirstPrintable ();
@@ -302,9 302,9 @@ private:
Page& operator=(const Page&);
// Members
- auto_ptr <PlotModView> myView_;
unique_ptr <PlotModView> myView_;
- auto_ptr <GraphicsEngine> engine_;
unique_ptr <GraphicsEngine> engine_;
int firstVisible_;
int visibleCount_;
@@ -314,7 314,7 @@ private:
bool dropShouldStay_;
- auto_ptr <PmProjection> projection_; // projection associated with page
unique_ptr <PmProjection> projection_; // projection associated with page
DrawingPriority drawingPriority_;
};
Index: metview-5.1.0/src/uPlot/Presentable.cc
===================================================================
--- metview-5.1.0.orig/src/uPlot/Presentable.cc
metview-5.1.0/src/uPlot/Presentable.cc
@@ -987,8 987,8 @@ void
Presentable::SetDeviceData ( DeviceData* devdata )
{
require ( devdata != 0 );
- auto_ptr <DeviceData> p ( devdata );
- deviceData_ = p;
unique_ptr <DeviceData> p ( devdata );
deviceData_ = move(p);
}
DeviceData*
@@ -1622,7 1622,7 @@ void Presentable::GetDataUnitInfo ( MvRe
{
// Build a new data decoder, which will provide information
// about the data
- auto_ptr<Decoder> decoder ( DecoderFactory::Make ((*lCursor).Request() ) );
unique_ptr<Decoder> decoder ( DecoderFactory::Make ((*lCursor).Request() ) );
ensure (decoder.get() != 0);
// Read data headers (one by one)
Index: metview-5.1.0/src/uPlot/Presentable.h
===================================================================
--- metview-5.1.0.orig/src/uPlot/Presentable.h
metview-5.1.0/src/uPlot/Presentable.h
@@ -443,7 443,7 @@ protected:
MvRequest myRequest_; // request used to build me
int presentableId_; // unique Id
Presentable* myParent_; // next level up on the tree
- auto_ptr <DeviceData > deviceData_; // information on the device
std::unique_ptr <DeviceData > deviceData_; // information on the device
Location myLocation_; // position of the presentable
// Definition for the tree hierarchy of the Presentable class
Index: metview-5.1.0/src/uPlot/SuperPage.cc
===================================================================
--- metview-5.1.0.orig/src/uPlot/SuperPage.cc
metview-5.1.0/src/uPlot/SuperPage.cc
@@ -116,8 116,8 @@ SuperPage::SuperPage(const SuperPage &ol
printIndex_(0)
{
// Make a new icon db from the old one
- auto_ptr<MvIconDataBase> iconDb( new MvIconDataBase(old.IconDataBase() ) );
- iconDataBase_ = iconDb;
unique_ptr<MvIconDataBase> iconDb( new MvIconDataBase(old.IconDataBase() ) );
iconDataBase_ = move(iconDb);
// Set new owner for preferences
preferences_.Owner(*this);
@@ -590,9 590,9 @@ SuperPage::SetDeviceInfo ( const MvReque
// appropriate device Request
MvRequest deviceRequest = Device::CreateRequest ( inRequest );
- auto_ptr <Device> dev ( DeviceFactory::Make ( deviceRequest ) );
unique_ptr <Device> dev ( DeviceFactory::Make ( deviceRequest ) );
- myDevice_ = dev;
myDevice_ = move(dev);
// The device is a visitor - this command will trigger
// its visit (i.e., its traversal through the page hierarchy)
@@ -639,7 639,7 @@ SuperPage::GenerateMacro( )
GetAllRequests( plotReq, true ); // collect all plotting requests
// Create a new visitor
- auto_ptr <Visitor> vis ( new MacroVisitor ( macroFileName_, plotReq) );
unique_ptr <Visitor> vis ( new MacroVisitor ( macroFileName_, plotReq) );
// Visit me
vis->Visit (*this);
Index: metview-5.1.0/src/uPlot/SuperPage.h
===================================================================
--- metview-5.1.0.orig/src/uPlot/SuperPage.h
metview-5.1.0/src/uPlot/SuperPage.h
@@ -308,8 308,8 @@ public:
// Members
PaperSize size_; // size of superpage in paper coords (cms)
string macroFileName_; // name of the macro file which is produced
- auto_ptr <MvIconDataBase> iconDataBase_; // icon data base (one per superpage)
- auto_ptr <Device> myDevice_; // device (plot media)
std::unique_ptr <MvIconDataBase> iconDataBase_; // icon data base (one per superpage)
std::unique_ptr <Device> myDevice_; // device (plot media)
Preferences preferences_; // preferences associated to the superpage
#if 0
|