Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkSMSessionProxyManager Class Reference

The vtkSMSessionProxyManager is esponsible for creating and managing proxies for a given session. More...

#include <vtkSMSessionProxyManager.h>

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

Public Member Functions

vtkSMProxyNewProxy (const char *groupName, const char *proxyName, const char *subProxyName=nullptr)
 Given a group and proxy name, create and return a proxy instance. More...
 
vtkSMDocumentationGetProxyDocumentation (const char *groupName, const char *proxyName)
 Returns a vtkSMDocumentation object with the documentation for the proxy with given name and group name. More...
 
vtkSMDocumentationGetPropertyDocumentation (const char *groupName, const char *proxyName, const char *propertyName)
 Returns a vtkSMDocumentation object with the documentation for the given property of the proxy with given name and group name. More...
 
void RegisterProxy (const char *groupname, const char *name, vtkSMProxy *proxy)
 Used to pass the control of the proxy to the manager. More...
 
std::string RegisterProxy (const char *groupname, vtkSMProxy *proxy)
 This overload register the proxy using an unique name returned by GetUniqueProxyName() and returns the name used. More...
 
void GetProxies (const char *groupname, const char *name, vtkCollection *collection)
 Returns all proxies registered under the given group with the given name. More...
 
void GetProxies (const char *groupname, vtkCollection *collection)
 
vtkSMProxyGetPrototypeProxy (const char *groupname, const char *name)
 Returns the prototype proxy for the given type. More...
 
unsigned int GetNumberOfProxies (const char *groupname)
 Returns the number of proxies in a group. More...
 
const char * GetProxyName (const char *groupname, unsigned int idx)
 Given a group and an index, returns the name of a proxy. More...
 
const char * GetProxyName (const char *groupname, vtkSMProxy *proxy)
 Given a group and a proxy, return it's name. More...
 
void GetProxyNames (const char *groupname, vtkSMProxy *proxy, vtkStringList *names)
 Given a group and a proxy, return all its names. More...
 
std::string GetUniqueProxyName (const char *groupname, const char *prefix, bool alwaysAppend=true)
 Given a group, returns a name not already used for proxies registered in the given group. More...
 
const char * IsProxyInGroup (vtkSMProxy *proxy, const char *groupname)
 If the proxy is in the given group, return its name, otherwise return nullptr. More...
 
void UnRegisterProxy (vtkSMProxy *proxy)
 Given a proxy, unregisters it. More...
 
void UnRegisterProxies ()
 Unregisters all managed proxies. More...
 
int GetNumberOfLinks ()
 Get the number of registered links with the server manager. More...
 
const char * GetLinkName (int index)
 Get the name of a link. More...
 
void RegisterLink (const char *linkname, vtkSMLink *link)
 Register proxy/property links with the server manager. More...
 
void UnRegisterLink (const char *linkname)
 Unregister a proxy or property link previously registered with the given name. More...
 
vtkSMLinkGetRegisteredLink (const char *linkname)
 Get the link registered with the given name. More...
 
const char * GetRegisteredLinkName (vtkSMLink *link)
 Get the name of the given registered link. More...
 
void UnRegisterAllLinks ()
 Unregister all registered proxy/property links. More...
 
void RegisterCustomProxyDefinition (const char *group, const char *name, vtkPVXMLElement *top)
 Register a custom proxy definition with the proxy manager. More...
 
void UnRegisterCustomProxyDefinition (const char *group, const char *name)
 Given its name, unregisters a custom proxy definition. More...
 
void UnRegisterCustomProxyDefinitions ()
 Unregisters all registered custom proxy definitions. More...
 
vtkPVXMLElementGetProxyDefinition (const char *group, const char *name)
 Returns a registered proxy definition. More...
 
void SaveCustomProxyDefinitions (vtkPVXMLElement *root)
 Save registered custom proxy definitions. More...
 
virtual bool GetInLoadXMLState ()
 Indicates if an XML state is currently being loaded. More...
 
bool SaveString (const char *string, const char *filename, vtkTypeUInt32 location)
 Save a string to a file at the given location. More...
 
std::string LoadString (const char *filename, vtkTypeUInt32 location)
 Load a string from a file at the given location. More...
 
bool SaveXMLState (const char *filename, vtkTypeUInt32 location=0x10)
 Save the state of the server manager in XML format in a file. More...
 
vtkPVXMLElementSaveXMLState ()
 Saves the state of the server manager as XML, and returns the vtkPVXMLElement for the root of the state. More...
 
void SaveRegisteredLinks (vtkPVXMLElement *root)
 Save/Load registered link states. More...
 
void InstantiateGroupPrototypes (const char *groupName)
 Given a group name, create prototypes and store them in a instance group called groupName_prototypes. More...
 
void InstantiatePrototypes ()
 Creates protytpes for all known proxy types. More...
 
void ClearPrototypes ()
 Converse on InstantiatePrototypes, clear all prototypes. More...
 
bool HasDefinition (const char *groupName, const char *proxyName)
 Return true if the XML Definition was found by vtkSMProxyDefinitionManager. More...
 
