Back to index

salome-paravis  6.5.0
Public Member Functions | Public Attributes | Properties | Private Member Functions
paravisSM.Property Class Reference
Inheritance diagram for paravisSM.Property:
Inheritance graph

List of all members.

Public Member Functions

def __init__
def __repr__
def __call__
def __getattr__

Public Attributes




Private Member Functions

def _FindPropertyName
def _UpdateProperty

Detailed Description

Generic property object that provides access to one of the properties of
a server object. This class does not allow setting/getting any values but
provides an interface to update a property using __call__. This can be used
for command properties that correspond to function calls without arguments.
For example,
> proxy.Foo()
would push a Foo property which may cause the proxy to call a Foo method
on the actual VTK object.

For advanced users:
Python wrapper around a vtkSMProperty with a simple interface.
In addition to all method provided by vtkSMProperty (obtained by
forwarding unknown attributes requests to the underlying SMProxy),
Property and sub-class provide a list API.

Please note that some of the methods accessible through the Property
class are not listed by help() because the Property objects forward
unresolved attributes to the underlying object. To get the full list,
see also dir(proxy.SMProperty). See also the doxygen based documentation
of the vtkSMProperty C++ class.

Definition at line 517 of file

Constructor & Destructor Documentation

def paravisSM.Property.__init__ (   self,
Default constructor. Stores a reference to the proxy.

Reimplemented in paravisSM.ProxyProperty, and paravisSM.ArrayListProperty.

Definition at line 539 of file

00540     def __init__(self, proxy, smproperty):
00541         """Default constructor. Stores a reference to the proxy."""
00542         import weakref
00543         self.SMProperty = smproperty
00544         self.Proxy = proxy

Member Function Documentation

Forces a property update using InvokeCommand.

Definition at line 563 of file

00564     def __call__(self):
00565         """Forces a property update using InvokeCommand."""
00566         if type(self) is Property:
00567             self.Proxy.SMProxy.InvokeCommand(self._FindPropertyName())
00568         else:
00569             raise RuntimeError, "Cannot invoke this property"

Here is the call graph for this function:

def paravisSM.Property.__getattr__ (   self,

Reimplemented in paravisSM.ProxyProperty.

Definition at line 585 of file

00586     def __getattr__(self, name):
00587         "Unknown attribute requests get forwarded to SMProperty."
00588         return getattr(self.SMProperty, name)

Returns a string representation containing property name
and value

Definition at line 545 of file

00546     def __repr__(self):
00547         """Returns a string representation containing property name
00548         and value"""
00549         if not type(self) is Property:
00550             if self.GetData() is not None:
00551                 repr = self.GetData().__repr__()
00552             else:
00553                 repr = "None"
00554         else:
00555             repr = "Property name= "
00556             name = self.Proxy.GetPropertyName(self.SMProperty)
00557             if name:
00558                 repr += name
00559             else:
00560                 repr += "Unknown"
00562         return repr

Here is the call graph for this function:

def paravisSM.Property._FindPropertyName (   self) [private]

Definition at line 570 of file

00571     def _FindPropertyName(self):
00572         "Returns the name of this property."
00573         return self.Proxy.GetPropertyName(self.SMProperty)

Here is the caller graph for this function:

def paravisSM.Property._UpdateProperty (   self) [private]

Reimplemented in paravisSM.InputProperty, and paravisSM.FileNameProperty.

Definition at line 574 of file

00575     def _UpdateProperty(self):
00576         "Pushes the value of this property to the server."
00577         # For now, we are updating all properties. This is due to an
00578         # issue with the representations. Their VTK objects are not
00579         # created until Input is set therefore, updating a property
00580         # has no effect. Updating all properties everytime one is
00581         # updated has the effect of pushing values set before Input
00582         # when Input is updated.
00583         # self.Proxy.SMProxy.UpdateProperty(self._FindPropertyName())
00584         self.Proxy.SMProxy.UpdateVTKObjects()

Here is the caller graph for this function:

Member Data Documentation

Definition at line 543 of file

Definition at line 542 of file

Property Documentation

Initial value:
property(_FindPropertyName, None, None,
           "Returns the name for the property")

Definition at line 589 of file

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