ParaView
vtkSMTimeKeeperProxy.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: $RCSfile$
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
22 #ifndef vtkSMTimeKeeperProxy_h
23 #define vtkSMTimeKeeperProxy_h
24 
25 #include "vtkPVServerManagerCoreModule.h" //needed for exports
26 #include "vtkSMProxy.h"
27 
28 class VTKPVSERVERMANAGERCORE_EXPORT vtkSMTimeKeeperProxy : public vtkSMProxy
29 {
30 public:
31  static vtkSMTimeKeeperProxy* New();
33  void PrintSelf(ostream& os, vtkIndent indent);
34 
36 
41  virtual bool AddTimeSource(vtkSMProxy* proxy, bool suppress_input);
42  static bool AddTimeSource(vtkSMProxy* timeKeeper, vtkSMProxy* proxy, bool suppress_input)
43  {
45  return self ? self->AddTimeSource(proxy, suppress_input) : false;
46  }
48 
50 
53  virtual bool RemoveTimeSource(vtkSMProxy* proxy, bool unsuppress_input);
54  static bool RemoveTimeSource(vtkSMProxy* timeKeeper, vtkSMProxy* proxy, bool unsuppress_input)
55  {
57  return self ? self->RemoveTimeSource(proxy, unsuppress_input) : false;
58  }
60 
62 
66  virtual bool IsTimeSourceTracked(vtkSMProxy* proxy);
67  static bool IsTimeSourceTracked(vtkSMProxy* timeKeeper, vtkSMProxy* proxy)
68  {
70  return self ? self->IsTimeSourceTracked(proxy) : false;
71  }
73 
75 
80  virtual bool SetSuppressTimeSource(vtkSMProxy* proxy, bool suppress);
81  static bool SetSuppressTimeSource(vtkSMProxy* timeKeeper, vtkSMProxy* proxy, bool suppress)
82  {
84  return self ? self->SetSuppressTimeSource(proxy, suppress) : false;
85  }
87 
89 
93  virtual double GetLowerBoundTimeStep(double value);
94  static double GetLowerBoundTimeStep(vtkSMProxy* timeKeeper, double value)
95  {
97  return self ? self->GetLowerBoundTimeStep(value) : value;
98  }
100 
102 
106  virtual int GetLowerBoundTimeStepIndex(double value);
107  static int GetLowerBoundTimeStepIndex(vtkSMProxy* timeKeeper, double value)
108  {
110  return self ? self->GetLowerBoundTimeStepIndex(value) : 0;
111  }
113 
114 protected:
117 
118  virtual void CreateVTKObjects();
119 
120 private:
121  vtkSMTimeKeeperProxy(const vtkSMTimeKeeperProxy&) VTK_DELETE_FUNCTION;
122  void operator=(const vtkSMTimeKeeperProxy&) VTK_DELETE_FUNCTION;
123 };
124 
125 #endif
static int GetLowerBoundTimeStepIndex(vtkSMProxy *timeKeeper, double value)
Returns the index for the lower bound of the time specified in current timestep values, if possible.
static bool IsTimeSourceTracked(vtkSMProxy *timeKeeper, vtkSMProxy *proxy)
Returns true if the proxy has been added to time sources and not suppressed.
static vtkSMTimeKeeperProxy * SafeDownCast(vtkObject *o)
We simply pass the TimestepValues and TimeRange properties to the client-side vtkSMTimeKeeper instanc...
static bool RemoveTimeSource(vtkSMProxy *timeKeeper, vtkSMProxy *proxy, bool unsuppress_input)
Remove a particular time source.
void operator=(const vtkSMProxy &) VTK_DELETE_FUNCTION
static bool SetSuppressTimeSource(vtkSMProxy *timeKeeper, vtkSMProxy *proxy, bool suppress)
Set whether to suppress a time source that has been added to the time keeper.
static double GetLowerBoundTimeStep(vtkSMProxy *timeKeeper, double value)
Returns a time value after snapping to a lower-bound in the current timesteps.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkSMProxy * New()
virtual void CreateVTKObjects()
Given a class name (by setting VTKClassName) and server ids (by setting ServerIDs), this methods instantiates the objects on the server(s)
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
static bool AddTimeSource(vtkSMProxy *timeKeeper, vtkSMProxy *proxy, bool suppress_input)
Track timesteps provided by a source.