int AreProxiesModified ()
 Get if there are any registered proxies that have their properties in a modified state. More...
 
bool LoadConfigurationXML (const char *xmlcontents)
 Loads server-manager configuration xml. More...
 
vtkSMProxySelectionModelGetSelectionModel (const char *name)
 Get a registered selection model. More...
 
vtkIdType GetNumberOfSelectionModel ()
 Return the number of Selections models registered. More...
 
vtkSMProxySelectionModelGetSelectionModelAt (int idx)
 Return the selection model present at the index idx. More...
 
void UpdateFromRemote ()
 Method used to fetch the last state of the ProxyManager from the pvserver. More...
 
virtual const vtkSMMessageGetFullState ()
 This method returns the full object state that can be used to create that object from scratch. More...
 
virtual void LoadState (const vtkSMMessage *msg, vtkSMProxyLocator *locator)
 This method is used to initialise the ProxyManager to the given state. More...
 
vtkSMProxyFindProxy (const char *reggroup, const char *xmlgroup, const char *xmltype)
 Find proxy of the group type (xmlgroup, xmltype) registered under a particular group (reggroup). More...
 
vtkSMProxyGetProxy (const char *groupname, const char *name)
 Given its name (and group) returns a proxy. More...
 
vtkSMProxyGetProxy (const char *name)
 Given its name (and group) returns a proxy. More...
 
void UnRegisterProxy (const char *groupname, const char *name, vtkSMProxy *)
 Given its name, unregisters a proxy and removes it from the list of managed proxies. More...
 
void UnRegisterProxy (const char *name)
 Given its name, unregisters a proxy and removes it from the list of managed proxies. More...
 
void UpdateRegisteredProxies (const char *groupname, int modified_only=1)
 Calls UpdateVTKObjects() on all managed proxies. More...
 
void UpdateRegisteredProxies (int modified_only=1)
 Calls UpdateVTKObjects() on all managed proxies. More...
 
void UpdateRegisteredProxiesInOrder (int modified_only=1)
 Updates all registered proxies in order, respecting dependencies among each other. More...
 
void UpdateProxyInOrder (vtkSMProxy *proxy)
 Updates all registered proxies in order, respecting dependencies among each other. More...
 
void LoadCustomProxyDefinitions (const char *filename)
 Load custom proxy definitions and register them. More...
 
void LoadCustomProxyDefinitions (vtkPVXMLElement *root)
 Load custom proxy definitions and register them. More...
 
void LoadXMLState (const char *filename, vtkSMStateLoader *loader=nullptr, vtkTypeUInt32 location=0x10)
 Loads the state of the server manager from XML. More...
 
void LoadXMLState (vtkPVXMLElement *rootElement, vtkSMStateLoader *loader=nullptr, bool keepOriginalIds=false)
 Loads the state of the server manager from XML. More...
 
vtkSmartPointer< vtkPVXMLElementGetXMLState ()
 Returns the XML state for the proxy manager. More...
 
vtkSmartPointer< vtkPVXMLElementGetXMLState (const std::set< vtkSMProxy *> &restrictionSet, bool forceRestriction=false)
 Returns the XML state for the proxy manager. More...
 
vtkPVXMLElementGetProxyHints (const char *xmlgroup, const char *xmlname)
 The server manager configuration XML may define <Hints/> element for a proxy/property. More...
 
vtkPVXMLElementGetPropertyHints (const char *groupName, const char *proxyName, const char *propertyName)
 The server manager configuration XML may define <Hints/> element for a proxy/property. More...
 
virtual int GetUpdateInputProxies ()
 Check if UpdateInputProxies flag is set. More...
 
virtual vtkSMProxyDefinitionManagerGetProxyDefinitionManager ()
 Get the proxy definition manager. More...
 
void RegisterSelectionModel (const char *name, vtkSMProxySelectionModel *)
 Register/UnRegister a selection model. More...
 
void UnRegisterSelectionModel (const char *name)
 Register/UnRegister a selection model. More...
 
bool IsStateUpdateNotificationEnabled ()
 These methods allow the user to make atomic change set in the notification collaboration in terms of set of proxy registration. More...
 
void DisableStateUpdateNotification ()
 These methods allow the user to make atomic change set in the notification collaboration in terms of set of proxy registration. More...
 
void EnableStateUpdateNotification ()
 These methods allow the user to make atomic change set in the notification collaboration in terms of set of proxy registration. More...
 
void TriggerStateUpdate ()
 These methods allow the user to make atomic change set in the notification collaboration in terms of set of proxy registration. More...
 
- Public Member Functions inherited from vtkSMSessionObject
virtual vtkSMSessionProxyManagerGetSessionProxyManager ()
 Return the corresponding ProxyManager if any. More...
 
virtual void SetSession (vtkSMSession *)
 Get/Set the session on wihch this object exists. 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 vtkTypeUInt32 GetReservedGlobalID ()
 Return the GlobalID that should be used to refer to the ProxyManager state. More...
 
- 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 std::string CreatePrettyLabel (const std::string &name)
 Return a well-formated label using provided name by adding spaces between lower cases and upper cases: More...
 
