#include <vtkSMProxy.h>
Inheritance diagram for vtkSMProxy:
Public Types | |
enum | { COPY_PROXY_PROPERTY_VALUES_BY_REFERENCE = 0, COPY_PROXY_PROPERTY_VALUES_BY_CLONING } |
Public Member Functions | |
vtkTypeRevisionMacro (vtkSMProxy, vtkSMObject) | |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | AddProperty (const char *name, vtkSMProperty *prop) |
virtual void | UpdateVTKObjects () |
virtual void | UpdateSelfAndAllInputs () |
virtual void | UnRegister (vtkObjectBase *obj) |
vtkClientServerID | GetID (unsigned int idx) |
vtkClientServerID | GetSelfID () |
unsigned int | GetNumberOfIDs () |
vtkSMPropertyIterator * | NewPropertyIterator () |
unsigned int | GetNumberOfConsumers () |
vtkSMProxy * | GetConsumerProxy (unsigned int idx) |
vtkSMProperty * | GetConsumerProperty (unsigned int idx) |
virtual void | UpdateInformation () |
virtual void | UpdatePropertyInformation (vtkSMProperty *prop) |
virtual void | MarkAllPropertiesAsModified () |
void | SetServers (vtkTypeUInt32 servers) |
vtkTypeUInt32 | GetServers () |
virtual void | MarkConsumersAsModified () |
virtual void | SetName (const char *) |
virtual char * | GetName () |
vtkSMProperty * | GetProperty (const char *name) |
virtual char * | GetVTKClassName () |
virtual void | SetVTKClassName (const char *) |
virtual char * | GetXMLName () |
virtual char * | GetXMLGroup () |
void | Copy (vtkSMProxy *src) |
void | Copy (vtkSMProxy *src, const char *exceptionClass) |
virtual void | Copy (vtkSMProxy *src, const char *exceptionClass, int proxyPropertyCopyFlag) |
Static Public Member Functions | |
vtkSMProxy * | New () |
Protected Member Functions | |
vtkSMProxy () | |
~vtkSMProxy () | |
vtkSMProperty * | GetExposedProperty (const char *name) |
void | ExposeProperty (const char *name) |
virtual void | CreateVTKObjects (int numObjects) |
void | UnRegisterVTKObjects () |
virtual void | SetID (unsigned int idx, vtkClientServerID id) |
void | SetServersSelf (vtkTypeUInt32 servers) |
void | PushProperty (const char *name, vtkClientServerID id, vtkTypeUInt32 servers) |
void | RemoveAllObservers () |
void | SetPropertyModifiedFlag (const char *name, int flag) |
void | RemoveProperty (const char *name) |
void | AddPropertyToSelf (const char *name, vtkSMProperty *prop) |
void | AddSubProxy (const char *name, vtkSMProxy *proxy) |
void | RemoveSubProxy (const char *name) |
vtkSMProxy * | GetSubProxy (const char *name) |
void | AddConsumer (vtkSMProperty *property, vtkSMProxy *proxy) |
void | RemoveConsumer (vtkSMProperty *property, vtkSMProxy *proxy) |
void | RemoveAllConsumers () |
virtual vtkSMProperty * | GetProperty (const char *name, int selfOnly) |
virtual int | ReadXMLAttributes (vtkSMProxyManager *pm, vtkPVXMLElement *element) |
int | CreateSubProxiesAndProperties (vtkSMProxyManager *pm, vtkPVXMLElement *element) |
int | ArePropertiesModified (int selfOnly=0) |
void | SetXMLElement (vtkPVXMLElement *element) |
virtual void | SaveState (const char *name, ostream *file, vtkIndent indent) |
void | SetupSharedProperties (vtkSMProxy *subproxy, vtkPVXMLElement *element) |
void | SetupExposedProperties (vtkSMProxy *subproxy, vtkPVXMLElement *element) |
int | CreateProxyHierarchy (vtkSMProxyManager *pm, vtkPVXMLElement *element) |
virtual void | SetXMLName (const char *) |
virtual void | SetXMLGroup (const char *) |
void | AddProperty (const char *subProxyName, const char *name, vtkSMProperty *prop) |
vtkSMProperty * | NewProperty (const char *name) |
vtkSMProperty * | NewProperty (const char *name, vtkPVXMLElement *propElement) |
Protected Attributes | |
char * | Name |
char * | VTKClassName |
char * | XMLGroup |
char * | XMLName |
int | ObjectsCreated |
vtkTypeUInt32 | Servers |
int | DoNotModifyProperty |
int | InUpdateVTKObjects |
int | SelfPropertiesModified |
vtkClientServerID | SelfID |
vtkPVXMLElement * | XMLElement |
Friends | |
class | vtkSMProperty |
class | vtkSMProxyManager |
class | vtkSMInputProperty |
class | vtkSMProxyProperty |
class | vtkSMPropertyIterator |
class | vtkSMProxyObserver |
class | vtkSMSourceProxy |
vtkSMProxy manages VTK object(s) that are created on a server using the proxy pattern. The managed object is manipulated through properties. The type of object created and managed by vtkSMProxy is determined by the VTKClassName variable. The object is managed by getting the desired property from the proxy, changing it's value and updating the server with UpdateVTKObjects(). A proxy can be composite. Sub-proxies can be added by the proxy manager. This is transparent to the user who sees all properties as if they belong to the root proxy.
When defining a proxy in the XML configuration file, to derrive the property interface from another proxy definition, we can use attributes "base_proxygroup" and "base_proxyname" which identify the proxy group and proxy name of another proxy. Base interfaces can be defined recursively, however care must be taken to avoid cycles.
There are several special XML features available for subproxies. 1) It is possible to share properties among subproxies. eg.
<InputProperty name="Input" ...> ... <IntVectorProperty name="ScalarVisibility" ...> ... ... <InputProperty name="Input" ...> ... <IntVectorProperty name="ScalarVisibility" ...> ... ... <Exception name="Input" /> Thus, subproxies Mapper and Mapper2 share the properties that are common to both; except those listed as exceptions using the "Exception" tag.
2) It is possible for a subproxy to use proxy definition defined elsewhere by identifying the interface with attribues "proxygroup" and "proxyname". eg. <Proxy name="Mapper" proxygroup="mappers" proxyname="PolyDataMapper" />
3) It is possible to scope the properties exposed by a subproxy and expose only a fixed set of properties to be accessible from outside. eg. <Proxy name="Alpha" ..> .... <Proxy name="Mapper" proxygroup="mappers" proxyname="PolyDataMapper" /> <Property name="LookupTable ... /> Thus the only mapper property available on calling GetProperty on the proxy Alpha is "LookupTable". More than one property can be exposed. Note that properties that are not exposed are treated as non-saveable and non-animateable (see vtkSMProperty for details). Note that exposed property restrictions only work when using the GetProperty on the container proxy (in this case Alpha) or using the PropertyIterator obtained from the container proxy. If one is to some how obtain a pointer to the subproxy and call GetProperty on it, the properties exposed by the container class are no longer applicable.
Definition at line 116 of file vtkSMProxy.h.
|
Flags used for the proxyPropertyCopyFlag argument to the Copy method. Definition at line 245 of file vtkSMProxy.h. |
|
|
|
|
|
|
|
|
|
A proxy can be assigned a name. The name is used to indentify the proxy when saving ServerManager state. By default the name is set to pvTemp{d} where {d} gets substituted by the SelfID of the proxy. Reimplemented in vtkSMComparativeVisProxy. |
|
A proxy can be assigned a name. The name is used to indentify the proxy when saving ServerManager state. By default the name is set to pvTemp{d} where {d} gets substituted by the SelfID of the proxy. Reimplemented in vtkSMComparativeVisProxy. |
|
Add a property with the given key (name). The name can then be used to retrieve the property with GetProperty(). If a property with the given name has been added before, it will be replaced. This includes properties in sub-proxies. |
|
Return the property with the given name. If no property is found NULL is returned. Reimplemented in vtkSMSourceProxy. Definition at line 140 of file vtkSMProxy.h. |
|
Update the VTK object on the server by pushing the values of all modifed properties (un-modified properties are ignored). If the object has not been created, it will be created first. Reimplemented in vtkSM3DWidgetProxy, vtkSMBoxProxy, vtkSMBoxWidgetProxy, vtkSMImplicitPlaneProxy, vtkSMImplicitPlaneWidgetProxy, vtkSMLineWidgetProxy, vtkSMLookupTableProxy, vtkSMPickBoxWidgetProxy, vtkSMPickSphereWidgetProxy, vtkSMPointWidgetProxy, vtkSMSphereWidgetProxy, vtkSMTransformProxy, and vtkSMXYPlotActorProxy. |
|
Calls UpdateVTKObjects() on self and all proxies that depend on this proxy (through vtkSMProxyProperty properties). It will traverse the dependence tree and update starting from the source. This allows instantiating a whole pipeline (including connectivity) without having to worry about the order. Here is how to do it: * Create all proxies * Set all property values - make sure that input properties do not auto update by calling vtkSMInputProperty::SetInputsUpdateImmediately(0); * Call UpdateSelfAndAllInputs() on either all proxies or one that depends on all others (usually one or more DisplayWindows) * If necessary vtkSMInputProperty::SetInputsUpdateImmediately(1); Reimplemented in vtkSMSourceProxy. |
|
Returns the type of object managed by the proxy. |
|
the type of object created by the proxy. This is used only when creating the server objects. Once the server object(s) have been created, changing this has no effect. |
|
Overloaded to break the reference loop caused by the fact that proxies store their own ClientServer ids. |
|
Returns the id of a server object. |
|
Returns the Self ID of the proxy. Definition at line 184 of file vtkSMProxy.h. |
|
Returns the number of server ids (same as the number of server objects if CreateVTKObjects() has already been called) |
|
Returns a new (initialized) iterator of the properties. |
|
Returns the number of consumers. Consumers are proxies that point to this proxy through a property (usually vtkSMProxyProperty) |
|
Returns the consumer of given index. Consumers are proxies that point to this proxy through a property (usually vtkSMProxyProperty) |
|
Returns the corresponding property of the consumer of given index. Consumers are proxies that point to this proxy through a property (usually vtkSMProxyProperty) |
|
Assigned by the XML parser. The name assigned in the XML configuration. Can be used to figure out the origin of the proxy. |
|
Assigned by the XML parser. The group in the XML configuration that this proxy belongs to. Can be used to figure out the origin of the proxy. |
|
Updates all property informations by calling UpdateInformation() and populating the values. It also calls UpdateDependentDomains() on all properties to make sure that domains that depend on the information are updated. Reimplemented in vtkSMServerFileListingProxy, vtkSMSourceProxy, and vtkSMXYPlotActorProxy. |
|
Similar to UpdateInformation() but updates only the given property. If the property does not belong to the proxy, the call is ignored. |
|
Marks all properties as modified. This will cause them all to be sent to be sent on the next call to UpdateVTKObjects. This method is useful when the proxy is first created to make sure that the default property values in the properties is synced with the values in the actual objects. |
|
Set server ids on self and sub-proxies. |
|
Return the servers. |
|
Copies values of all the properties and sub-proxies from src. NOTE: This does NOT create properties and sub-proxies. Only copies values. Mismatched property and sub-proxy pairs are ignored. Properties of type exceptionClass are not copied. This is usually vtkSMInputProperty. proxyPropertyCopyFlag specifies how the values for vtkSMProxyProperty and its subclasses are copied over: by reference or by cloning (ie. creating new instances of the value proxies and synchronizing their values). |
|
Copies values of all the properties and sub-proxies from src. NOTE: This does NOT create properties and sub-proxies. Only copies values. Mismatched property and sub-proxy pairs are ignored. Properties of type exceptionClass are not copied. This is usually vtkSMInputProperty. proxyPropertyCopyFlag specifies how the values for vtkSMProxyProperty and its subclasses are copied over: by reference or by cloning (ie. creating new instances of the value proxies and synchronizing their values). |
|
Copies values of all the properties and sub-proxies from src. NOTE: This does NOT create properties and sub-proxies. Only copies values. Mismatched property and sub-proxy pairs are ignored. Properties of type exceptionClass are not copied. This is usually vtkSMInputProperty. proxyPropertyCopyFlag specifies how the values for vtkSMProxyProperty and its subclasses are copied over: by reference or by cloning (ie. creating new instances of the value proxies and synchronizing their values). Reimplemented in vtkSMAnimationCueManipulatorProxy, and vtkSMKeyFrameProxy. |
|
Calls MarkConsumersAsModified() on all consumers. Sub-classes should add their functionality and call this. Reimplemented in vtkSMCubeAxesDisplayProxy, vtkSMDataObjectDisplayProxy, vtkSMPointLabelDisplayProxy, vtkSMSourceProxy, and vtkSMXYPlotDisplayProxy. |
|
Return a property of the given name, provided it has been exposed (by a call to ExposeProperty()); |
|
Expose a property by the given name. |
|
Assigned by the XML parser. The name assigned in the XML configuration. Can be used to figure out the origin of the proxy. |
|
Assigned by the XML parser. The group in the XML configuration that this proxy belongs to. Can be used to figure out the origin of the proxy. |
|
Given the number of objects (numObjects), class name (VTKClassName) and server ids ( this->GetServerIDs()), this methods instantiates the objects on the server(s) Reimplemented in vtkSM3DWidgetProxy, vtkSMAnimationCueProxy, vtkSMAnimationSceneProxy, vtkSMAxesProxy, vtkSMBoxWidgetProxy, vtkSMCompositeDisplayProxy, vtkSMCompositeRenderModuleProxy, vtkSMCubeAxesDisplayProxy, vtkSMDataObjectDisplayProxy, vtkSMIceTDesktopRenderModuleProxy, vtkSMIceTMultiDisplayProxy, vtkSMImplicitPlaneWidgetProxy, vtkSMLineWidgetProxy, vtkSMLODDisplayProxy, vtkSMLookupTableProxy, vtkSMMPIRenderModuleProxy, vtkSMMultiDisplayProxy, vtkSMPointLabelDisplayProxy, vtkSMPointWidgetProxy, vtkSMRenderModuleProxy, vtkSMScalarBarActorProxy, vtkSMScalarBarWidgetProxy, vtkSMShrunkContoursProxy, vtkSMSourceProxy, vtkSMSphereWidgetProxy, vtkSMSummaryHelperProxy, vtkSMXMLPVAnimationWriterProxy, and vtkSMXYPlotDisplayProxy. |
|
UnRegister all managed objects. This also resets the ID list. However, it does not remove the properties. Reimplemented in vtkSMRenderModuleProxy. |
|
Add an ID to be managed by the proxy. In this case, the proxy takes control of the reference (it unassigns the ID in destructor). One easy of creating an empty proxy and assigning IDs to it is: proxy->SetVTKClassName("foobar"); proxy->CreateVTKObjects(0); proxy->SetID(0, id1); proxy->SetID(1, id2); |
|
Set server ids on self |
|
|
|
Cleanup code. Remove all observers from all properties assigned to this proxy. Called before deleting properties/ |
|
Changes the modified flag of a property. Used by the observers |
|
Add a property to either self (subProxyName = 0) or a sub-proxy. IMPORTANT: If subProxyName = 0, AddProperty() checks for a proxy with the given name in self and all sub-proxies, if one exists, it replaces it. In this special case, it is possible for the property to be added to a sub-proxy as opposed to self. |
|
Remove a property from the list. |
|
Add a property to self. |
|
Add a sub-proxy. |
|
Remove a sub-proxy. |
|
Returns a sub-proxy. Returns 0 if sub-proxy does not exist. |
|
Called by a proxy property, this adds the property,proxy pair to the list of consumers. |
|
Remove the property,proxy pair from the list of consumers. |
|
Remove all consumers. |
|
Creates a new proxy and initializes it by calling ReadXMLAttributes() with the right XML element. |
|
Creates a new proxy and initializes it by calling ReadXMLAttributes() with the right XML element. |
|
Return a property of the given name from self or one of the sub-proxies. If selfOnly is set, the sub-proxies are not checked. Reimplemented in vtkSMSourceProxy. |
|
Read attributes from an XML element. Reimplemented in vtkSMSourceProxy. |
|
|
|
|
|
|
|
Saves the state of the object in XML format. Should be overwritten by proxies and properties. Reimplemented from vtkSMObject. Reimplemented in vtkSM3DWidgetProxy, vtkSMImplicitPlaneWidgetProxy, vtkSMLineWidgetProxy, vtkSMPointWidgetProxy, vtkSMRenderModuleProxy, and vtkSMSphereWidgetProxy. |
|
|
|
|
|
|
|
Definition at line 288 of file vtkSMProxy.h. |
|
Definition at line 289 of file vtkSMProxy.h. |
|
Reimplemented in vtkSMSourceProxy. Definition at line 290 of file vtkSMProxy.h. |
|
Definition at line 291 of file vtkSMProxy.h. |
|
Definition at line 292 of file vtkSMProxy.h. |
|
Definition at line 293 of file vtkSMProxy.h. |
|
Definition at line 294 of file vtkSMProxy.h. |
|
Reimplemented in vtkSMComparativeVisProxy. Definition at line 432 of file vtkSMProxy.h. |
|
Definition at line 433 of file vtkSMProxy.h. |
|
Definition at line 434 of file vtkSMProxy.h. |
|
Definition at line 435 of file vtkSMProxy.h. |
|
Definition at line 436 of file vtkSMProxy.h. |
|
Definition at line 437 of file vtkSMProxy.h. |
|
Definition at line 438 of file vtkSMProxy.h. |
|
Definition at line 443 of file vtkSMProxy.h. |
|
Definition at line 447 of file vtkSMProxy.h. |
|
Definition at line 451 of file vtkSMProxy.h. |
|
Definition at line 454 of file vtkSMProxy.h. |