The vtkSMSessionProxyManager is esponsible for creating and managing proxies for a given session. More...
#include <vtkSMSessionProxyManager.h>
Public Member Functions | |
vtkSMProxy * | NewProxy (const char *groupName, const char *proxyName, const char *subProxyName=nullptr) |
Given a group and proxy name, create and return a proxy instance. More... | |
vtkSMDocumentation * | GetProxyDocumentation (const char *groupName, const char *proxyName) |
Returns a vtkSMDocumentation object with the documentation for the proxy with given name and group name. More... | |
vtkSMDocumentation * | 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. 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) |
vtkSMProxy * | GetPrototypeProxy (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... | |
vtkSMLink * | GetRegisteredLink (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... | |
vtkPVXMLElement * | GetProxyDefinition (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... | |
vtkPVXMLElement * | SaveXMLState () |
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... | |
vtkSMProxySelectionModel * | GetSelectionModel (const char *name) |
Get a registered selection model. More... | |
vtkIdType | GetNumberOfSelectionModel () |
Return the number of Selections models registered. More... | |
vtkSMProxySelectionModel * | GetSelectionModelAt (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 vtkSMMessage * | GetFullState () |
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... | |
vtkSMProxy * | FindProxy (const char *reggroup, const char *xmlgroup, const char *xmltype) |
Find proxy of the group type (xmlgroup, xmltype) registered under a particular group (reggroup). More... | |
vtkSMProxy * | GetProxy (const char *groupname, const char *name) |
Given its name (and group) returns a proxy. More... | |
vtkSMProxy * | GetProxy (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< vtkPVXMLElement > | GetXMLState () |
Returns the XML state for the proxy manager. More... | |
vtkSmartPointer< vtkPVXMLElement > | GetXMLState (const std::set< vtkSMProxy *> &restrictionSet, bool forceRestriction=false) |
Returns the XML state for the proxy manager. More... | |
vtkPVXMLElement * | GetProxyHints (const char *xmlgroup, const char *xmlname) |
The server manager configuration XML may define <Hints/> element for a proxy/property. More... | |
vtkPVXMLElement * | GetPropertyHints (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 vtkSMProxyDefinitionManager * | GetProxyDefinitionManager () |
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 vtkSMSessionProxyManager * | GetSessionProxyManager () |
Return the corresponding ProxyManager if any. More... | |
virtual void | SetSession (vtkSMSession *) |
Get/Set the session on wihch this object exists. More... | |
virtual vtkSMSession * | GetSession () |
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) |
vtkCommand * | GetCommand (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) |
vtkCommand * | GetCommand (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 vtkSMSessionObject * | New () |
static int | IsTypeOf (const char *type) |
static vtkSMSessionObject * | SafeDownCast (vtkObject *o) |
Static Public Member Functions inherited from vtkSMObject | |
static vtkSMObject * | New () |
static int | IsTypeOf (const char *type) |
static vtkSMObject * | SafeDownCast (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 vtkObject * | New () |
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 vtkObjectBase * | New () |
static vtkObjectBase * | New () |
Protected Member Functions | |
vtkSMSessionProxyManager (vtkSMSession *) | |
~vtkSMSessionProxyManager () override | |
vtkSMProxy * | NewProxy (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... | |
vtkPVXMLElement * | GetProxyElement (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 |
vtkSMProxyDefinitionManager * | ProxyDefinitionManager |
vtkEventForwarderCommand * | Forwarder |
vtkSMPipelineState * | PipelineState |
bool | StateUpdateNotification |
Protected Attributes inherited from vtkSMSessionObject | |
vtkWeakPointer< vtkSMSession > | Session |
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 vtkSMSessionProxyManager * | New (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 vtkSMSessionProxyManager * | SafeDownCast (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 |
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.
Definition at line 135 of file vtkSMSessionProxyManager.h.
vtkSMSessionProxyManager requires a session and cannot be created without one.
Definition at line 144 of file vtkSMSessionProxyManager.h.
|
protected |
|
overrideprotected |
|
static |
vtkSMSessionProxyManager requires a session and cannot be created without one.
|
virtual |
vtkSMSessionProxyManager requires a session and cannot be created without one.
Reimplemented from vtkSMSessionObject.
vtkSMSessionProxyManager requires a session and cannot be created without one.
vtkSMSessionProxyManager requires a session and cannot be created without one.
Reimplemented from vtkSMSessionObject.
|
static |
vtkSMSessionProxyManager requires a session and cannot be created without one.
|
overridevirtual |
vtkSMSessionProxyManager requires a session and cannot be created without one.
Reimplemented from vtkSMSessionObject.
|
static |
Return the GlobalID that should be used to refer to the ProxyManager state.
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.
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().
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.
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.
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.
vtkSMProxy* vtkSMSessionProxyManager::GetProxy | ( | const char * | groupname, |
const char * | name | ||
) |
Given its name (and group) returns a proxy.
If not a managed proxy, returns 0.
vtkSMProxy* vtkSMSessionProxyManager::GetProxy | ( | const char * | name | ) |
Given its name (and group) returns a proxy.
If not a managed proxy, returns 0.
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.
|
inline |
Definition at line 218 of file vtkSMSessionProxyManager.h.
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.
Returns the number of proxies in a group.
Given a group and an index, returns the name of a proxy.
NOTE: This operation is slow.
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.
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.
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.
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.
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.
void vtkSMSessionProxyManager::UnRegisterProxy | ( | const char * | name | ) |
Given its name, unregisters a proxy and removes it from the list of managed proxies.
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.
void vtkSMSessionProxyManager::UnRegisterProxies | ( | ) |
Unregisters all managed proxies.
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.
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.
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.
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.
int vtkSMSessionProxyManager::GetNumberOfLinks | ( | ) |
Get the number of registered links with the server manager.
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.
void vtkSMSessionProxyManager::UnRegisterLink | ( | const char * | linkname | ) |
Unregister a proxy or property link previously registered with the given name.
Get the link registered with the given name.
If no such link exists, returns nullptr.
Get the name of the given registered link.
If no such link exists, returns nullptr.
void vtkSMSessionProxyManager::UnRegisterAllLinks | ( | ) |
Unregister all registered proxy/property links.
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.
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.
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.
vtkPVXMLElement* vtkSMSessionProxyManager::GetProxyDefinition | ( | const char * | group, |
const char * | name | ||
) |
Returns a registered proxy definition.
void vtkSMSessionProxyManager::LoadCustomProxyDefinitions | ( | const char * | filename | ) |
Load custom proxy definitions and register them.
void vtkSMSessionProxyManager::LoadCustomProxyDefinitions | ( | vtkPVXMLElement * | root | ) |
Load custom proxy definitions and register them.
void vtkSMSessionProxyManager::SaveCustomProxyDefinitions | ( | vtkPVXMLElement * | root | ) |
Save registered custom proxy definitions.
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.
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.
|
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.
bool vtkSMSessionProxyManager::SaveString | ( | const char * | string, |
const char * | filename, | ||
vtkTypeUInt32 | location | ||
) |
Save a string to a file at the given location.
std::string vtkSMSessionProxyManager::LoadString | ( | const char * | filename, |
vtkTypeUInt32 | location | ||
) |
Load a string from a file at the given location.
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.
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().
|
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.
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.
void vtkSMSessionProxyManager::SaveRegisteredLinks | ( | vtkPVXMLElement * | root | ) |
Save/Load registered link states.
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.
void vtkSMSessionProxyManager::InstantiatePrototypes | ( | ) |
Creates protytpes for all known proxy types.
void vtkSMSessionProxyManager::ClearPrototypes | ( | ) |
Converse on InstantiatePrototypes
, clear all prototypes.
Return true if the XML Definition was found by vtkSMProxyDefinitionManager.
int vtkSMSessionProxyManager::AreProxiesModified | ( | ) |
Get if there are any registered proxies that have their properties in a modified state.
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.
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.
|
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.
bool vtkSMSessionProxyManager::LoadConfigurationXML | ( | const char * | xmlcontents | ) |
Loads server-manager configuration xml.
|
virtual |
Get the proxy definition manager.
Proxy definition manager maintains all the information about proxy definitions.
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
vtkIdType vtkSMSessionProxyManager::GetNumberOfSelectionModel | ( | ) |
Return the number of Selections models registered.
vtkSMProxySelectionModel* vtkSMSessionProxyManager::GetSelectionModelAt | ( | int | idx | ) |
Return the selection model present at the index idx.
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
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
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.
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.
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.
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.
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.
|
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.
|
virtual |
This method is used to initialise the ProxyManager to the given state.
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.
|
protected |
Given an XML element and group name create a proxy and all of it's properties.
|
protected |
Given the proxy name and group name, returns the XML element for the proxy.
|
protectedvirtual |
Handles events.
|
protected |
Removes a prototype.
Used internally to cleanup obsolete prototypes.
|
protected |
Mark/UnMark a proxy as modified.
|
protected |
Mark/UnMark a proxy as modified.
|
protected |
Recursively collects all proxies referred by the proxy in the set.
|
friend |
Definition at line 603 of file vtkSMSessionProxyManager.h.
|
friend |
Definition at line 604 of file vtkSMSessionProxyManager.h.
|
friend |
Definition at line 605 of file vtkSMSessionProxyManager.h.
|
friend |
Definition at line 606 of file vtkSMSessionProxyManager.h.
|
protected |
Definition at line 645 of file vtkSMSessionProxyManager.h.
|
protected |
Definition at line 646 of file vtkSMSessionProxyManager.h.
|
protected |
Definition at line 647 of file vtkSMSessionProxyManager.h.
|
protected |
Definition at line 648 of file vtkSMSessionProxyManager.h.
|
protected |
Definition at line 649 of file vtkSMSessionProxyManager.h.