Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkSMLink Class Referenceabstract

Abstract base class for proxy/property links. More...

#include <vtkSMLink.h>

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

Public Types

enum  UpdateDirections { NONE = 0, INPUT = 1, OUTPUT = 2 }
 
typedef vtkSMRemoteObject Superclass
 
- Public Types inherited from vtkSMRemoteObject
typedef vtkSMSessionObject Superclass
 
- Public Types inherited from vtkSMSessionObject
typedef vtkSMObject Superclass
 
- Public Types inherited from vtkSMObject
typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual void RemoveAllLinks ()=0
 Remove all links. More...
 
const vtkSMMessageGetFullState () override
 This method returns the full object state that can be used to create the object from scratch. More...
 
void LoadState (const vtkSMMessage *msg, vtkSMProxyLocator *locator) override
 This method is used to initialize the object to the given state If the definitionOnly Flag is set to True the proxy won't load the properties values and just setup the new proxy hierarchy with all subproxy globalIDs set. More...
 
virtual void UpdateState ()=0
 Update the internal protobuf state. More...
 
virtual unsigned int GetNumberOfLinkedObjects ()=0
 Get the number of object that are involved in this link. More...
 
virtual int GetLinkedObjectDirection (int index)=0
 Get the direction of a object involved in this link (see vtkSMLink::UpdateDirections) More...
 
virtual vtkSMProxyGetLinkedProxy (int index)=0
 Get a proxy involved in this link. More...
 
virtual void SetPropagateUpdateVTKObjects (int)
 This flag determines if UpdateVTKObjects calls are to be propagated. More...
 
virtual int GetPropagateUpdateVTKObjects ()
 This flag determines if UpdateVTKObjects calls are to be propagated. More...
 
virtual void PropagateUpdateVTKObjectsOn ()
 This flag determines if UpdateVTKObjects calls are to be propagated. More...
 
virtual void PropagateUpdateVTKObjectsOff ()
 This flag determines if UpdateVTKObjects calls are to be propagated. More...
 
virtual void SetEnabled (bool)
 Get/Set if the link is enabled. More...
 
virtual bool GetEnabled ()
 Get/Set if the link is enabled. More...
 
- Public Member Functions inherited from vtkSMRemoteObject
void PrintSelf (ostream &os, vtkIndent indent) override
 
void SetSession (vtkSMSession *) override
 Override the SetSession so if the object already have an ID we automatically register it to the associated session. More...
 
bool HasGlobalID ()
 Allow the user to test if the RemoteObject has already a GlobalID without assigning a new one to it. More...
 
virtual void EnableLocalPushOnly ()
 Allow to switch off any push of state change to the server for that particular object. More...
 
virtual void DisableLocalPushOnly ()
 Enable the given remote object to communicate its state normally to the server location. More...
 
virtual bool IsLocalPushOnly ()
 Let the session be aware that even if the Location is client only, the message should not be send to the server for a general broadcast. More...
 
virtual void SetLocation (vtkTypeUInt32)
 Get/Set the location where the underlying VTK-objects are created. More...
 
virtual vtkTypeUInt32 GetLocation ()
 Get/Set the location where the underlying VTK-objects are created. More...
 
virtual vtkTypeUInt32 GetGlobalID ()
 Get the global unique id for this object. More...
 
const char * GetGlobalIDAsString ()
 Get the global unique id for this object. More...
 
virtual void PrototypeOn ()
 Allow user to set the remote object to be discard for Undo/Redo action. More...
 
virtual void PrototypeOff ()
 Allow user to set the remote object to be discard for Undo/Redo action. More...
 
bool IsPrototype ()
 Allow user to set the remote object to be discard for Undo/Redo action. More...
 
virtual void SetPrototype (bool)
 Allow user to set the remote object to be discard for Undo/Redo action. More...
 
- Public Member Functions inherited from vtkSMSessionObject
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual vtkSMSessionProxyManagerGetSessionProxyManager ()
 Return the corresponding ProxyManager if any. More...
 
virtual vtkSMSessionGetSession ()
 Get/Set the session on wihch this object exists. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual vtkMTimeType GetMTime ()
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkSMLinkSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkSMRemoteObject
static int IsTypeOf (const char *type)
 
static vtkSMRemoteObjectSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkSMSessionObject
static vtkSMSessionObjectNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSMSessionObjectSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkSMObject
static vtkSMObjectNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSMObjectSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 
static vtkObjectBaseNew ()
 

Protected Member Functions

 vtkSMLink ()
 
 ~vtkSMLink () override
 
void PushStateToSession ()
 When the state has changed we call that method so the state can be shared if any collaboration is involved. More...
 
virtual void UpdateVTKObjects (vtkSMProxy *proxy)=0
 Called when an input proxy is updated (UpdateVTKObjects). More...
 
virtual void PropertyModified (vtkSMProxy *proxy, const char *pname)=0
 Called when a property of an input proxy is modified. More...
 