- 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

 vtkSMSessionProxyManager (vtkSMSession *)
 
 ~vtkSMSessionProxyManager () override
 
vtkSMProxyNewProxy (vtkPVXMLElement *element, const char *groupname, const char *proxyname, const char *subProxyName=nullptr)
 Given an XML element and group name create a proxy and all of it's properties. More...
 
vtkPVXMLElementGetProxyElement (const char *groupName, const char *proxyName, const char *subProxyName=nullptr)
 Given the proxy name and group name, returns the XML element for the proxy. More...
 
virtual void ExecuteEvent (vtkObject *obj, unsigned long event, void *data)
 Handles events. More...
 
void RemovePrototype (const char *groupname, const char *proxyname)
 Removes a prototype. More...
 
void CollectReferredProxies (vtkSMProxyManagerProxySet &setOfProxies, vtkSMProxy *proxy)
 Recursively collects all proxies referred by the proxy in the set. More...
 
void MarkProxyAsModified (vtkSMProxy *)
 Mark/UnMark a proxy as modified. More...
 
void UnMarkProxyAsModified (vtkSMProxy *)
 Mark/UnMark a proxy as modified. More...
 
- 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

int UpdateInputProxies
 
vtkSMProxyDefinitionManagerProxyDefinitionManager
 
vtkEventForwarderCommandForwarder
 
vtkSMPipelineStatePipelineState
 
bool StateUpdateNotification
 
- 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 vtkSMProxy
 
class vtkPVProxyDefinitionIterator
 
class vtkSMProxyIterator
 
class vtkSMProxyManagerObserver
 
typedef vtkSMSessionObject Superclass
 vtkSMSessionProxyManager requires a session and cannot be created without one. More...
 
static vtkSMSessionProxyManagerNew (vtkSMSession *session)
 vtkSMSessionProxyManager requires a session and cannot be created without one. More...
 
static int IsTypeOf (const char *type)
 vtkSMSessionProxyManager requires a session and cannot be created without one. More...
 
static vtkSMSessionProxyManagerSafeDownCast (vtkObject *o)
 vtkSMSessionProxyManager requires a session and cannot be created without one. More...
 
virtual const char * GetClassName ()
 vtkSMSessionProxyManager requires a session and cannot be created without one. More...
 
virtual int IsA (const char *type)
 vtkSMSessionProxyManager requires a session and cannot be created without one. More...
 
void PrintSelf (ostream &os, vtkIndent indent) override
 vtkSMSessionProxyManager requires a session and cannot be created without one. More...
 

Additional Inherited Members

- Public Types inherited from vtkSMSessionObject
typedef vtkSMObject Superclass
 
- Public Types inherited from vtkSMObject
typedef vtkObject Superclass
 

Detailed Description

The vtkSMSessionProxyManager is esponsible for creating and managing proxies for a given session.

vtkSMSessionProxyManager is an instance that creates and manages proxies for a given session/server. It maintains a map of XML elements (populated by the XML parser) from which it can create and initialize proxies and properties. Once a proxy is created, it can either be managed by the user code or the proxy manager. In the latter case, pass the control of the proxy to the manager with RegisterProxy() and unregister it. At destruction, proxy manager deletes all managed proxies.

vtkSMSessionProxyManager is designed to work with only one session. When the session on which it is attached closes, it has no role and should be deleted right away.

See also
vtkSMProxyDefinitionManager
Basic XML Proxy definition documentation:
----------— Proxy definition ----------—
<SourceProxy => Will create vtkSM + SourceProxy class.
name="SphereSource" => Key used to create the proxy.
class="vtkSphereSource" => Concrete VTK class that does the real job.
label="Sphere"> => Nice name used in menu and python shell.
--------— Property definition --------—
<DoubleVectorProperty => Will create vtkSM + DoubleVectorProperty
and vtkSI + DoubleVectorProperty class by
default.
name="Center" => Name of the property:
Example usage: vtkSMPropertyHelper(proxy, "Center").Set(0,1,2)
command="SetCenter" => Real method name that will be called on
vtkObject when the property is updated.
number_of_elements="3" => Size of the vector.
animateable="1" => Tell the animation view that property
can be used as an evolving property.
default_values="0 0 0"> => The value that will be set at the
</DoubleVectorProperty> construction to the VTK object.
</SourceProxy>
For custom behaviour the user can add some extra attributes:
See also
  • We can trigger after any update a command to be executed:
    <Proxy name="LookupTable"
    class="vtkLookupTable"
    post_push="Build" => The method Build() will be called each
    time a new property value is pushed to
    the VTK object.
    processes="dataserver|renderserver|client" >
    </pre>
    @sa
    - We can force any property to push its value as soon as it is changed:
    \code{.xml}
    <Property name="ResetFieldCriteria"
    command="ResetFieldCriteria"
    immediate_update="1"> => Modifying the property will result
    in an immediate push of it and the
    execution of the command on the vtkObject.
  • To show a source proxy or a filter inside the menu of ParaView we use a hint:
    <SourceProxy ...>
    <Hints>
    <ShowInMenu => The category attribute enables
    category="PersoFilter"/> specification of the sub-menu in which
    this proxy should be listed. (optional)
    </Hints>
    </SourceProxy>

