vtkSMDoubleVectorProperty.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
13 #ifndef vtkSMDoubleVectorProperty_h
14 #define vtkSMDoubleVectorProperty_h
15 
16 #include "vtkRemotingServerManagerModule.h" //needed for exports
17 #include "vtkSMVectorProperty.h"
18 
19 class vtkSMStateLocator;
20 
22 {
23 public:
26  void PrintSelf(ostream& os, vtkIndent indent) override;
27 
31  unsigned int GetNumberOfElements() override;
32 
37  void SetNumberOfElements(unsigned int num) override;
38 
44  int SetElement(unsigned int idx, double value);
45 
47 
54  int SetElements(const double* values);
55  int SetElements(const double* values, unsigned int numValues);
56  double* GetElements();
58 
60 
63  int SetUncheckedElements(const double* values);
64  int SetUncheckedElements(const double* values, unsigned int numValues);
66 
73  int SetElements1(double value0);
74 
81  int SetElements2(double value0, double value1);
82 
89  int SetElements3(double value0, double value1, double value2);
90 
97  int SetElements4(double value0, double value1, double value2, double value3);
98 
102  int AppendElements(const double* values, unsigned int numValues);
103 
107  int AppendUncheckedElements(const double* values, unsigned int numValues);
108 
112  double GetElement(unsigned int idx);
113 
119  unsigned int GetNumberOfUncheckedElements() override;
120 
127  double GetUncheckedElement(unsigned int idx);
128 
134  void SetUncheckedElement(unsigned int idx, double value);
135 
137 
149  vtkGetMacro(ArgumentIsArray, int);
150  vtkSetMacro(ArgumentIsArray, int);
152 
156  void Copy(vtkSMProperty* src) override;
157 
158  void ClearUncheckedElements() override;
159 
160  bool IsValueDefault() override;
161 
167  void ResetToXMLDefaults() override;
168 
169 protected:
171  ~vtkSMDoubleVectorProperty() override;
172 
173  friend class vtkSMRenderViewProxy;
174 
178  void WriteTo(vtkSMMessage*) override;
179 
183  void ReadFrom(const vtkSMMessage*, int msg_offset, vtkSMProxyLocator*) override;
184 
185  int ReadXMLAttributes(vtkSMProxy* parent, vtkPVXMLElement* element) override;
186 
188 
194  void SetNumberOfUncheckedElements(unsigned int num) override;
195 
199  int LoadState(vtkPVXMLElement* element, vtkSMProxyLocator* loader) override;
200 
201  // Save concrete property values into the XML state property declaration
202  void SaveStateValues(vtkPVXMLElement* propElement) override;
203 
204 private:
206  void operator=(const vtkSMDoubleVectorProperty&) = delete;
207 
208  class vtkInternals;
209  vtkInternals* Internals;
210 };
211 
212 #endif
virtual void SaveStateValues(vtkPVXMLElement *propertyElement)
This method must be overridden by concrete class in order to save the real property data...
virtual void WriteTo(vtkSMMessage *msg)
Let the property write its content into the stream.
void PrintSelf(ostream &os, vtkIndent indent) override
virtual void SetNumberOfUncheckedElements(unsigned int num)=0
API for setting unchecked element values.
#define VTKREMOTINGSERVERMANAGER_EXPORT
superclass for all SM properties
void Copy(vtkSMProperty *src) override
Copy all property values.
virtual void SetNumberOfElements(unsigned int num)=0
Sets the size of the vector.
abstract superclass for all vector properties
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
static vtkSMProperty * New()
implementation for View that includes render window and renderers.
virtual unsigned int GetNumberOfUncheckedElements()=0
API for setting unchecked element values.
property representing a vector of doubles
virtual void ReadFrom(const vtkSMMessage *, int vtkNotUsed(message_offset), vtkSMProxyLocator *)
Let the property read and set its content from the stream.
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
is used to locate proxies referred to in state xmls while loading state files.
void ClearUncheckedElements() override=0
API for setting unchecked element values.
virtual void ResetToXMLDefaults()
For properties that support specifying defaults in XML configuration, this method will reset the prop...
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
virtual int LoadState(vtkPVXMLElement *element, vtkSMProxyLocator *loader)
Updates state from an XML element.
int ReadXMLAttributes(vtkSMProxy *parent, vtkPVXMLElement *element) override
Set the appropriate ivars from the xml element.
virtual bool IsValueDefault()
Returns true if the property's value is different from the default value.
virtual unsigned int GetNumberOfElements()=0
Returns the size of the vector.
Class used to retrieve a given message state based on its GlobalID.