ParaView
vtkSMIdTypeVectorProperty.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMIdTypeVectorProperty.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 vtkSMIdTypeVectorProperty_h
26 #define vtkSMIdTypeVectorProperty_h
27 
28 #include "vtkPVServerManagerCoreModule.h" //needed for exports
29 #include "vtkSMVectorProperty.h"
30 
31 class vtkSMStateLocator;
32 
33 class VTKPVSERVERMANAGERCORE_EXPORT vtkSMIdTypeVectorProperty : 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, vtkIdType value);
57 
59 
66  int SetElements(const vtkIdType* values);
67  int SetElements(const vtkIdType* values, unsigned int numValues);
69 
71 
74  int SetUncheckedElements(const vtkIdType* values);
75  int SetUncheckedElements(const vtkIdType* values, unsigned int numValues);
77 
84  int SetElements1(vtkIdType value0);
85 
92  int SetElements2(vtkIdType value0, vtkIdType value1);
93 
100  int SetElements3(vtkIdType value0, vtkIdType value1, vtkIdType value2);
101 
105  vtkIdType GetElement(unsigned int idx);
106 
113  vtkIdType GetUncheckedElement(unsigned int idx);
114 
120  void SetUncheckedElement(unsigned int idx, vtkIdType value);
121 
127  virtual unsigned int GetNumberOfUncheckedElements();
128 
130 
142  vtkGetMacro(ArgumentIsArray, int);
143  vtkSetMacro(ArgumentIsArray, int);
144  vtkBooleanMacro(ArgumentIsArray, int);
146 
150  virtual void Copy(vtkSMProperty* src);
151 
152  virtual void ClearUncheckedElements();
153 
159  virtual void ResetToXMLDefaults();
160 
161 protected:
164 
168  virtual void WriteTo(vtkSMMessage*);
169 
173  virtual void ReadFrom(const vtkSMMessage*, int msg_offset, vtkSMProxyLocator*);
174 
175  virtual int ReadXMLAttributes(vtkSMProxy* parent, vtkPVXMLElement* element);
176 
178 
184  virtual void SetNumberOfUncheckedElements(unsigned int num);
185 
189  virtual int LoadState(vtkPVXMLElement* element, vtkSMProxyLocator* loader);
190 
191  // Save concrete property values into the XML state property declaration
192  virtual void SaveStateValues(vtkPVXMLElement* propElement);
193 
194 private:
195  vtkSMIdTypeVectorProperty(const vtkSMIdTypeVectorProperty&) VTK_DELETE_FUNCTION;
196  void operator=(const vtkSMIdTypeVectorProperty&) VTK_DELETE_FUNCTION;
197 
198  class vtkInternals;
199  vtkInternals* Internals;
200 };
201 
202 #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...
property representing a vector of integers
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 unsigned int GetNumberOfElements()=0
Returns the size of the vector.
Class used to retreive a given message state based on its GlobalID.