Definition at line 135 of file vtkSMSessionProxyManager.h.

Member Typedef Documentation

◆ Superclass

vtkSMSessionProxyManager requires a session and cannot be created without one.

Definition at line 144 of file vtkSMSessionProxyManager.h.

Constructor & Destructor Documentation

◆ vtkSMSessionProxyManager()

vtkSMSessionProxyManager::vtkSMSessionProxyManager ( vtkSMSession )
protected

◆ ~vtkSMSessionProxyManager()

vtkSMSessionProxyManager::~vtkSMSessionProxyManager ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkSMSessionProxyManager* vtkSMSessionProxyManager::New ( vtkSMSession session)
static

vtkSMSessionProxyManager requires a session and cannot be created without one.

◆ GetClassName()

virtual const char* vtkSMSessionProxyManager::GetClassName ( )
virtual

vtkSMSessionProxyManager requires a session and cannot be created without one.

Reimplemented from vtkSMSessionObject.

◆ IsTypeOf()

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

vtkSMSessionProxyManager requires a session and cannot be created without one.

◆ IsA()

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

vtkSMSessionProxyManager requires a session and cannot be created without one.

Reimplemented from vtkSMSessionObject.

◆ SafeDownCast()

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

vtkSMSessionProxyManager requires a session and cannot be created without one.

◆ PrintSelf()

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

vtkSMSessionProxyManager requires a session and cannot be created without one.

Reimplemented from vtkSMSessionObject.

◆ GetReservedGlobalID()

static vtkTypeUInt32 vtkSMSessionProxyManager::GetReservedGlobalID ( )
static

Return the GlobalID that should be used to refer to the ProxyManager state.

◆ NewProxy() [1/2]

vtkSMProxy* vtkSMSessionProxyManager::NewProxy ( const char *  groupName,
const char *  proxyName,
const char *  subProxyName = nullptr 
)

Given a group and proxy name, create and return a proxy instance.

The user has to delete the proxy when done. NOTE: If this method is called from a scripting language, it may not be possible to delete the returned object with Delete. The VTK wrappers handle New and Delete specially and may not allow the deletion of object created through other methods. Use UnRegister instead.

◆ GetProxyDocumentation()

vtkSMDocumentation* vtkSMSessionProxyManager::GetProxyDocumentation ( const char *  groupName,
const char *  proxyName 
)

Returns a vtkSMDocumentation object with the documentation for the proxy with given name and group name.

Note that the name and group name are not those with the which the proxy is registered, but those with which the proxy is created i.e. the arguments used for NewProxy().

◆ GetPropertyDocumentation()

vtkSMDocumentation* vtkSMSessionProxyManager::GetPropertyDocumentation ( const char *  groupName,
const char *  proxyName,
const char *  propertyName 
)

Returns a vtkSMDocumentation object with the documentation for the given property of the proxy with given name and group name.

Note that the name and group name are not those with the which the proxy is registered, but those with which the proxy is created i.e. the arguments used for NewProxy(). Also, the property name is the name of an exposed property.

◆ RegisterProxy() [1/2]

void vtkSMSessionProxyManager::RegisterProxy ( const char *  groupname,
const char *  name,
vtkSMProxy proxy 
)

Used to pass the control of the proxy to the manager.

The user code can then release its reference count and not care about what happens to the proxy. Managed proxies are deleted at destruction. NOTE: The name has to be unique (per group). If not, the existing proxy will be replaced (and unregistered). The proxy instances are grouped in collections (not necessarily the same as the group in the XML configuration file). These collections can be used to separate proxies based on their functionality. For example, implicit planes can be grouped together and the acceptable values of a proxy property can be restricted (using a domain) to this collection.

◆ RegisterProxy() [2/2]

std::string vtkSMSessionProxyManager::RegisterProxy ( const char *  groupname,
vtkSMProxy proxy 
)

This overload register the proxy using an unique name returned by GetUniqueProxyName() and returns the name used.

◆ GetProxy() [1/2]

vtkSMProxy* vtkSMSessionProxyManager::GetProxy ( const char *  groupname,
const char *  name 
)

Given its name (and group) returns a proxy.

If not a managed proxy, returns 0.

◆ GetProxy() [2/2]

vtkSMProxy* vtkSMSessionProxyManager::GetProxy ( const char *  name)

Given its name (and group) returns a proxy.

If not a managed proxy, returns 0.

◆ GetProxies() [1/2]

void vtkSMSessionProxyManager::GetProxies ( const char *  groupname,
const char *  name,
vtkCollection collection 
)

Returns all proxies registered under the given group with the given name.

The collection is cleared before the proxies are added to it.

◆ GetProxies() [2/2]

void vtkSMSessionProxyManager::GetProxies ( const char *  groupname,
vtkCollection collection 
)
inline

Definition at line 218 of file vtkSMSessionProxyManager.h.

◆ GetPrototypeProxy()

vtkSMProxy* vtkSMSessionProxyManager::GetPrototypeProxy ( const char *  groupname,
const char *  name 
)

Returns the prototype proxy for the given type.

