vtkSMDoubleVectorProperty.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMDoubleVectorProperty.h
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 =========================================================================*/
25 #ifndef vtkSMDoubleVectorProperty_h
26 #define vtkSMDoubleVectorProperty_h
27 
28 #include "vtkRemotingServerManagerModule.h" //needed for exports
29 #include "vtkSMVectorProperty.h"
30 
31 class vtkSMStateLocator;
32 
33 class VTKREMOTINGSERVERMANAGER_EXPORT vtkSMDoubleVectorProperty : public vtkSMVectorProperty
34 {
35 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
43  unsigned int GetNumberOfElements() override;
44 
49  void SetNumberOfElements(unsigned int num) override;
50 
56  int SetElement(unsigned int idx, double value);
57 
59 
66  int SetElements(const double* values);
67  int SetElements(const double* values, unsigned int numValues);
68  double* GetElements();
70 
72 
75  int SetUncheckedElements(const double* values);
76  int SetUncheckedElements(const double* values, unsigned int numValues);
78 
85  int SetElements1(double value0);
86 
93  int SetElements2(double value0, double value1);
94 
101  int SetElements3(double value0, double value1, double value2);
102 
109  int SetElements4(double value0, double value1, double value2, double value3);
110 
114  double GetElement(unsigned int idx);
115 
121  unsigned int GetNumberOfUncheckedElements() override;
122 
129  double GetUncheckedElement(unsigned int idx);
130 
136  void SetUncheckedElement(unsigned int idx, double value);
137 
139 
151  vtkGetMacro(ArgumentIsArray, int);
152  vtkSetMacro(ArgumentIsArray, int);
154 
158  void Copy(vtkSMProperty* src) override;
159 
160  void ClearUncheckedElements() override;
161 
162  bool IsValueDefault() override;
163 
169  void ResetToXMLDefaults() override;
170 
171 protected:
173  ~vtkSMDoubleVectorProperty() override;
174 
175  friend class vtkSMRenderViewProxy;
176 
180  void WriteTo(vtkSMMessage*) override;
181 
185  void ReadFrom(const vtkSMMessage*, int msg_offset, vtkSMProxyLocator*) override;
186 
187  int ReadXMLAttributes(vtkSMProxy* parent, vtkPVXMLElement* element) override;
188 
190 
196  void SetNumberOfUncheckedElements(unsigned int num) override;
197 
201  int LoadState(vtkPVXMLElement* element, vtkSMProxyLocator* loader) override;
202 
203  // Save concrete property values into the XML state property declaration
204  void SaveStateValues(vtkPVXMLElement* propElement) override;
205 
206 private:
208  void operator=(const vtkSMDoubleVectorProperty&) = delete;
209 
210  class vtkInternals;
211  vtkInternals* Internals;
212 };
213 
214 #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.
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:152
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.