ParaView
|
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) |
Get value as a variant. More... | |
template<class T > | |
std::vector< T > | GetArray () |
Templated method to call GetIntArray(), GetDoubleArray(), GetIdTypeArray(). More... | |
template<class T > | |
T | GetAs (unsigned int index=0) |
Templated method to call GetAsInt(), GetAsDouble(), GetAsIdType() Note, we only provide implementations for T==double, int, vtkIdType. More... | |
vtkIdType | GetAsIdType (unsigned int index=0) |
std::vector< vtkIdType > | GetIdTypeArray () |
void | SetUseUnchecked (bool val) |
Get/Set whether to use unchecked properties. More... | |
bool | GetUseUnchecked () |
bool | Copy (vtkSMPropertyHelper &source) |
Copy property values from another vtkSMPropertyHelper. More... | |
template<> | |
std::vector< int > | GetArray () |
template<> | |
std::vector< double > | GetArray () |
template<> | |
int | GetAs (unsigned int index) |
template<> | |
double | GetAs (unsigned int index) |
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... | |
int | GetAsInt (unsigned int index=0) |
Set/Get methods with int API. More... | |
unsigned int | Get (int *values, unsigned int count=1) |
Set/Get methods with int API. More... | |
std::vector< int > | GetIntArray () |
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... | |
double | GetAsDouble (unsigned int index=0) |
Set/Get methods with double API. More... | |
unsigned int | Get (double *values, unsigned int count=1) |
Set/Get methods with double API. More... | |
std::vector< double > | GetDoubleArray () |
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) |
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=NULL) |
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) |
Set/Get methods for vtkSMProxyProperty or vtkSMInputProperty. More... | |
unsigned int | GetOutputPort (unsigned int index=0) |
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 it's status. More... | |
int | GetStatus (const char *key, int default_value=0) |
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 it's 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) and the second value is it's status. More... | |
bool | GetStatus (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) and the second value is it's 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 it's status (as a string) More... | |
const char * | GetStatus (const char *key, const char *default_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 it's status (as a string) 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 () |
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 () |
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 89 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 124 of file vtkSMPropertyHelper.h.
vtkVariant vtkSMPropertyHelper::GetAsVariant | ( | unsigned int | index | ) |
Get value as a variant.
std::vector<T> vtkSMPropertyHelper::GetArray | ( | ) |
Templated method to call GetIntArray(), GetDoubleArray(), GetIdTypeArray().
Note, we only provide implementations for T==double, int, vtkIdType.
T vtkSMPropertyHelper::GetAs | ( | unsigned int | index = 0 | ) |
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 150 of file vtkSMPropertyHelper.h.
void vtkSMPropertyHelper::Set | ( | unsigned int | index, |
int | value | ||
) |
Set/Get methods with int
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
void vtkSMPropertyHelper::Set | ( | const int * | values, |
unsigned int | count | ||
) |
Set/Get methods with int
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
int vtkSMPropertyHelper::GetAsInt | ( | unsigned int | index = 0 | ) |
Set/Get methods with int
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
unsigned int vtkSMPropertyHelper::Get | ( | int * | values, |
unsigned int | count = 1 |
||
) |
Set/Get methods with int
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
std::vector<int> vtkSMPropertyHelper::GetIntArray | ( | ) |
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 163 of file vtkSMPropertyHelper.h.
void vtkSMPropertyHelper::Set | ( | unsigned int | index, |
double | value | ||
) |
Set/Get methods with double
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
void vtkSMPropertyHelper::Set | ( | const double * | values, |
unsigned int | count | ||
) |
Set/Get methods with double
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
double vtkSMPropertyHelper::GetAsDouble | ( | unsigned int | index = 0 | ) |
Set/Get methods with double
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
unsigned int vtkSMPropertyHelper::Get | ( | double * | values, |
unsigned int | count = 1 |
||
) |
Set/Get methods with double
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
std::vector<double> vtkSMPropertyHelper::GetDoubleArray | ( | ) |
Set/Get methods with double
API.
Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.
vtkIdType vtkSMPropertyHelper::GetAsIdType | ( | unsigned int | index = 0 | ) |
std::vector<vtkIdType> vtkSMPropertyHelper::GetIdTypeArray | ( | ) |
|
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 194 of file vtkSMPropertyHelper.h.
void vtkSMPropertyHelper::Set | ( | unsigned int | index, |
const char * | value | ||
) |
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.
const char* vtkSMPropertyHelper::GetAsString | ( | unsigned int | index = 0 | ) |
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 205 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 = NULL |
||
) |
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 | ) |
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.
unsigned int vtkSMPropertyHelper::GetOutputPort | ( | unsigned int | index = 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::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 it's status.
int vtkSMPropertyHelper::GetStatus | ( | const char * | key, |
int | default_value = 0 |
||
) |
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 it's status.
void vtkSMPropertyHelper::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) and the second value is it's status.
bool vtkSMPropertyHelper::GetStatus | ( | 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) and the second value is it's status.
void vtkSMPropertyHelper::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 it's status (as a string)
const char* vtkSMPropertyHelper::GetStatus | ( | const char * | key, |
const char * | default_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 it's status (as a string)
void vtkSMPropertyHelper::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.
int vtkSMPropertyHelper::GetInputArrayAssociation | ( | ) |
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 | ( | ) |
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 258 of file vtkSMPropertyHelper.h.
|
inline |
Definition at line 259 of file vtkSMPropertyHelper.h.
bool vtkSMPropertyHelper::Copy | ( | vtkSMPropertyHelper & | source | ) |
Copy property values from another vtkSMPropertyHelper.
This only works for compatible properties and currently only supported for numeric vtkSMVectorProperty subclasses.
|
inlineprotected |
Definition at line 269 of file vtkSMPropertyHelper.h.
|
inline |
Definition at line 319 of file vtkSMPropertyHelper.h.
|
inline |
Definition at line 325 of file vtkSMPropertyHelper.h.
|
inline |
Definition at line 339 of file vtkSMPropertyHelper.h.
|
inline |
Definition at line 345 of file vtkSMPropertyHelper.h.
vtkSMProperty* vtkSMPropertyHelper::Property |
Definition at line 307 of file vtkSMPropertyHelper.h.
vtkSMVectorProperty* vtkSMPropertyHelper::VectorProperty |
Definition at line 308 of file vtkSMPropertyHelper.h.
vtkSMIntVectorProperty* vtkSMPropertyHelper::IntVectorProperty |
Definition at line 309 of file vtkSMPropertyHelper.h.
vtkSMDoubleVectorProperty* vtkSMPropertyHelper::DoubleVectorProperty |
Definition at line 310 of file vtkSMPropertyHelper.h.
vtkSMIdTypeVectorProperty* vtkSMPropertyHelper::IdTypeVectorProperty |
Definition at line 311 of file vtkSMPropertyHelper.h.
vtkSMStringVectorProperty* vtkSMPropertyHelper::StringVectorProperty |
Definition at line 312 of file vtkSMPropertyHelper.h.
vtkSMProxyProperty* vtkSMPropertyHelper::ProxyProperty |
Definition at line 313 of file vtkSMPropertyHelper.h.
vtkSMInputProperty* vtkSMPropertyHelper::InputProperty |
Definition at line 314 of file vtkSMPropertyHelper.h.