41
41
#include " vtkCompositeDataPipeline.h"
42
42
#include " vtkTable.h"
43
43
#include " vtkTrivialProducer.h"
44
+ #include " vtkNew.h"
44
45
45
46
#include < set>
46
47
#include < vector>
@@ -1455,6 +1456,77 @@ void vtkAlgorithm::Update(int port)
1455
1456
this ->GetExecutive ()->Update (port);
1456
1457
}
1457
1458
1459
+ // ----------------------------------------------------------------------------
1460
+ int vtkAlgorithm::Update (int port, vtkInformationVector* requests)
1461
+ {
1462
+ vtkStreamingDemandDrivenPipeline* sddp =
1463
+ vtkStreamingDemandDrivenPipeline::SafeDownCast (this ->GetExecutive ());
1464
+ if (sddp)
1465
+ {
1466
+ return sddp->Update (port, requests);
1467
+ }
1468
+ else
1469
+ {
1470
+ return this ->GetExecutive ()->Update (port);
1471
+ }
1472
+ }
1473
+
1474
+ // ----------------------------------------------------------------------------
1475
+ int vtkAlgorithm::Update (vtkInformation* requests)
1476
+ {
1477
+ vtkNew<vtkInformationVector> reqs;
1478
+ reqs->SetInformationObject (0 , requests);
1479
+ return this ->Update (0 , reqs.GetPointer ());
1480
+ }
1481
+
1482
+ // ----------------------------------------------------------------------------
1483
+ int vtkAlgorithm::UpdatePiece (
1484
+ int piece, int numPieces, int ghostLevels, int * extents)
1485
+ {
1486
+ typedef vtkStreamingDemandDrivenPipeline vtkSDDP;
1487
+
1488
+ vtkNew<vtkInformation> reqs;
1489
+ reqs->Set (vtkSDDP::UPDATE_PIECE_NUMBER (), piece);
1490
+ reqs->Set (vtkSDDP::UPDATE_NUMBER_OF_PIECES (), numPieces);
1491
+ reqs->Set (vtkSDDP::UPDATE_NUMBER_OF_GHOST_LEVELS (), ghostLevels);
1492
+ if (extents)
1493
+ {
1494
+ reqs->Set (vtkSDDP::UPDATE_EXTENT (), extents, 6 );
1495
+ }
1496
+ return this ->Update (reqs.GetPointer ());
1497
+ }
1498
+
1499
+ // ----------------------------------------------------------------------------
1500
+ int vtkAlgorithm::UpdateExtent (int * extents)
1501
+ {
1502
+ typedef vtkStreamingDemandDrivenPipeline vtkSDDP;
1503
+
1504
+ vtkNew<vtkInformation> reqs;
1505
+ reqs->Set (vtkSDDP::UPDATE_EXTENT (), extents, 6 );
1506
+ return this ->Update (reqs.GetPointer ());
1507
+ }
1508
+
1509
+ // ----------------------------------------------------------------------------
1510
+ int vtkAlgorithm::UpdateTimeStep (
1511
+ double time, int piece, int numPieces, int ghostLevels, int * extents)
1512
+ {
1513
+ typedef vtkStreamingDemandDrivenPipeline vtkSDDP;
1514
+
1515
+ vtkNew<vtkInformation> reqs;
1516
+ reqs->Set (vtkSDDP::UPDATE_TIME_STEP (), time);
1517
+ if (piece >= 0 )
1518
+ {
1519
+ reqs->Set (vtkSDDP::UPDATE_PIECE_NUMBER (), piece);
1520
+ reqs->Set (vtkSDDP::UPDATE_NUMBER_OF_PIECES (), numPieces);
1521
+ reqs->Set (vtkSDDP::UPDATE_NUMBER_OF_GHOST_LEVELS (), ghostLevels);
1522
+ }
1523
+ if (extents)
1524
+ {
1525
+ reqs->Set (vtkSDDP::UPDATE_EXTENT (), extents, 6 );
1526
+ }
1527
+ return this ->Update (reqs.GetPointer ());
1528
+ }
1529
+
1458
1530
// ----------------------------------------------------------------------------
1459
1531
void vtkAlgorithm::PropagateUpdateExtent ()
1460
1532
{
@@ -1490,7 +1562,6 @@ void vtkAlgorithm::UpdateDataObject()
1490
1562
}
1491
1563
}
1492
1564
1493
-
1494
1565
// ----------------------------------------------------------------------------
1495
1566
void vtkAlgorithm::UpdateWholeExtent ()
1496
1567
{
@@ -1658,9 +1729,17 @@ void vtkAlgorithm::SetProgressText(const char* ptext)
1658
1729
}
1659
1730
}
1660
1731
1732
+ // This is here to shut off warnings about deprecated functions
1733
+ // calling deprecated functions.
1734
+ #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
1735
+ # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1736
+ #endif
1737
+
1738
+ #ifndef VTK_LEGACY_REMOVE
1661
1739
// -------------------------------------------------------------
1662
1740
int vtkAlgorithm::SetUpdateExtentToWholeExtent (int port)
1663
1741
{
1742
+ VTK_LEGACY_BODY (vtkAlgorithm::SetUpdateExtentToWholeExtent, " VTK 7.1" );
1664
1743
if (this ->GetOutputInformation (port))
1665
1744
{
1666
1745
return
@@ -1676,6 +1755,7 @@ int vtkAlgorithm::SetUpdateExtentToWholeExtent(int port)
1676
1755
// -------------------------------------------------------------
1677
1756
int vtkAlgorithm::SetUpdateExtentToWholeExtent ()
1678
1757
{
1758
+ VTK_LEGACY_BODY (vtkAlgorithm::SetUpdateExtentToWholeExtent, " VTK 7.1" );
1679
1759
return this ->SetUpdateExtentToWholeExtent (0 );
1680
1760
}
1681
1761
@@ -1685,6 +1765,7 @@ void vtkAlgorithm::SetUpdateExtent(int port,
1685
1765
int numPieces,
1686
1766
int ghostLevel)
1687
1767
{
1768
+ VTK_LEGACY_BODY (vtkAlgorithm::SetUpdateExtent, " VTK 7.1" );
1688
1769
if (this ->GetOutputInformation (port))
1689
1770
{
1690
1771
vtkStreamingDemandDrivenPipeline::SetUpdateExtent (
@@ -1695,10 +1776,20 @@ void vtkAlgorithm::SetUpdateExtent(int port,
1695
1776
}
1696
1777
}
1697
1778
1779
+ // -------------------------------------------------------------
1780
+ void vtkAlgorithm::SetUpdateExtent (int piece,
1781
+ int numPieces,
1782
+ int ghostLevel)
1783
+ {
1784
+ VTK_LEGACY_BODY (vtkAlgorithm::SetUpdateExtent, " VTK 7.1" );
1785
+ this ->SetUpdateExtent (0 , piece, numPieces, ghostLevel);
1786
+ }
1787
+
1698
1788
// -------------------------------------------------------------
1699
1789
void vtkAlgorithm::SetUpdateExtent (int port,
1700
1790
int extent[6 ])
1701
1791
{
1792
+ VTK_LEGACY_BODY (vtkAlgorithm::SetUpdateExtent, " VTK 7.1" );
1702
1793
if (this ->GetOutputInformation (port))
1703
1794
{
1704
1795
vtkStreamingDemandDrivenPipeline::SetUpdateExtent (
@@ -1707,6 +1798,15 @@ void vtkAlgorithm::SetUpdateExtent(int port,
1707
1798
}
1708
1799
}
1709
1800
1801
+ // -------------------------------------------------------------
1802
+ void vtkAlgorithm::SetUpdateExtent (int extent[6 ])
1803
+ {
1804
+ VTK_LEGACY_BODY (vtkAlgorithm::SetUpdateExtent, " VTK 7.1" );
1805
+ this ->SetUpdateExtent (0 , extent);
1806
+ }
1807
+
1808
+ #endif // VTK_LEGACY_REMOVE
1809
+
1710
1810
// ----------------------------------------------------------------------------
1711
1811
int * vtkAlgorithm::GetUpdateExtent (int port)
1712
1812
{
0 commit comments