ParaView
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 "vtkPVServerManagerCoreModule.h" //needed for exports
29 #include "vtkSMVectorProperty.h"
30 
31 class vtkSMStateLocator;
32 
33 class VTKPVSERVERMANAGERCORE_EXPORT vtkSMDoubleVectorProperty : public vtkSMVectorProperty
34 {
35 public:
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
43  virtual unsigned int GetNumberOfElements();
44 
49  virtual void SetNumberOfElements(unsigned int num);
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  virtual unsigned int GetNumberOfUncheckedElements();
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 
156 
162  vtkSetMacro(Precision, int);
163  vtkGetMacro(Precision, int);
165 
169  virtual void Copy(vtkSMProperty* src);
170 
171  virtual void ClearUncheckedElements();
172 
173  virtual bool IsValueDefault();
174 
180  virtual void ResetToXMLDefaults();
181 
182 protected:
185 
186  friend class vtkSMRenderViewProxy;
187 
191  virtual void WriteTo(vtkSMMessage*);
192 
196  virtual void ReadFrom(const vtkSMMessage*, int msg_offset, vtkSMProxyLocator*);
197 
198  virtual int ReadXMLAttributes(vtkSMProxy* parent, vtkPVXMLElement* element);
199 
202 
208  virtual void SetNumberOfUncheckedElements(unsigned int num);
209 
213  virtual int LoadState(vtkPVXMLElement* element, vtkSMProxyLocator* loader);
214 
215  // Save concrete property values into the XML state property declaration
216  virtual void SaveStateValues(vtkPVXMLElement* propElement);
217 
218 private:
219  vtkSMDoubleVectorProperty(const vtkSMDoubleVectorProperty&) VTK_DELETE_FUNCTION;
220  void operator=(const vtkSMDoubleVectorProperty&) VTK_DELETE_FUNCTION;
221 
222  class vtkInternals;
223  vtkInternals* Internals;
224 };
225 
226 #endif
virtual void SaveStateValues(vtkPVXMLElement *propertyElement)
This method must be overiden 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.
virtual int ReadXMLAttributes(vtkSMProxy *parent, vtkPVXMLElement *element)
Set the appropriate ivars from the xml element.
virtual void SetNumberOfUncheckedElements(unsigned int num)=0
API for setting unchecked element values.
superclass for all SM properties
void PrintSelf(ostream &os, vtkIndent indent)
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...
virtual void ClearUncheckedElements()=0
API for setting unchecked element values.
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.
vtkSMProxyInternals * Internals
Definition: vtkSMProxy.h:934
virtual void ResetToXMLDefaults()
For properties that support specifying defaults in XML configuration, this method will reset the prop...
virtual void Copy(vtkSMProperty *src)
Copy all property values.
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.
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 retreive a given message state based on its GlobalID.