ParaView
vtkSMDoubleMapProperty.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMMapProperty.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 =========================================================================*/
22 #ifndef vtkSMDoubleMapProperty_h
23 #define vtkSMDoubleMapProperty_h
24 
25 #include "vtkPVServerManagerCoreModule.h" //needed for exports
26 #include "vtkSMMapProperty.h"
27 
28 class vtkSMDoubleMapPropertyPrivate;
30 
31 class VTKPVSERVERMANAGERCORE_EXPORT vtkSMDoubleMapProperty : public vtkSMMapProperty
32 {
33 public:
34  static vtkSMDoubleMapProperty* New();
36  void PrintSelf(ostream& os, vtkIndent indent);
37 
41  void SetNumberOfComponents(unsigned int components);
42 
46  unsigned int GetNumberOfComponents();
47 
51  void SetElement(vtkIdType index, double value);
52 
56  void SetElements(vtkIdType index, const double* values);
57 
61  void SetElements(vtkIdType index, const double* values, unsigned int numValues);
62 
66  void SetElementComponent(vtkIdType index, unsigned int component, double value);
67 
71  double GetElement(vtkIdType index);
72 
76  double* GetElements(vtkIdType index);
77 
81  double GetElementComponent(vtkIdType index, vtkIdType component);
82 
86  void RemoveElement(vtkIdType index);
87 
91  virtual vtkIdType GetNumberOfElements();
92 
96  void ClearElements();
97 
101  VTK_NEWINSTANCE
102  vtkSMDoubleMapPropertyIterator* NewIterator();
103 
104  void* GetMapPointer();
105 
109  virtual void Copy(vtkSMProperty* src);
110 
116  virtual void ResetToXMLDefaults();
117 
118 protected:
121 
122  virtual void WriteTo(vtkSMMessage* msg);
123 
124  virtual void ReadFrom(
125  const vtkSMMessage* message, int message_offset, vtkSMProxyLocator* locator);
126 
127  virtual int ReadXMLAttributes(vtkSMProxy* parent, vtkPVXMLElement* element);
128 
129  virtual void SaveStateValues(vtkPVXMLElement* propertyElement);
130  virtual int LoadState(vtkPVXMLElement* element, vtkSMProxyLocator* loader);
131 
132 private:
133  vtkSMDoubleMapProperty(const vtkSMDoubleMapProperty&) VTK_DELETE_FUNCTION;
134  void operator=(const vtkSMDoubleMapProperty&) VTK_DELETE_FUNCTION;
135 
136  vtkSMDoubleMapPropertyPrivate* Private;
137 };
138 
139 #endif // vtkSMDoubleMapProperty_h
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.
superclass for all SM properties
virtual int ReadXMLAttributes(vtkSMProxy *parent, vtkPVXMLElement *element)
Set the appropriate ivars from the xml element.
a map property storing double values
virtual int LoadState(vtkPVXMLElement *element, vtkSMProxyLocator *loader)
Updates state from an XML element.
void PrintSelf(ostream &os, vtkIndent indent)
virtual vtkIdType GetNumberOfElements()
Returns the number of elements for the value type.
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
virtual void Copy(vtkSMProperty *src)
Copy all property values.
static vtkSMProperty * New()
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...
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
abstract superclass for all map properties