This method may create a new prototype proxy, if one does not already exist.

Note
After loading a plugin, all existing prototypes are discarded. This is done because plugins can potentially alter definitions for existing proxies.

◆ GetNumberOfProxies()

unsigned int vtkSMSessionProxyManager::GetNumberOfProxies ( const char *  groupname)

Returns the number of proxies in a group.

◆ GetProxyName() [1/2]

const char* vtkSMSessionProxyManager::GetProxyName ( const char *  groupname,
unsigned int  idx 
)

Given a group and an index, returns the name of a proxy.

NOTE: This operation is slow.

◆ GetProxyName() [2/2]

const char* vtkSMSessionProxyManager::GetProxyName ( const char *  groupname,
vtkSMProxy proxy 
)

Given a group and a proxy, return it's name.

The proxy may be registered as two different names under the same group, this only returns the first hit name, use GetProxyNames() to obtain the list of names for the proxy. NOTE: This operation is slow.

◆ GetProxyNames()

void vtkSMSessionProxyManager::GetProxyNames ( const char *  groupname,
vtkSMProxy proxy,
vtkStringList names 
)

Given a group and a proxy, return all its names.

This clears the names list before populating it with the names for the proxy under the group. NOTE: This operation is slow.

◆ GetUniqueProxyName()

std::string vtkSMSessionProxyManager::GetUniqueProxyName ( const char *  groupname,
const char *  prefix,
bool  alwaysAppend = true 
)

Given a group, returns a name not already used for proxies registered in the given group.

The prefix is used to come up with a new name. if alwaysAppend is true, then a suffix will always be appended, if not, the prefix may be used directly if possible.

◆ IsProxyInGroup()

const char* vtkSMSessionProxyManager::IsProxyInGroup ( vtkSMProxy proxy,
const char *  groupname 
)

If the proxy is in the given group, return its name, otherwise return nullptr.

NOTE: Any following call to proxy manager might make the returned pointer invalid.

◆ UnRegisterProxy() [1/3]

void vtkSMSessionProxyManager::UnRegisterProxy ( const char *  groupname,
const char *  name,
vtkSMProxy  
)

Given its name, unregisters a proxy and removes it from the list of managed proxies.

◆ UnRegisterProxy() [2/3]

void vtkSMSessionProxyManager::UnRegisterProxy ( const char *  name)

Given its name, unregisters a proxy and removes it from the list of managed proxies.

◆ UnRegisterProxy() [3/3]

void vtkSMSessionProxyManager::UnRegisterProxy ( vtkSMProxy proxy)

Given a proxy, unregisters it.

This method unregisters the proxy from all the groups in which it has been registered.

◆ UnRegisterProxies()

void vtkSMSessionProxyManager::UnRegisterProxies ( )

Unregisters all managed proxies.

◆ UpdateRegisteredProxies() [1/2]

void vtkSMSessionProxyManager::UpdateRegisteredProxies ( const char *  groupname,
int  modified_only = 1 
)

Calls UpdateVTKObjects() on all managed proxies.

If modified_only flag is set, then UpdateVTKObjects will be called only those proxies that have any properties that were modified i.e. not pushed to the VTK objects.

◆ UpdateRegisteredProxies() [2/2]

void vtkSMSessionProxyManager::UpdateRegisteredProxies ( int  modified_only = 1)

Calls UpdateVTKObjects() on all managed proxies.

If modified_only flag is set, then UpdateVTKObjects will be called only those proxies that have any properties that were modified i.e. not pushed to the VTK objects.

◆ UpdateRegisteredProxiesInOrder()

void vtkSMSessionProxyManager::UpdateRegisteredProxiesInOrder ( int  modified_only = 1)

Updates all registered proxies in order, respecting dependencies among each other.

This is used after loading state or after instantiating a compound proxy. This uses the "UpdateInputProxies" flag which vtkSMProxy checks in UpdateVTKObjects() to call UpdateVTKObjects() on the input proxies as well if the flag is set.

◆ UpdateProxyInOrder()

void vtkSMSessionProxyManager::UpdateProxyInOrder ( vtkSMProxy proxy)

Updates all registered proxies in order, respecting dependencies among each other.

This is used after loading state or after instantiating a compound proxy. This uses the "UpdateInputProxies" flag which vtkSMProxy checks in UpdateVTKObjects() to call UpdateVTKObjects() on the input proxies as well if the flag is set.

◆ GetNumberOfLinks()

int vtkSMSessionProxyManager::GetNumberOfLinks ( )

Get the number of registered links with the server manager.

◆ GetLinkName()

const char* vtkSMSessionProxyManager::GetLinkName ( int  index)

Get the name of a link.

◆ RegisterLink()

void vtkSMSessionProxyManager::RegisterLink ( const char *  linkname,
vtkSMLink link 
)

Register proxy/property links with the server manager.

The linknames must be unique, if a link with the given name already exists, it will be replaced.

◆ UnRegisterLink()

void vtkSMSessionProxyManager::UnRegisterLink ( const char *  linkname)

Unregister a proxy or property link previously registered with the given name.

◆ GetRegisteredLink()

