ParaView
vtkSMIntVectorProperty.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMIntVectorProperty.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 vtkSMIntVectorProperty_h
26 #define vtkSMIntVectorProperty_h
27 
28 #include "vtkPVServerManagerCoreModule.h" //needed for exports
29 #include "vtkSMVectorProperty.h"
30 
31 class vtkSMStateLocator;
32 
33 class VTKPVSERVERMANAGERCORE_EXPORT vtkSMIntVectorProperty : public vtkSMVectorProperty
34 {
35 public:
36  static vtkSMIntVectorProperty* New();
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, int value);
57 
59 
66  int SetElements(const int* values);
67  int SetElements(const int* values, unsigned int numElems);
68  int* GetElements();
70 
72 
75  int SetUncheckedElements(const int* values);
76  int SetUncheckedElements(const int* values, unsigned int numValues);
78 
85  int SetElements1(int value0);
86 
93  int SetElements2(int value0, int value1);
94 
101  int SetElements3(int value0, int value1, int value2);
102 
106  int GetElement(unsigned int idx);
107 
114  int GetUncheckedElement(unsigned int idx);
115 
121  void SetUncheckedElement(unsigned int idx, int value);
122 
128  virtual unsigned int GetNumberOfUncheckedElements();
129 
131 
143  vtkGetMacro(ArgumentIsArray, int);
144  vtkSetMacro(ArgumentIsArray, int);
145  vtkBooleanMacro(ArgumentIsArray, int);
147 
151  virtual void Copy(vtkSMProperty* src);
152 
156  int GetDefaultValue(int idx);
157 
158  virtual void ClearUncheckedElements();
159 
160  virtual bool IsValueDefault();
161 
167  virtual void ResetToXMLDefaults();
168 
169 protected:
172 
176  virtual void WriteTo(vtkSMMessage*);
177 
181  virtual void ReadFrom(const vtkSMMessage*, int msg_offset, vtkSMProxyLocator*);
182 
183  // Handle XML with int type for default values.
184  virtual int ReadXMLAttributes(vtkSMProxy* parent, vtkPVXMLElement* element);
185 
186  class vtkInternals;
187  vtkInternals* Internals;
188 
190 
196  virtual void SetNumberOfUncheckedElements(unsigned int num);
197 
201  virtual int LoadState(vtkPVXMLElement* element, vtkSMProxyLocator* loader);
202 
203  // Save concrete property values into the XML state property declaration
204  virtual void SaveStateValues(vtkPVXMLElement* propElement);
205 
206 private:
207  vtkSMIntVectorProperty(const vtkSMIntVectorProperty&) VTK_DELETE_FUNCTION;
208  void operator=(const vtkSMIntVectorProperty&) VTK_DELETE_FUNCTION;
209 };
210 
211 #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.
property representing a vector of integers
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()
virtual unsigned int GetNumberOfUncheckedElements()=0
API for setting unchecked element values.
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.
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.