virtual void UpdateProperty (vtkSMProxy *caller, const char *pname)=0
 Called when a property is pushed. More...
 
void ObserveProxyUpdates (vtkSMProxy *proxy)
 Subclasses call this method to observer events on a INPUT proxy. More...
 
virtual void SaveXMLState (const char *linkname, vtkPVXMLElement *parent)=0
 Save the state of the link. More...
 
virtual int LoadXMLState (vtkPVXMLElement *linkElement, vtkSMProxyLocator *locator)=0
 Load the link state. More...
 
- Protected Member Functions inherited from vtkSMRemoteObject
 vtkSMRemoteObject ()
 Default constructor. More...
 
 ~vtkSMRemoteObject () override
 Destructor. More...
 
void PushState (vtkSMMessage *msg)
 Subclasses can call this method to send a message to its state object on the server processes specified. More...
 
bool PullState (vtkSMMessage *msg)
 Subclasses can call this method to pull the state from the state-object on the server processes specified. More...
 
void SetGlobalID (vtkTypeUInt32 guid)
 Set the GlobalUniqueId. More...
 
vtkTypeUInt32 GetFilteredLocation ()
 
- Protected Member Functions inherited from vtkSMSessionObject
 vtkSMSessionObject ()
 
 ~vtkSMSessionObject () override
 
- Protected Member Functions inherited from vtkSMObject
 vtkSMObject ()
 
 ~vtkSMObject () override
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkCommandObserver
 
int PropagateUpdateVTKObjects
 
bool Enabled
 
vtkSMMessageState
 
- Protected Attributes inherited from vtkSMRemoteObject
vtkTypeUInt32 GlobalID
 
vtkTypeUInt32 Location
 
bool Prototype
 
bool ClientOnlyLocationFlag
 
- Protected Attributes inherited from vtkSMSessionObject
vtkWeakPointer< vtkSMSessionSession
 Identifies the session id to which this object is related. More...
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Friends

class vtkSMLinkObserver
 
class vtkSMStateLoader
 
class vtkSMSessionProxyManager
 

Detailed Description

Abstract base class for proxy/property links.

Abstract base class for proxy/property links. Links provide a means to connect two properties (or proxies) together, thus when one is updated, the dependent one is updated accordingly.

Definition at line 36 of file vtkSMLink.h.

Member Typedef Documentation

◆ Superclass

Definition at line 39 of file vtkSMLink.h.

Member Enumeration Documentation

◆ UpdateDirections

Enumerator
NONE 
INPUT 
OUTPUT 

Definition at line 42 of file vtkSMLink.h.

Constructor & Destructor Documentation

◆ vtkSMLink()

vtkSMLink::vtkSMLink ( )
protected

◆ ~vtkSMLink()

vtkSMLink::~vtkSMLink ( )
overrideprotected

Member Function Documentation

◆ GetClassName()

virtual const char* vtkSMLink::GetClassName ( )
virtual

◆ IsTypeOf()

static int vtkSMLink::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkSMLink::IsA ( const char *  type)
virtual

◆ SafeDownCast()

static vtkSMLink* vtkSMLink::SafeDownCast ( vtkObject o)
static

◆ PrintSelf()

void vtkSMLink::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Reimplemented from vtkObject.

Reimplemented in vtkSMProxyLink, vtkSMPropertyLink, vtkSMSelectionLink, and vtkSMCameraLink.

◆ SetPropagateUpdateVTKObjects()

virtual void vtkSMLink::SetPropagateUpdateVTKObjects ( int  )
virtual

This flag determines if UpdateVTKObjects calls are to be propagated.

Set to 1 by default.

◆ GetPropagateUpdateVTKObjects()

virtual int vtkSMLink::GetPropagateUpdateVTKObjects ( )
virtual

This flag determines if UpdateVTKObjects calls are to be propagated.

Set to 1 by default.

◆ PropagateUpdateVTKObjectsOn()

virtual void vtkSMLink::PropagateUpdateVTKObjectsOn ( )
virtual

This flag determines if UpdateVTKObjects calls are to be propagated.

Set to 1 by default.

◆ PropagateUpdateVTKObjectsOff()

virtual void vtkSMLink::PropagateUpdateVTKObjectsOff ( )
virtual

This flag determines if UpdateVTKObjects calls are to be propagated.

Set to 1 by default.

◆ SetEnabled()

virtual void vtkSMLink::SetEnabled ( bool  )
virtual

Get/Set if the link is enabled.

(true by default).

◆ GetEnabled()

virtual bool vtkSMLink::GetEnabled ( )
virtual

Get/Set if the link is enabled.

(true by default).

◆ RemoveAllLinks()

virtual void vtkSMLink::RemoveAllLinks ( )
pure virtual

Remove all links.

Implemented in vtkSMProxyLink, vtkSMPropertyLink, and vtkSMSelectionLink.

◆ GetFullState()

const vtkSMMessage* vtkSMLink::GetFullState ( )
overridevirtual

