ParaView
Public Member Functions | Protected Member Functions
vtkSMPropertyHelper Class Reference

helper class to get/set property values. More...

#include <vtkSMPropertyHelper.h>

Inheritance diagram for vtkSMPropertyHelper:
Inheritance graph
[legend]
Collaboration diagram for vtkSMPropertyHelper:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void UpdateValueFromServer ()
void SetNumberOfElements (unsigned int elems)
unsigned int GetNumberOfElements () const
void RemoveAllValues ()
vtkVariant GetAsVariant (unsigned int index)
vtkIdType GetAsIdType (unsigned int index=0)
std::vector< vtkIdTypeGetIdTypeArray ()
 vtkSMPropertyHelper (vtkSMProxy *proxy, const char *name, bool quiet=false)
 vtkSMPropertyHelper (vtkSMProperty *property, bool quiet=false)
 ~vtkSMPropertyHelper ()
void Set (int value)
void Set (unsigned int index, int value)
void Set (const int *values, unsigned int count)
int GetAsInt (unsigned int index=0)
unsigned int Get (int *values, unsigned int count=1)
std::vector< intGetIntArray ()
void Set (double value)
void Set (unsigned int index, double value)
void Set (const double *values, unsigned int count)
double GetAsDouble (unsigned int index=0)
unsigned int Get (double *values, unsigned int count=1)
std::vector< doubleGetDoubleArray ()
void Set (const char *value)
void Set (unsigned int index, const char *value)
const char * GetAsString (unsigned int index=0)
void Set (vtkSMProxy *value, unsigned int outputport=0)
void Set (unsigned int index, vtkSMProxy *value, unsigned int outputport=0)
void Set (vtkSMProxy **value, unsigned int count, unsigned int *outputports=NULL)
void Add (vtkSMProxy *value, unsigned int outputport=0)
void Remove (vtkSMProxy *value)
vtkSMProxyGetAsProxy (unsigned int index=0)
unsigned int GetOutputPort (unsigned int index=0)
void SetStatus (const char *key, int value)
int GetStatus (const char *key, int default_value=0)
void SetStatus (const char *key, double *values, int num_values)
bool GetStatus (const char *key, double *values, int num_values)
void SetStatus (const char *key, const char *value)
const char * GetStatus (const char *key, const char *default_value)

Protected Member Functions

void setUseUnchecked (bool useUnchecked)

Detailed Description

helper class to get/set property values.

vtkSMPropertyHelper is a helper class to get/set property values in a type independent fashion. eg.

    vtkSMPropertyHelper(proxy, "Visibility").Set(0);
    vtkSMPropertyHelper(proxy, "Input").Set(inputProxy, 0);

    double center[3] = {...};
    vtkSMPropertyHelper(proxy, "Center").Set(center, 3);
Caveat:
This class is not wrapped, hence not available in any of the wrapped languagues such as python.

Definition at line 87 of file vtkSMPropertyHelper.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().

void vtkSMPropertyHelper::RemoveAllValues ( ) [inline]

Equivalent to SetNumberOfElements(0).

Definition at line 112 of file vtkSMPropertyHelper.h.

vtkVariant vtkSMPropertyHelper::GetAsVariant ( unsigned int  index)

Get value as a variant.

void vtkSMPropertyHelper::Set ( int  value) [inline]

Set/Get methods with int API. Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.

Definition at line 120 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.

void vtkSMPropertyHelper::Set ( double  value) [inline]

Set/Get methods with double API. Calling these method on vtkSMStringVectorProperty or vtkSMProxyProperty will raise errors.

Definition at line 132 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 ( )
void vtkSMPropertyHelper::Set ( const char *  value) [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 161 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.

void vtkSMPropertyHelper::Set ( vtkSMProxy value,
unsigned int  outputport = 0 
) [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 = 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::setUseUnchecked ( bool  useUnchecked) [inline, protected]

Definition at line 206 of file vtkSMPropertyHelper.h.


Member Data Documentation

Definition at line 237 of file vtkSMPropertyHelper.h.

Definition at line 238 of file vtkSMPropertyHelper.h.

Definition at line 239 of file vtkSMPropertyHelper.h.

Definition at line 240 of file vtkSMPropertyHelper.h.

Definition at line 241 of file vtkSMPropertyHelper.h.

Definition at line 242 of file vtkSMPropertyHelper.h.

Definition at line 243 of file vtkSMPropertyHelper.h.

Definition at line 244 of file vtkSMPropertyHelper.h.


The documentation for this class was generated from the following file: