vtkSMTimeKeeperProxy.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
10 #ifndef vtkSMTimeKeeperProxy_h
11 #define vtkSMTimeKeeperProxy_h
12 
13 #include "vtkRemotingServerManagerModule.h" //needed for exports
14 #include "vtkSMProxy.h"
15 
17 {
18 public:
19  static vtkSMTimeKeeperProxy* New();
21  void PrintSelf(ostream& os, vtkIndent indent) override;
22 
24 
29  virtual bool AddTimeSource(vtkSMProxy* proxy, bool suppress_input);
30  static bool AddTimeSource(vtkSMProxy* timeKeeper, vtkSMProxy* proxy, bool suppress_input)
31  {
33  return self ? self->AddTimeSource(proxy, suppress_input) : false;
34  }
36 
38 
41  virtual bool RemoveTimeSource(vtkSMProxy* proxy, bool unsuppress_input);
42  static bool RemoveTimeSource(vtkSMProxy* timeKeeper, vtkSMProxy* proxy, bool unsuppress_input)
43  {
45  return self ? self->RemoveTimeSource(proxy, unsuppress_input) : false;
46  }
48 
50 
54  virtual bool IsTimeSourceTracked(vtkSMProxy* proxy);
55  static bool IsTimeSourceTracked(vtkSMProxy* timeKeeper, vtkSMProxy* proxy)
56  {
58  return self ? self->IsTimeSourceTracked(proxy) : false;
59  }
61 
63 
68  virtual bool SetSuppressTimeSource(vtkSMProxy* proxy, bool suppress);
69  static bool SetSuppressTimeSource(vtkSMProxy* timeKeeper, vtkSMProxy* proxy, bool suppress)
70  {
72  return self ? self->SetSuppressTimeSource(proxy, suppress) : false;
73  }
75 
77 
81  virtual double GetLowerBoundTimeStep(double value);
82  static double GetLowerBoundTimeStep(vtkSMProxy* timeKeeper, double value)
83  {
85  return self ? self->GetLowerBoundTimeStep(value) : value;
86  }
88 
90 
94  virtual int GetLowerBoundTimeStepIndex(double value);
95  static int GetLowerBoundTimeStepIndex(vtkSMProxy* timeKeeper, double value)
96  {
98  return self ? self->GetLowerBoundTimeStepIndex(value) : 0;
99  }
101 
103 
108  virtual void UpdateTimeInformation();
109  static void UpdateTimeInformation(vtkSMProxy* timeKeeper)
110  {
112  {
113  self->UpdateTimeInformation();
114  }
115  }
117 
118 protected:
120  ~vtkSMTimeKeeperProxy() override;
121 
122  void CreateVTKObjects() override;
123 
124 private:
126  void operator=(const vtkSMTimeKeeperProxy&) = delete;
127 };
128 
129 #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:140
value
void operator=(const vtkSMProxy &)=delete
static bool AddTimeSource(vtkSMProxy *timeKeeper, vtkSMProxy *proxy, bool suppress_input)
Track timesteps provided by a source.