Version: 6.3.1

src/OBJECT/SMESH_vtkPVUpdateSuppressor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003  Program:   ParaView
00004  Module:    $RCSfile: SMESH_vtkPVUpdateSuppressor.h,v $
00005 
00006  Copyright (c) Kitware, Inc.
00007  All rights reserved.
00008  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
00009 
00010  This software is distributed WITHOUT ANY WARRANTY; without even
00011  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012  PURPOSE.  See the above copyright notice for more information.
00013 
00014  =========================================================================*/
00015 // .NAME vtkPVUpdateSuppressor - prevents propagation of update
00016 // .SECTION Description 
00017 // vtkPVUpdateSuppressor now uses the vtkProcessModule singleton to set up the
00018 // default values for UpdateNumberOfPieces and UpdatePiece, so we no longer have
00019 // to set the default values (in most cases).
00020 // .SECTION See Also
00021 // vtkPVCacheKeeper vtkUpdateSuppressorPipeline
00022 
00023 #ifndef __vtkPVUpdateSuppressor_h
00024 #define __vtkPVUpdateSuppressor_h
00025 
00026 #include "vtkDataObjectAlgorithm.h"
00027 
00028 class VTK_EXPORT vtkPVUpdateSuppressor: public vtkDataObjectAlgorithm
00029 {
00030 public:
00031 vtkTypeRevisionMacro(vtkPVUpdateSuppressor,vtkDataObjectAlgorithm)
00032   ;
00033   void PrintSelf(ostream& os, vtkIndent indent);
00034 
00035   // Description:
00036   // Construct with user-specified implicit function.
00037   static vtkPVUpdateSuppressor *New();
00038 
00039   // Description:
00040   // Force update on the input.
00041   virtual void ForceUpdate();
00042 
00043   // Description:
00044   // Set number of pieces and piece on the data.
00045   // This causes the filter to ingore the request from the output.
00046   // It is here because the user may not have celled update on the output
00047   // before calling force update (it is an easy fix).
00048   vtkSetMacro(UpdatePiece, int)
00049   ;
00050   vtkGetMacro(UpdatePiece, int)
00051   ;
00052   vtkSetMacro(UpdateNumberOfPieces, int)
00053   ;
00054   vtkGetMacro(UpdateNumberOfPieces, int)
00055   ;
00056 
00057   // Description:
00058   // Get/Set if the update suppressor is enabled. If the update suppressor 
00059   // is not enabled, it won't supress any updates. Enabled by default.
00060   void SetEnabled(int);
00061   vtkGetMacro(Enabled, int)
00062   ;
00063 
00064   // Description:
00065   // Get/Set the update time that is sent up the pipeline.
00066   void SetUpdateTime(double utime);
00067   vtkGetMacro(UpdateTime, double)
00068   ;
00069 
00070 protected:
00071   vtkPVUpdateSuppressor();
00072   ~vtkPVUpdateSuppressor();
00073 
00074   int RequestDataObject(vtkInformation* request,
00075                         vtkInformationVector **inputVector,
00076                         vtkInformationVector *outputVector);
00077   int RequestData(vtkInformation* request, vtkInformationVector **inputVector,
00078                   vtkInformationVector *outputVector);
00079 
00080   int UpdatePiece;
00081   int UpdateNumberOfPieces;
00082   double UpdateTime;
00083 
00084   bool UpdateTimeInitialized;
00085 
00086   int Enabled;
00087 
00088   vtkTimeStamp PipelineUpdateTime;
00089 
00090   // Create a default executive.
00091   virtual vtkExecutive* CreateDefaultExecutive();
00092 
00093 private:
00094   vtkPVUpdateSuppressor(const vtkPVUpdateSuppressor&); // Not implemented.
00095   void operator=(const vtkPVUpdateSuppressor&); // Not implemented.
00096 };
00097 
00098 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS