Back to index

salome-paravis  6.5.0
Public Member Functions | Public Attributes | Properties
paravisSM.ExodusIIReaderProxy Class Reference
Inheritance diagram for paravisSM.ExodusIIReaderProxy:
Inheritance graph
[legend]
Collaboration diagram for paravisSM.ExodusIIReaderProxy:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def FileNameChanged
def SelectAllVariables
def DeselectAllVariables
def UpdatePipeline
def UpdatePipelineInformation
def GetDataInformation
def __getitem__
def GetPointDataInformation
def GetCellDataInformation
def GetFieldDataInformation
def __setattr__
def add_attribute
def InitializeFromProxy
def Initialize
def __eq__
def __ne__
def __iter__
def SetPropertyWithName
def GetPropertyValue
def GetProperty
def ListProperties

Public Attributes

 Port
 Observed
 ObserverTag
 SMProxy

Properties

 PointData = property(GetPointDataInformation, None, None, "Returns point data information")
 CellData = property(GetCellDataInformation, None, None, "Returns cell data information")
 FieldData = property(GetFieldDataInformation, None, None, "Returns field data information")

Detailed Description

Special class to define convenience functions for array
selection.

Definition at line 451 of file paravisSM.py.


Member Function Documentation

def paravisSM.Proxy.__eq__ (   self,
  other 
) [inherited]

Definition at line 243 of file paravisSM.py.

00243 
00244     def __eq__(self, other):
00245         "Returns true if the underlying SMProxies are the same."
00246         if isinstance(other, Proxy):
00247             try:
00248                 if self.Port != other.Port:
00249                     return False
00250             except:
00251                 pass
00252             ## VSV using IsSame instead ==
00253             return self.SMProxy.IsSame(other.SMProxy)
00254         return self.SMProxy.IsSame(other)

Here is the caller graph for this function:

def paravisSM.SourceProxy.__getitem__ (   self,
  idx 
) [inherited]
Given a slice, int or string, returns the corresponding
output port

Definition at line 415 of file paravisSM.py.

00415 
00416     def __getitem__(self, idx):
00417         """Given a slice, int or string, returns the corresponding
00418         output port"""
00419         if isinstance(idx, slice):
00420             indices = idx.indices(self.SMProxy.GetNumberOfOutputPorts())
00421             retVal = []
00422             for i in range(*indices):
00423                 retVal.append(OutputPort(self, i))
00424             return retVal
00425         elif isinstance(idx, int):
00426             if idx >= self.SMProxy.GetNumberOfOutputPorts() or idx < 0:
00427                 raise IndexError
00428             return OutputPort(self, idx)
00429         else:
00430             return OutputPort(self, self.SMProxy.GetOutputPortIndex(idx))

Here is the call graph for this function:

def paravisSM.Proxy.__iter__ (   self) [inherited]

Definition at line 259 of file paravisSM.py.

00259 
00260     def __iter__(self):
00261         "Creates an iterator for the properties."
00262         return PropertyIterator(self)

Here is the caller graph for this function:

def paravisSM.Proxy.__ne__ (   self,
  other 
) [inherited]

Definition at line 255 of file paravisSM.py.

00255 
00256     def __ne__(self, other):
00257         "Returns false if the underlying SMProxies are the same."
00258         return not self.__eq__(other)

Here is the call graph for this function:

def paravisSM.Proxy.__setattr__ (   self,
  name,
  value 
) [inherited]

Definition at line 200 of file paravisSM.py.

00200 
00201     def __setattr__(self, name, value):
00202         try:
00203             setter = getattr(self.__class__, name)
00204             setter = setter.__set__
00205         except AttributeError:
00206             if not hasattr(self, name):
00207                 raise AttributeError("Attribute %s does not exist. " % name +
00208                   " This class does not allow addition of new attributes to avoid " +
00209                   "mistakes due to typos. Use add_attribute() if you really want " +
00210                   "to add this attribute.")
00211             self.__dict__[name] = value
00212         else:
00213             setter(self, value)

def paravisSM.Proxy.add_attribute (   self,
  name,
  value 
) [inherited]

Definition at line 214 of file paravisSM.py.

00214 
00215     def add_attribute(self, name, value):
00216         self.__dict__[name] = value

Here is the caller graph for this function:

Definition at line 467 of file paravisSM.py.

00467 
00468     def DeselectAllVariables(self):
00469         "Deselects all variables."
00470         for prop in ('PointVariables', 'EdgeVariables', 'FaceVariables',
00471                      'ElementVariables', 'GlobalVariables'):
00472             f = getattr(self, prop)
00473             f.DeselectAll()

Reimplemented from paravisSM.SourceProxy.

Definition at line 455 of file paravisSM.py.

00455 
00456     def FileNameChanged(self):
00457         "Called when the filename changes. Selects all variables."
00458         SourceProxy.FileNameChanged(self)
00459         self.SelectAllVariables()

Here is the call graph for this function:

Returns the associated cell data information.

Definition at line 436 of file paravisSM.py.

00436 
00437     def GetCellDataInformation(self):
00438         """Returns the associated cell data information."""
00439         self.UpdatePipeline()
00440         return FieldDataInformation(self.SMProxy, self.Port, "CellData")

Here is the call graph for this function:

def paravisSM.SourceProxy.GetDataInformation (   self,
  idx = None 
) [inherited]
This method returns a DataInformation wrapper around a
vtkPVDataInformation

Definition at line 405 of file paravisSM.py.

00405 
00406     def GetDataInformation(self, idx=None):
00407         """This method returns a DataInformation wrapper around a
00408         vtkPVDataInformation"""
00409         if idx == None:
00410             idx = self.Port
00411         if self.SMProxy:
00412             return DataInformation( \
00413                 self.SMProxy.GetDataInformation(idx), \
00414                 self.SMProxy, idx)

Returns the associated cell data information.

Definition at line 441 of file paravisSM.py.

00441 
00442     def GetFieldDataInformation(self):
00443         """Returns the associated cell data information."""
00444         self.UpdatePipeline()
00445         return FieldDataInformation(self.SMProxy, self.Port, "FieldData")

Here is the call graph for this function:

Returns the associated point data information.

Definition at line 431 of file paravisSM.py.

00431 
00432     def GetPointDataInformation(self):
00433         """Returns the associated point data information."""
00434         self.UpdatePipeline()
00435         return FieldDataInformation(self.SMProxy, self.Port, "PointData")

Here is the call graph for this function:

def paravisSM.Proxy.GetProperty (   self,
  name 
) [inherited]
Given a property name, returns the property object.

Definition at line 292 of file paravisSM.py.

00292 
00293     def GetProperty(self, name):
00294         """Given a property name, returns the property object."""
00295         if name in self.__Properties and self.__Properties[name]():
00296             return self.__Properties[name]()
00297         smproperty = self.SMProxy.GetProperty(name)
00298         # Maybe they are looking by the label. Try to match that.
00299         if not smproperty:
00300             iter = PropertyIterator(self)
00301             for prop in iter:
00302                 if name == _make_name_valid(iter.PropertyLabel):
00303                     smproperty = prop.SMProperty
00304                     break
00305         if smproperty:
00306             property = _wrap_property(self, smproperty)
00307             if property is not None:
00308                 import weakref
00309                 self.__Properties[name] = weakref.ref(property)
00310             return property
00311         return None

Here is the call graph for this function:

Here is the caller graph for this function:

def paravisSM.Proxy.GetPropertyValue (   self,
  name 
) [inherited]
Returns a scalar for properties with 1 elements, the property
itself for vectors.

Definition at line 270 of file paravisSM.py.

00270 
00271     def GetPropertyValue(self, name):
00272         """Returns a scalar for properties with 1 elements, the property
00273         itself for vectors."""
00274         p = self.GetProperty(name)
00275         if isinstance(p, VectorProperty):
00276             if p.GetNumberOfElements() == 1 and not p.GetRepeatable():
00277                 if p.SMProperty.IsA("vtkSMStringVectorProperty") or not p.GetArgumentIsArray():
00278                     return p[0]
00279         elif isinstance(p, InputProperty):
00280             if not p.GetMultipleInput():
00281                 if len(p) > 0:
00282                     return p[0]
00283                 else:
00284                     return None
00285         elif isinstance(p, ProxyProperty):
00286             if not p.GetRepeatable():
00287                 if len(p) > 0:
00288                     return p[0]
00289                 else:
00290                     return None
00291         return p

Here is the call graph for this function:

def paravisSM.Proxy.Initialize (   self) [inherited]

