23 #ifndef vtkSMPropertyHelper_h 24 #define vtkSMPropertyHelper_h 70 void UpdateValueFromServer();
76 void SetNumberOfElements(
unsigned int elems);
82 unsigned int GetNumberOfElements()
const;
99 std::vector<T> GetArray()
const;
106 T GetAs(
unsigned int index = 0)
const;
113 void Set(
int value) { this->
Set(0, value); }
114 void Set(
unsigned int index,
int value);
115 void Set(
const int* values,
unsigned int count);
116 void Append(
const int* values,
unsigned int count);
117 int GetAsInt(
unsigned int index = 0)
const;
118 unsigned int Get(
int* values,
unsigned int count = 1)
const;
119 std::vector<int> GetIntArray()
const;
127 void Set(
double value) { this->
Set(0, value); }
128 void Set(
unsigned int index,
double value);
129 void Set(
const double* values,
unsigned int count);
130 void Append(
const double* values,
unsigned int count);
131 double GetAsDouble(
unsigned int index = 0)
const;
132 unsigned int Get(
double* values,
unsigned int count = 1)
const;
133 std::vector<double> GetDoubleArray()
const;
136 #if VTK_SIZEOF_ID_TYPE != VTK_SIZEOF_INT 142 void Set(
vtkIdType value) { this->Set(0, value); }
143 void Set(
unsigned int index,
vtkIdType value);
144 void Set(
const vtkIdType* values,
unsigned int count);
145 void Append(
const vtkIdType* values,
unsigned int count);
146 unsigned int Get(
vtkIdType* values,
unsigned int count = 1)
const;
148 vtkIdType GetAsIdType(
unsigned int index = 0)
const;
149 std::vector<vtkIdType> GetIdTypeArray()
const;
160 void Set(
const char* value) { this->
Set(0, value); }
161 void Set(
unsigned int index,
const char* value);
162 const char* GetAsString(
unsigned int index = 0)
const;
171 void Set(
vtkSMProxy* value,
unsigned int outputport = 0) { this->
Set(0, value, outputport); }
172 void Set(
unsigned int index,
vtkSMProxy* value,
unsigned int outputport = 0);
173 void Set(
vtkSMProxy** value,
unsigned int count,
unsigned int* outputports =
nullptr);
174 void Add(
vtkSMProxy* value,
unsigned int outputport = 0);
176 vtkSMProxy* GetAsProxy(
unsigned int index = 0)
const;
177 unsigned int GetOutputPort(
unsigned int index = 0)
const;
187 void SetStatus(
const char*
key,
int value);
188 int GetStatus(
const char* key,
int default_value = 0)
const;
197 void SetStatus(
const char* key,
double* values,
int num_values);
198 bool GetStatus(
const char* key,
double* values,
int num_values)
const;
207 void SetStatus(
int key,
int* values,
int num_values);
208 bool GetStatus(
int key,
int* values,
int num_values)
const;
217 void SetStatus(
const char* key,
const char* value);
218 const char* GetStatus(
const char* key,
const char* default_value)
const;
226 void RemoveStatus(
const char* key);
234 void SetStatus(
int key,
int value);
235 int GetStatus(
int key,
int default_value = 0)
const;
244 void SetInputArrayToProcess(
int fieldAssociation,
const char* arrayName);
245 int GetInputArrayAssociation()
const;
246 const char* GetInputArrayNameToProcess()
const;
276 template <
typename T>
277 T GetProperty(
unsigned int index)
const;
278 template <
typename T>
279 std::vector<T> GetPropertyArray()
const;
280 template <
typename T>
281 unsigned int GetPropertyArray(T* values,
unsigned int count = 1)
const;
282 template <
typename T>
283 void SetProperty(
unsigned int index, T value);
284 template <
typename T>
285 void SetPropertyArray(
const T* values,
unsigned int count);
286 void SetPropertyArrayIdType(
const vtkIdType* values,
unsigned int count);
287 template <
typename T>
288 void AppendPropertyArray(
const T* values,
unsigned int count);
289 template <
typename T>
323 return this->GetIntArray();
329 return this->GetDoubleArray();
332 #if VTK_SIZEOF_ID_TYPE != VTK_SIZEOF_INT 336 return this->GetIdTypeArray();
343 return this->GetAsInt(index);
349 return this->GetAsDouble(index);
352 #if VTK_SIZEOF_ID_TYPE != VTK_SIZEOF_INT 356 return this->GetAsIdType(index);
void Set(const char *value)
Set/Get methods for vtkSMStringVectorProperty.
vtkSMInputProperty * InputProperty
vtkSMDoubleVectorProperty * DoubleVectorProperty
property representing pointer(s) to vtkObject(s)
vtkSMProxyProperty * ProxyProperty
void setUseUnchecked(bool useUnchecked)
#define VTKREMOTINGSERVERMANAGER_EXPORT
property representing a vector of strings
vtkSMIdTypeVectorProperty * IdTypeVectorProperty
vtkSMStringVectorProperty * StringVectorProperty
superclass for all SM properties
void Set(vtkSMProxy *value, unsigned int outputport=0)
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty.
vtkSMVectorProperty * VectorProperty
void Set(double value)
Set/Get methods with double API.
property representing a vector of integers
abstract superclass for all vector properties
bool GetUseUnchecked() const
void RemoveAllValues()
Equivalent to SetNumberOfElements(0).
property representing a vector of integers
std::vector< T > GetArray() const
Templated method to call GetIntArray(), GetDoubleArray(), GetIdTypeArray().
T GetAs(unsigned int index=0) const
Templated method to call GetAsInt(), GetAsDouble(), GetAsIdType() Note, we only provide implementatio...
property representing a vector of doubles
void SetUseUnchecked(bool val)
Get/Set whether to use unchecked properties.
proxy for a VTK object(s) on a server
reference for an output port of a vtkAlgorithm.
void Set(int value)
Set/Get methods with int API.
vtkSMIntVectorProperty * IntVectorProperty
helper class to get/set property values.