vtkSMLink* vtkSMSessionProxyManager::GetRegisteredLink ( const char *  linkname)

Get the link registered with the given name.

If no such link exists, returns nullptr.

◆ GetRegisteredLinkName()

const char* vtkSMSessionProxyManager::GetRegisteredLinkName ( vtkSMLink link)

Get the name of the given registered link.

If no such link exists, returns nullptr.

◆ UnRegisterAllLinks()

void vtkSMSessionProxyManager::UnRegisterAllLinks ( )

Unregister all registered proxy/property links.

◆ RegisterCustomProxyDefinition()

void vtkSMSessionProxyManager::RegisterCustomProxyDefinition ( const char *  group,
const char *  name,
vtkPVXMLElement top 
)

Register a custom proxy definition with the proxy manager.

This can be a compound proxy definition (look at vtkSMCompoundSourceProxy.h) or a regular proxy definition. For all practical purposes, there's no difference between a proxy definition added using this method or by parsing a server manager configuration file.

◆ UnRegisterCustomProxyDefinition()

void vtkSMSessionProxyManager::UnRegisterCustomProxyDefinition ( const char *  group,
const char *  name 
)

Given its name, unregisters a custom proxy definition.

Note that this can only be used to remove definitions added using RegisterCustomProxyDefinition(), cannot be used to remove definitions loaded using vtkSMXMLParser.

◆ UnRegisterCustomProxyDefinitions()

void vtkSMSessionProxyManager::UnRegisterCustomProxyDefinitions ( )

Unregisters all registered custom proxy definitions.

Note that this can only be used to remove definitions added using RegisterCustomProxyDefinition(), cannot be used to remove definitions loaded using vtkSMXMLParser.

◆ GetProxyDefinition()

vtkPVXMLElement* vtkSMSessionProxyManager::GetProxyDefinition ( const char *  group,
const char *  name 
)

Returns a registered proxy definition.

◆ LoadCustomProxyDefinitions() [1/2]

void vtkSMSessionProxyManager::LoadCustomProxyDefinitions ( const char *  filename)

Load custom proxy definitions and register them.

◆ LoadCustomProxyDefinitions() [2/2]

void vtkSMSessionProxyManager::LoadCustomProxyDefinitions ( vtkPVXMLElement root)

Load custom proxy definitions and register them.

◆ SaveCustomProxyDefinitions()

void vtkSMSessionProxyManager::SaveCustomProxyDefinitions ( vtkPVXMLElement root)

Save registered custom proxy definitions.

◆ LoadXMLState() [1/2]

void vtkSMSessionProxyManager::LoadXMLState ( const char *  filename,
vtkSMStateLoader loader = nullptr,
vtkTypeUInt32  location = 0x10 
)

Loads the state of the server manager from XML.

If loader is not specified, a vtkSMStateLoader instance is used. When loading XML state, vtkSMSessionProxyManager::GetInLoadXMLState will return true.

◆ LoadXMLState() [2/2]

void vtkSMSessionProxyManager::LoadXMLState ( vtkPVXMLElement rootElement,
vtkSMStateLoader loader = nullptr,
bool  keepOriginalIds = false 
)

Loads the state of the server manager from XML.

If loader is not specified, a vtkSMStateLoader instance is used. When loading XML state, vtkSMSessionProxyManager::GetInLoadXMLState will return true.

◆ GetInLoadXMLState()

virtual bool vtkSMSessionProxyManager::GetInLoadXMLState ( )
virtual

Indicates if an XML state is currently being loaded.

This may be used by the application to limit updates to the GUI while state is being loaded.

◆ SaveString()

bool vtkSMSessionProxyManager::SaveString ( const char *  string,
const char *  filename,
vtkTypeUInt32  location 
)

Save a string to a file at the given location.

◆ LoadString()

std::string vtkSMSessionProxyManager::LoadString ( const char *  filename,
vtkTypeUInt32  location 
)

Load a string from a file at the given location.

◆ SaveXMLState() [1/2]

bool vtkSMSessionProxyManager::SaveXMLState ( const char *  filename,
vtkTypeUInt32  location = 0x10 
)

Save the state of the server manager in XML format in a file.

This saves the state of all proxies and properties. Return true if the operation succeeded otherwise return false.

◆ SaveXMLState() [2/2]

vtkPVXMLElement* vtkSMSessionProxyManager::SaveXMLState ( )

Saves the state of the server manager as XML, and returns the vtkPVXMLElement for the root of the state.

Note this method allocates a new vtkPVXMLElement object, it's the caller's responsibility to free it by calling Delete().

◆ GetXMLState() [1/2]

vtkSmartPointer<vtkPVXMLElement> vtkSMSessionProxyManager::GetXMLState ( )
inline

Returns the XML state for the proxy manager.

If a non-empty set of proxies is passed, then state is limited to those chosen proxies. If forceRestriction is true, then state will be limited even when the restrictionSet is non-empty.

Unlike SaveXMLState, this does not fire the vtkCommand::SaveStateEvent. This API is primarily intended for use-cases where complete application XML state is not being saved.

Definition at line 456 of file vtkSMSessionProxyManager.h.