Definition at line 239 of file paravisSM.py.

00239 
00240     def Initialize(self):
00241         "Overridden by the subclass created automatically"
00242         pass

def paravisSM.Proxy.InitializeFromProxy (   self,
  aProxy,
  update = True 
) [inherited]
Constructor. Assigns proxy to self.SMProxy, updates the server
object as well as register the proxy in _pyproxies dictionary.

Definition at line 230 of file paravisSM.py.

00230 
00231     def InitializeFromProxy(self, aProxy, update=True):
00232         """Constructor. Assigns proxy to self.SMProxy, updates the server
00233         object as well as register the proxy in _pyproxies dictionary."""
00234         import weakref
00235         self.SMProxy = aProxy
00236         if update:
00237             self.SMProxy.UpdateVTKObjects()
00238         _pyproxies[(self.SMProxy, self.Port)] = weakref.ref(self)

def paravisSM.Proxy.ListProperties (   self) [inherited]
Returns a list of all property names on this proxy.

Definition at line 312 of file paravisSM.py.

00312 
00313     def ListProperties(self):
00314         """Returns a list of all property names on this proxy."""
00315         property_list = []
00316         iter = self.__iter__()
00317         for property in iter:
00318             name = _make_name_valid(iter.PropertyLabel)
00319             if name:
00320                 property_list.append(name)
00321         return property_list

Here is the call graph for this function:

Definition at line 460 of file paravisSM.py.

00460 
00461     def SelectAllVariables(self):
00462         "Select all available variables for reading."
00463         for prop in ('PointVariables', 'EdgeVariables', 'FaceVariables',
00464                      'ElementVariables', 'GlobalVariables'):
00465             f = getattr(self, prop)
00466             f.SelectAll()

Here is the caller graph for this function:

def paravisSM.Proxy.SetPropertyWithName (   self,
  pname,
  arg 
) [inherited]
Generic method for setting the value of a property.

Definition at line 263 of file paravisSM.py.

00263 
00264     def SetPropertyWithName(self, pname, arg):
00265         """Generic method for setting the value of a property."""
00266         prop = self.GetProperty(pname)
00267         if prop is None:
00268             raise RuntimeError, "Property %s does not exist. Please check the property name for typos." % pname
00269         prop.SetData(arg)

Here is the call graph for this function:

def paravisSM.SourceProxy.UpdatePipeline (   self,
  time = None 
) [inherited]
This method updates the server-side VTK pipeline and the associated
data information. Make sure to update a source to validate the output
meta-data.

Definition at line 383 of file paravisSM.py.

00383 
00384     def UpdatePipeline(self, time=None):
00385         """This method updates the server-side VTK pipeline and the associated
00386         data information. Make sure to update a source to validate the output
00387         meta-data."""
00388         if time != None:
00389             self.SMProxy.UpdatePipeline(time)
00390         else:
00391             self.SMProxy.UpdatePipeline()
00392         # This is here to cause a receive
00393         # on the client side so that progress works properly.
00394         if ActiveConnection and ActiveConnection.IsRemote():
00395             self.SMProxy.GetDataInformation()

Here is the caller graph for this function:

This method updates the meta-data of the server-side VTK pipeline and
the associated information properties

Definition at line 400 of file paravisSM.py.

00400 
00401     def UpdatePipelineInformation(self):
00402         """This method updates the meta-data of the server-side VTK pipeline and
00403         the associated information properties"""
00404         self.SMProxy.UpdatePipelineInformation()

Here is the caller graph for this function:


Member Data Documentation

Definition at line 224 of file paravisSM.py.

Definition at line 225 of file paravisSM.py.

paravisSM.Proxy.Port [inherited]

Definition at line 169 of file paravisSM.py.

Definition at line 234 of file paravisSM.py.


Property Documentation

paravisSM.SourceProxy.CellData = property(GetCellDataInformation, None, None, "Returns cell data information") [static, inherited]

Definition at line 447 of file paravisSM.py.

paravisSM.SourceProxy.FieldData = property(GetFieldDataInformation, None, None, "Returns field data information") [static, inherited]

Definition at line 448 of file paravisSM.py.

paravisSM.SourceProxy.PointData = property(GetPointDataInformation, None, None, "Returns point data information") [static, inherited]

Definition at line 446 of file paravisSM.py.


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