This method returns the full object state that can be used to create the object from scratch.

This method will be used to fill the undo stack. If not overridden this will return NULL.

Reimplemented from vtkSMRemoteObject.

◆ LoadState()

void vtkSMLink::LoadState ( const vtkSMMessage msg,
vtkSMProxyLocator locator 
)
overridevirtual

This method is used to initialize the object to the given state If the definitionOnly Flag is set to True the proxy won't load the properties values and just setup the new proxy hierarchy with all subproxy globalIDs set.

This enables splitting the load process in 2 step to prevent invalid state when a property refers to a sub-proxy that does not exist yet.

Reimplemented from vtkSMRemoteObject.

Reimplemented in vtkSMProxyLink, vtkSMPropertyLink, vtkSMSelectionLink, and vtkSMCameraLink.

◆ UpdateState()

virtual void vtkSMLink::UpdateState ( )
pure virtual

Update the internal protobuf state.

Implemented in vtkSMProxyLink, vtkSMSelectionLink, vtkSMPropertyLink, and vtkSMCameraLink.

◆ GetNumberOfLinkedObjects()

virtual unsigned int vtkSMLink::GetNumberOfLinkedObjects ( )
pure virtual

Get the number of object that are involved in this link.

Implemented in vtkSMProxyLink, vtkSMPropertyLink, and vtkSMSelectionLink.

◆ GetLinkedObjectDirection()

virtual int vtkSMLink::GetLinkedObjectDirection ( int  index)
pure virtual

Get the direction of a object involved in this link (see vtkSMLink::UpdateDirections)

Implemented in vtkSMPropertyLink, vtkSMProxyLink, and vtkSMSelectionLink.

◆ GetLinkedProxy()

virtual vtkSMProxy* vtkSMLink::GetLinkedProxy ( int  index)
pure virtual

Get a proxy involved in this link.

Implemented in vtkSMProxyLink, vtkSMPropertyLink, and vtkSMSelectionLink.

◆ PushStateToSession()

void vtkSMLink::PushStateToSession ( )
protected

When the state has changed we call that method so the state can be shared if any collaboration is involved.

◆ UpdateVTKObjects()

virtual void vtkSMLink::UpdateVTKObjects ( vtkSMProxy proxy)
protectedpure virtual

Called when an input proxy is updated (UpdateVTKObjects).

Argument is the input proxy.

Implemented in vtkSMPropertyLink, vtkSMProxyLink, and vtkSMCameraLink.

◆ PropertyModified()

virtual void vtkSMLink::PropertyModified ( vtkSMProxy proxy,
const char *  pname 
)
protectedpure virtual

Called when a property of an input proxy is modified.

caller:- the input proxy. pname:- name of the property being modified.

Implemented in vtkSMPropertyLink, vtkSMProxyLink, and vtkSMCameraLink.

◆ UpdateProperty()

virtual void vtkSMLink::UpdateProperty ( vtkSMProxy caller,
const char *  pname 
)
protectedpure virtual

Called when a property is pushed.

caller :- the input proxy. pname :- name of property that was pushed.

Implemented in vtkSMProxyLink, vtkSMPropertyLink, and vtkSMCameraLink.

◆ ObserveProxyUpdates()

void vtkSMLink::ObserveProxyUpdates ( vtkSMProxy proxy)
protected

Subclasses call this method to observer events on a INPUT proxy.

◆ SaveXMLState()

virtual void vtkSMLink::SaveXMLState ( const char *  linkname,
vtkPVXMLElement parent 
)
protectedpure virtual

Save the state of the link.

Implemented in vtkSMProxyLink, vtkSMPropertyLink, vtkSMCameraLink, and vtkSMSelectionLink.

◆ LoadXMLState()

virtual int vtkSMLink::LoadXMLState ( vtkPVXMLElement linkElement,
vtkSMProxyLocator locator 
)
protectedpure virtual

Load the link state.

Implemented in vtkSMProxyLink, vtkSMPropertyLink, and vtkSMSelectionLink.

Friends And Related Function Documentation

◆ vtkSMLinkObserver

friend class vtkSMLinkObserver
friend

Definition at line 156 of file vtkSMLink.h.

◆ vtkSMStateLoader

friend class vtkSMStateLoader
friend

Definition at line 157 of file vtkSMLink.h.

◆ vtkSMSessionProxyManager

friend class vtkSMSessionProxyManager
friend

Definition at line 158 of file vtkSMLink.h.

Member Data Documentation

◆ Observer

vtkCommand* vtkSMLink::Observer
protected

Definition at line 160 of file vtkSMLink.h.

◆ PropagateUpdateVTKObjects

int vtkSMLink::PropagateUpdateVTKObjects
protected

Definition at line 164 of file vtkSMLink.h.

◆ Enabled

bool vtkSMLink::Enabled
protected

Definition at line 166 of file vtkSMLink.h.

◆ State

vtkSMMessage* vtkSMLink::State
protected

Definition at line 169 of file vtkSMLink.h.


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