◆ GetXMLState() [2/2]

vtkSmartPointer<vtkPVXMLElement> vtkSMSessionProxyManager::GetXMLState ( const std::set< vtkSMProxy *> &  restrictionSet,
bool  forceRestriction = false 
)

Returns the XML state for the proxy manager.

If a non-empty set of proxies is passed, then state is limited to those chosen proxies. If forceRestriction is true, then state will be limited even when the restrictionSet is non-empty.

Unlike SaveXMLState, this does not fire the vtkCommand::SaveStateEvent. This API is primarily intended for use-cases where complete application XML state is not being saved.

◆ SaveRegisteredLinks()

void vtkSMSessionProxyManager::SaveRegisteredLinks ( vtkPVXMLElement root)

Save/Load registered link states.

◆ InstantiateGroupPrototypes()

void vtkSMSessionProxyManager::InstantiateGroupPrototypes ( const char *  groupName)

Given a group name, create prototypes and store them in a instance group called groupName_prototypes.

Prototypes have their ConnectionID set to the SelfConnection.

◆ InstantiatePrototypes()

void vtkSMSessionProxyManager::InstantiatePrototypes ( )

Creates protytpes for all known proxy types.

◆ ClearPrototypes()

void vtkSMSessionProxyManager::ClearPrototypes ( )

Converse on InstantiatePrototypes, clear all prototypes.

◆ HasDefinition()

bool vtkSMSessionProxyManager::HasDefinition ( const char *  groupName,
const char *  proxyName 
)

Return true if the XML Definition was found by vtkSMProxyDefinitionManager.

◆ AreProxiesModified()

int vtkSMSessionProxyManager::AreProxiesModified ( )

Get if there are any registered proxies that have their properties in a modified state.

◆ GetProxyHints()

vtkPVXMLElement* vtkSMSessionProxyManager::GetProxyHints ( const char *  xmlgroup,
const char *  xmlname 
)

The server manager configuration XML may define <Hints/> element for a proxy/property.

Hints are metadata associated with the proxy/property. The Server Manager does not (and should not) interpret the hints. Hints provide a mechanism to add GUI-pertinent information to the server manager XML. Returns the XML element for the hints associated with this proxy/property, if any, otherwise returns nullptr.

◆ GetPropertyHints()

vtkPVXMLElement* vtkSMSessionProxyManager::GetPropertyHints ( const char *  groupName,
const char *  proxyName,
const char *  propertyName 
)

The server manager configuration XML may define <Hints/> element for a proxy/property.

Hints are metadata associated with the proxy/property. The Server Manager does not (and should not) interpret the hints. Hints provide a mechanism to add GUI-pertinent information to the server manager XML. Returns the XML element for the hints associated with this proxy/property, if any, otherwise returns nullptr.

◆ GetUpdateInputProxies()

virtual int vtkSMSessionProxyManager::GetUpdateInputProxies ( )
virtual

Check if UpdateInputProxies flag is set.

This is used after loading state or after instantiating a compound proxy. This uses the "UpdateInputProxies" flag which vtkSMProxy checks in UpdateVTKObjects() to call UpdateVTKObjects() on the input proxies as well if the flag is set.

◆ LoadConfigurationXML()

bool vtkSMSessionProxyManager::LoadConfigurationXML ( const char *  xmlcontents)

Loads server-manager configuration xml.

◆ GetProxyDefinitionManager()

virtual vtkSMProxyDefinitionManager* vtkSMSessionProxyManager::GetProxyDefinitionManager ( )
virtual

Get the proxy definition manager.

Proxy definition manager maintains all the information about proxy definitions.

◆ GetSelectionModel()

vtkSMProxySelectionModel* vtkSMSessionProxyManager::GetSelectionModel ( const char *  name)

Get a registered selection model.

Will return nullptr if no such model is registered. This will forward the call to the ProxyManager singleton

◆ GetNumberOfSelectionModel()

vtkIdType vtkSMSessionProxyManager::GetNumberOfSelectionModel ( )

Return the number of Selections models registered.

◆ GetSelectionModelAt()

vtkSMProxySelectionModel* vtkSMSessionProxyManager::GetSelectionModelAt ( int  idx)

Return the selection model present at the index idx.

◆ RegisterSelectionModel()

void vtkSMSessionProxyManager::RegisterSelectionModel ( const char *  name,
vtkSMProxySelectionModel  
)

Register/UnRegister a selection model.

A selection model can be typically used by applications to keep track of active sources, filters, views etc. This will forward the call to the ProxyManager singleton

◆ UnRegisterSelectionModel()

void vtkSMSessionProxyManager::UnRegisterSelectionModel ( const char *  name)

Register/UnRegister a selection model.

A selection model can be typically used by applications to keep track of active sources, filters, views etc. This will forward the call to the ProxyManager singleton

◆ UpdateFromRemote()

void vtkSMSessionProxyManager::UpdateFromRemote ( )

Method used to fetch the last state of the ProxyManager from the pvserver.

This is used in the collaboration context when the user connects to a remote server and wants to update its state before doing anything.

◆ IsStateUpdateNotificationEnabled()

