helper class to get/set property values. More...
#include <vtkSMPropertyHelper.h>
Public Member Functions | |
void | UpdateValueFromServer () |
Updates the property value by fetching the value from the server. More... | |
void | SetNumberOfElements (unsigned int elems) |
Set the number of elements in the property. More... | |
unsigned int | GetNumberOfElements () const |
Get the number of elements in the property. More... | |
void | RemoveAllValues () |
Equivalent to SetNumberOfElements(0). More... | |
vtkVariant | GetAsVariant (unsigned int index) const |
Get value as a variant. More... | |
template<class T > | |
std::vector< T > | GetArray () const |
Templated method to call GetIntArray(), GetDoubleArray(), GetIdTypeArray(). More... | |
template<class T > | |
T | GetAs (unsigned int index=0) const |
Templated method to call GetAsInt(), GetAsDouble(), GetAsIdType() Note, we only provide implementations for T==double, int, vtkIdType. More... | |
vtkIdType | GetAsIdType (unsigned int index=0) const |
std::vector< vtkIdType > | GetIdTypeArray () const |
void | RemoveStatus (const char *key) |
Removes the status value specified for the given key, if any. More... | |
void | SetUseUnchecked (bool val) |
Get/Set whether to use unchecked properties. More... | |
bool | GetUseUnchecked () const |
bool | Copy (const vtkSMPropertyHelper &source) |
Copy property values from another vtkSMPropertyHelper. More... | |
vtkSMPropertyHelper & | Modified () |
Set the proxy to modified if necessary before calling Set() Return reference so method chaining can be used. More... | |
template<> | |
std::vector< int > | GetArray () const |
template<> | |
std::vector< double > | GetArray () const |
template<> | |
int | GetAs (unsigned int index) const |
template<> | |
double | GetAs (unsigned int index) const |
vtkSMPropertyHelper (vtkSMProxy *proxy, const char *name, bool quiet=false) | |
If quiet is true, then no errors or warning are raised if the property is missing or of incorrect type. More... | |
vtkSMPropertyHelper (vtkSMProperty *property, bool quiet=false) | |
If quiet is true, then no errors or warning are raised if the property is missing or of incorrect type. More... | |
~vtkSMPropertyHelper () | |
If quiet is true, then no errors or warning are raised if the property is missing or of incorrect type. More... | |
void | Set (int value) |
Set/Get methods with int API. More... | |
void | Set (unsigned int index, int value) |
Set/Get methods with int API. More... | |
void | Set (const int *values, unsigned int count) |
Set/Get methods with int API. More... | |
void | Append (const int *values, unsigned int count) |
Set/Get methods with int API. More... | |
int | GetAsInt (unsigned int index=0) const |
Set/Get methods with int API. More... | |
unsigned int | Get (int *values, unsigned int count=1) const |
Set/Get methods with int API. More... | |
std::vector< int > | GetIntArray () const |
Set/Get methods with int API. More... | |
void | Set (double value) |
Set/Get methods with double API. More... | |
void | Set (unsigned int index, double value) |
Set/Get methods with double API. More... | |
void | Set (const double *values, unsigned int count) |
Set/Get methods with double API. More... | |
void | Append (const double *values, unsigned int count) |
Set/Get methods with double API. More... | |
double | GetAsDouble (unsigned int index=0) const |
Set/Get methods with double API. More... | |
unsigned int | Get (double *values, unsigned int count=1) const |
Set/Get methods with double API. More... | |
std::vector< double > | GetDoubleArray () const |
Set/Get methods with double API. More... | |
void | Set (const char *value) |
Set/Get methods for vtkSMStringVectorProperty. More... | |
void | Set (unsigned int index, const char *value) |
Set/Get methods for vtkSMStringVectorProperty. More... | |
const char * | GetAsString (unsigned int index=0) const |
Set/Get methods for vtkSMStringVectorProperty. More... | |
void | Set (vtkSMProxy *value, unsigned int outputport=0) |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty. More... | |
void | Set (unsigned int index, vtkSMProxy *value, unsigned int outputport=0) |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty. More... | |
void | Set (vtkSMProxy **value, unsigned int count, unsigned int *outputports=nullptr) |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty. More... | |
void | Add (vtkSMProxy *value, unsigned int outputport=0) |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty. More... | |
void | Remove (vtkSMProxy *value) |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty. More... | |
vtkSMProxy * | GetAsProxy (unsigned int index=0) const |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty. More... | |
unsigned int | GetOutputPort (unsigned int index=0) const |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty. More... | |
vtkSMOutputPort * | GetAsOutputPort (unsigned int index=0) const |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty. More... | |
void | SetStatus (const char *key, int value) |
This API is useful for setting values on vtkSMStringVectorProperty that is used for status where the first value is the name of the array (for example) and the second value is its status. More... | |
int | GetStatus (const char *key, int default_value=0) const |
This API is useful for setting values on vtkSMStringVectorProperty that is used for status where the first value is the name of the array (for example) and the second value is its status. More... | |
void | SetStatus (const char *key, double *values, int num_values) |
This API is useful for setting values on vtkSMStringVectorProperty that is used for status where the first value is the name of the array (for example), the second value is its status and the third value is number of status. More... | |
bool | GetStatus (const char *key, double *values, int num_values) const |
This API is useful for setting values on vtkSMStringVectorProperty that is used for status where the first value is the name of the array (for example), the second value is its status and the third value is number of status. More... | |
void | SetStatus (int key, int *values, int num_values) |
This API is useful for setting values on vtkSMIntVectorProperty that is used for status where the first value is the id of the element (for example), the second value is its status and the third value is number of status. More... | |
bool | GetStatus (int key, int *values, int num_values) const |
This API is useful for setting values on vtkSMIntVectorProperty that is used for status where the first value is the id of the element (for example), the second value is its status and the third value is number of status. More... | |
void | SetStatus (const char *key, const char *value) |
This API is useful for setting values on vtkSMStringVectorProperty that is used for status where the first value is the name of the array (for example) and the second value is its status (as a string) More... | |
const char * | GetStatus (const char *key, const char *default_value) const |
This API is useful for setting values on vtkSMStringVectorProperty that is used for status where the first value is the name of the array (for example) and the second value is its status (as a string) More... | |
void | SetStatus (int key, int value) |
This API is useful for setting values on vtkSMIntVectorProperty that is used for status where the first value is the id of the element (for example) and the second value is its status. More... | |
int | GetStatus (int key, int default_value=0) const |
This API is useful for setting values on vtkSMIntVectorProperty that is used for status where the first value is the id of the element (for example) and the second value is its status. More... | |
void | SetInputArrayToProcess (int fieldAssociation, const char *arrayName) |
For vtkSMStringVectorProperty that is used to setting input array to process on algorithms, this provides a convenient API to get/set the values. More... | |
int | GetInputArrayAssociation () const |
For vtkSMStringVectorProperty that is used to setting input array to process on algorithms, this provides a convenient API to get/set the values. More... | |
const char * | GetInputArrayNameToProcess () const |
For vtkSMStringVectorProperty that is used to setting input array to process on algorithms, this provides a convenient API to get/set the values. More... | |
Protected Member Functions | |
void | setUseUnchecked (bool useUnchecked) |
helper class to get/set property values.
vtkSMPropertyHelper is a helper class to get/set property values in a type independent fashion. eg.
Definition at line 52 of file vtkSMPropertyHelper.h.
vtkSMPropertyHelper::vtkSMPropertyHelper | ( | vtkSMProxy * | proxy, |
const char * | name, | ||
bool | quiet = false |
||
) |
If quiet is true, then no errors or warning are raised if the property is missing or of incorrect type.
vtkSMPropertyHelper::vtkSMPropertyHelper | ( | vtkSMProperty * | property, |
bool | quiet = false |
||
) |
If quiet is true, then no errors or warning are raised if the property is missing or of incorrect type.
vtkSMPropertyHelper::~vtkSMPropertyHelper | ( | ) |
If quiet is true, then no errors or warning are raised if the property is missing or of incorrect type.
void vtkSMPropertyHelper::UpdateValueFromServer | ( | ) |
Updates the property value by fetching the value from the server.
This only works for properties with InformationOnly
attribute set to 1. For all other properties, this has no effect.
void vtkSMPropertyHelper::SetNumberOfElements | ( | unsigned int | elems | ) |
Set the number of elements in the property.
For vtkSMProxyProperty, this is equivalent to SetNumberOfProxies().
unsigned int vtkSMPropertyHelper::GetNumberOfElements | ( | ) | const |
Get the number of elements in the property.
For vtkSMProxyProperty, this is equivalent to GetNumberOfProxies().
|
inline |
Equivalent to SetNumberOfElements(0).
Definition at line 87 of file vtkSMPropertyHelper.h.
vtkVariant vtkSMPropertyHelper::GetAsVariant | ( | unsigned int | index | ) | const |
Get value as a variant.
std::vector<T> vtkSMPropertyHelper::GetArray | ( | ) | const |
Templated method to call GetIntArray(), GetDoubleArray(), GetIdTypeArray().
Note, we only provide implementations for T==double, int, vtkIdType.
T vtkSMPropertyHelper::GetAs | ( | unsigned int | index = 0 | ) | const |
Templated method to call GetAsInt(), GetAsDouble(), GetAsIdType() Note, we only provide implementations for T==double, int, vtkIdType.
|
inline |
Set/Get methods with int
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
Definition at line 113 of file vtkSMPropertyHelper.h.
Set/Get methods with int
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
Set/Get methods with int
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
Set/Get methods with int
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
Set/Get methods with int
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
Set/Get methods with int
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
std::vector<int> vtkSMPropertyHelper::GetIntArray | ( | ) | const |
Set/Get methods with int
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
|
inline |
Set/Get methods with double
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
Definition at line 127 of file vtkSMPropertyHelper.h.
Set/Get methods with double
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
Set/Get methods with double
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
Set/Get methods with double
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
Set/Get methods with double
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
Set/Get methods with double
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
std::vector<double> vtkSMPropertyHelper::GetDoubleArray | ( | ) | const |
Set/Get methods with double
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
std::vector<vtkIdType> vtkSMPropertyHelper::GetIdTypeArray | ( | ) | const |
|
inline |
Set/Get methods for vtkSMStringVectorProperty.
Calling these methods on any other type of property will raise errors. These overloads can be used for vtkSMIntVectorProperty with an enumeration domain as well, in which case the string-to-int (and vice-versa) translations are done internally.
Definition at line 160 of file vtkSMPropertyHelper.h.
Set/Get methods for vtkSMStringVectorProperty.
Calling these methods on any other type of property will raise errors. These overloads can be used for vtkSMIntVectorProperty with an enumeration domain as well, in which case the string-to-int (and vice-versa) translations are done internally.
Set/Get methods for vtkSMStringVectorProperty.
Calling these methods on any other type of property will raise errors. These overloads can be used for vtkSMIntVectorProperty with an enumeration domain as well, in which case the string-to-int (and vice-versa) translations are done internally.
|
inline |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty.
Calling these methods on any other type of property will raise errors. The option outputport(s)
argument is used only for vtkSMInputProperty.
Definition at line 171 of file vtkSMPropertyHelper.h.
void vtkSMPropertyHelper::Set | ( | unsigned int | index, |
vtkSMProxy * | value, | ||
unsigned int | outputport = 0 |
||
) |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty.
Calling these methods on any other type of property will raise errors. The option outputport(s)
argument is used only for vtkSMInputProperty.
void vtkSMPropertyHelper::Set | ( | vtkSMProxy ** | value, |
unsigned int | count, | ||
unsigned int * | outputports = nullptr |
||
) |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty.
Calling these methods on any other type of property will raise errors. The option outputport(s)
argument is used only for vtkSMInputProperty.
void vtkSMPropertyHelper::Add | ( | vtkSMProxy * | value, |
unsigned int | outputport = 0 |
||
) |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty.
Calling these methods on any other type of property will raise errors. The option outputport(s)
argument is used only for vtkSMInputProperty.
void vtkSMPropertyHelper::Remove | ( | vtkSMProxy * | value | ) |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty.
Calling these methods on any other type of property will raise errors. The option outputport(s)
argument is used only for vtkSMInputProperty.
vtkSMProxy* vtkSMPropertyHelper::GetAsProxy | ( | unsigned int | index = 0 | ) | const |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty.
Calling these methods on any other type of property will raise errors. The option outputport(s)
argument is used only for vtkSMInputProperty.
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty.
Calling these methods on any other type of property will raise errors. The option outputport(s)
argument is used only for vtkSMInputProperty.
vtkSMOutputPort* vtkSMPropertyHelper::GetAsOutputPort | ( | unsigned int | index = 0 | ) | const |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty.
Calling these methods on any other type of property will raise errors. The option outputport(s)
argument is used only for vtkSMInputProperty.
This API is useful for setting values on vtkSMStringVectorProperty that is used for status where the first value is the name of the array (for example) and the second value is its status.
This API is useful for setting values on vtkSMStringVectorProperty that is used for status where the first value is the name of the array (for example) and the second value is its status.
This API is useful for setting values on vtkSMStringVectorProperty that is used for status where the first value is the name of the array (for example), the second value is its status and the third value is number of status.
This API is useful for setting values on vtkSMStringVectorProperty that is used for status where the first value is the name of the array (for example), the second value is its status and the third value is number of status.
This API is useful for setting values on vtkSMIntVectorProperty that is used for status where the first value is the id of the element (for example), the second value is its status and the third value is number of status.
This API is useful for setting values on vtkSMIntVectorProperty that is used for status where the first value is the id of the element (for example), the second value is its status and the third value is number of status.
This API is useful for setting values on vtkSMStringVectorProperty that is used for status where the first value is the name of the array (for example) and the second value is its status (as a string)
This API is useful for setting values on vtkSMStringVectorProperty that is used for status where the first value is the name of the array (for example) and the second value is its status (as a string)
void vtkSMPropertyHelper::RemoveStatus | ( | const char * | key | ) |
Removes the status value specified for the given key, if any.
Applicable only to vtkSMStringVectorProperty
objects, and this function assumes that the presence of a key in the property indicates that it is enabled.
This API is useful for setting values on vtkSMIntVectorProperty that is used for status where the first value is the id of the element (for example) and the second value is its status.
This API is useful for setting values on vtkSMIntVectorProperty that is used for status where the first value is the id of the element (for example) and the second value is its status.
For vtkSMStringVectorProperty that is used to setting input array to process on algorithms, this provides a convenient API to get/set the values.
int vtkSMPropertyHelper::GetInputArrayAssociation | ( | ) | const |
For vtkSMStringVectorProperty that is used to setting input array to process on algorithms, this provides a convenient API to get/set the values.
const char* vtkSMPropertyHelper::GetInputArrayNameToProcess | ( | ) | const |
For vtkSMStringVectorProperty that is used to setting input array to process on algorithms, this provides a convenient API to get/set the values.
|
inline |
Get/Set whether to use unchecked properties.
Definition at line 252 of file vtkSMPropertyHelper.h.
|
inline |
Definition at line 253 of file vtkSMPropertyHelper.h.
bool vtkSMPropertyHelper::Copy | ( | const vtkSMPropertyHelper & | source | ) |
Copy property values from another vtkSMPropertyHelper.
This only works for compatible properties and currently only supported for numeric vtkSMVectorProperty subclasses.
vtkSMPropertyHelper& vtkSMPropertyHelper::Modified | ( | ) |
Set the proxy to modified if necessary before calling Set() Return reference so method chaining can be used.
|
inlineprotected |
Definition at line 269 of file vtkSMPropertyHelper.h.
|
inline |
Definition at line 321 of file vtkSMPropertyHelper.h.
|
inline |
Definition at line 327 of file vtkSMPropertyHelper.h.
Definition at line 341 of file vtkSMPropertyHelper.h.
Definition at line 347 of file vtkSMPropertyHelper.h.
vtkSMProperty* vtkSMPropertyHelper::Property |
Definition at line 309 of file vtkSMPropertyHelper.h.
vtkSMVectorProperty* vtkSMPropertyHelper::VectorProperty |
Definition at line 310 of file vtkSMPropertyHelper.h.
vtkSMIntVectorProperty* vtkSMPropertyHelper::IntVectorProperty |
Definition at line 311 of file vtkSMPropertyHelper.h.
vtkSMDoubleVectorProperty* vtkSMPropertyHelper::DoubleVectorProperty |
Definition at line 312 of file vtkSMPropertyHelper.h.
vtkSMIdTypeVectorProperty* vtkSMPropertyHelper::IdTypeVectorProperty |
Definition at line 313 of file vtkSMPropertyHelper.h.
vtkSMStringVectorProperty* vtkSMPropertyHelper::StringVectorProperty |
Definition at line 314 of file vtkSMPropertyHelper.h.
vtkSMProxyProperty* vtkSMPropertyHelper::ProxyProperty |
Definition at line 315 of file vtkSMPropertyHelper.h.
vtkSMInputProperty* vtkSMPropertyHelper::InputProperty |
Definition at line 316 of file vtkSMPropertyHelper.h.