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 "vtkRemotingServerManagerModule.h" //needed for exports
26 #include "vtkSMProxy.h"
27 
29 {
30 public:
31  static vtkSMTimeKeeperProxy* New();
33  void PrintSelf(ostream& os, vtkIndent indent) override;
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 
115 
120  virtual void UpdateTimeInformation();
121  static void UpdateTimeInformation(vtkSMProxy* timeKeeper)
122  {
124  {
125  self->UpdateTimeInformation();
126  }
127  }
129 
130 protected:
132  ~vtkSMTimeKeeperProxy() override;
133 
134  void CreateVTKObjects() override;
135 
136 private:
138  void operator=(const vtkSMTimeKeeperProxy&) = delete;
139 };
140 
141 #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)
void PrintSelf(ostream &os, vtkIndent indent) override
#define VTKREMOTINGSERVERMANAGER_EXPORT
We simply pass the TimestepValues and TimeRange properties to the client-side vtkSMTimeKeeper instanc...
static void UpdateTimeInformation(vtkSMProxy *timeKeeper)
Iterates over all sources providing time and calls vtkSMSourceProxy::UpdatePipelineInformation on the...
static bool RemoveTimeSource(vtkSMProxy *timeKeeper, vtkSMProxy *proxy, bool unsuppress_input)
Remove a particular time source.
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.
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
value
void operator=(const vtkSMProxy &)=delete
static bool AddTimeSource(vtkSMProxy *timeKeeper, vtkSMProxy *proxy, bool suppress_input)
Track timesteps provided by a source.