bool vtkSMSessionProxyManager::IsStateUpdateNotificationEnabled ( )

These methods allow the user to make atomic change set in the notification collaboration in terms of set of proxy registration.

This enables us to prevent deletion on remote sites of proxies that will end up in the ProxyManager but have not been set into it yet.

◆ DisableStateUpdateNotification()

void vtkSMSessionProxyManager::DisableStateUpdateNotification ( )

These methods allow the user to make atomic change set in the notification collaboration in terms of set of proxy registration.

This enables us to prevent deletion on remote sites of proxies that will end up in the ProxyManager but have not been set into it yet.

◆ EnableStateUpdateNotification()

void vtkSMSessionProxyManager::EnableStateUpdateNotification ( )

These methods allow the user to make atomic change set in the notification collaboration in terms of set of proxy registration.

This enables us to prevent deletion on remote sites of proxies that will end up in the ProxyManager but have not been set into it yet.

◆ TriggerStateUpdate()

void vtkSMSessionProxyManager::TriggerStateUpdate ( )

These methods allow the user to make atomic change set in the notification collaboration in terms of set of proxy registration.

This enables us to prevent deletion on remote sites of proxies that will end up in the ProxyManager but have not been set into it yet.

◆ GetFullState()

virtual const vtkSMMessage* vtkSMSessionProxyManager::GetFullState ( )
virtual

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

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

◆ LoadState()

virtual void vtkSMSessionProxyManager::LoadState ( const vtkSMMessage msg,
vtkSMProxyLocator locator 
)
virtual

This method is used to initialise the ProxyManager to the given state.

◆ FindProxy()

vtkSMProxy* vtkSMSessionProxyManager::FindProxy ( const char *  reggroup,
const char *  xmlgroup,
const char *  xmltype 
)

Find proxy of the group type (xmlgroup, xmltype) registered under a particular group (reggroup).

Returns the first proxy found, if any.

◆ NewProxy() [2/2]

vtkSMProxy* vtkSMSessionProxyManager::NewProxy ( vtkPVXMLElement element,
const char *  groupname,
const char *  proxyname,
const char *  subProxyName = nullptr 
)
protected

Given an XML element and group name create a proxy and all of it's properties.

◆ GetProxyElement()

vtkPVXMLElement* vtkSMSessionProxyManager::GetProxyElement ( const char *  groupName,
const char *  proxyName,
const char *  subProxyName = nullptr 
)
protected

Given the proxy name and group name, returns the XML element for the proxy.

◆ ExecuteEvent()

virtual void vtkSMSessionProxyManager::ExecuteEvent ( vtkObject obj,
unsigned long  event,
void *  data 
)
protectedvirtual

Handles events.

◆ RemovePrototype()

void vtkSMSessionProxyManager::RemovePrototype ( const char *  groupname,
const char *  proxyname 
)
protected

Removes a prototype.

Used internally to cleanup obsolete prototypes.

◆ MarkProxyAsModified()

void vtkSMSessionProxyManager::MarkProxyAsModified ( vtkSMProxy )
protected

Mark/UnMark a proxy as modified.

◆ UnMarkProxyAsModified()

void vtkSMSessionProxyManager::UnMarkProxyAsModified ( vtkSMProxy )
protected

Mark/UnMark a proxy as modified.

◆ CollectReferredProxies()

void vtkSMSessionProxyManager::CollectReferredProxies ( vtkSMProxyManagerProxySet &  setOfProxies,
vtkSMProxy proxy 
)
protected

Recursively collects all proxies referred by the proxy in the set.

Friends And Related Function Documentation

◆ vtkSMProxy

friend class vtkSMProxy
friend

Definition at line 603 of file vtkSMSessionProxyManager.h.

◆ vtkPVProxyDefinitionIterator

friend class vtkPVProxyDefinitionIterator
friend

Definition at line 604 of file vtkSMSessionProxyManager.h.

◆ vtkSMProxyIterator

friend class vtkSMProxyIterator
friend

Definition at line 605 of file vtkSMSessionProxyManager.h.

◆ vtkSMProxyManagerObserver

friend class vtkSMProxyManagerObserver
friend

Definition at line 606 of file vtkSMSessionProxyManager.h.

Member Data Documentation

◆ UpdateInputProxies

int vtkSMSessionProxyManager::UpdateInputProxies
protected

Definition at line 645 of file vtkSMSessionProxyManager.h.

◆ ProxyDefinitionManager

vtkSMProxyDefinitionManager* vtkSMSessionProxyManager::ProxyDefinitionManager
protected

Definition at line 646 of file vtkSMSessionProxyManager.h.

◆ Forwarder

vtkEventForwarderCommand* vtkSMSessionProxyManager::Forwarder
protected

Definition at line 647 of file vtkSMSessionProxyManager.h.

◆ PipelineState

vtkSMPipelineState* vtkSMSessionProxyManager::PipelineState
protected

Definition at line 648 of file vtkSMSessionProxyManager.h.

◆ StateUpdateNotification

bool vtkSMSessionProxyManager::StateUpdateNotification
protected

Definition at line 649 of file vtkSMSessionProxyManager.h.


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