Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkSMProxyManager Class Reference

singleton responsible for creating and managing proxies More...

#include <vtkSMProxyManager.h>

Inheritance diagram for vtkSMProxyManager:

Inheritance graph
[legend]
Collaboration diagram for vtkSMProxyManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vtkTypeRevisionMacro (vtkSMProxyManager, vtkSMObject)
void PrintSelf (ostream &os, vtkIndent indent)
vtkSMProxyNewProxy (const char *groupName, const char *proxyName)
void RegisterProxy (const char *groupname, const char *name, vtkSMProxy *proxy)
unsigned int GetNumberOfProxies (const char *groupname)
const char * GetProxyName (const char *groupname, unsigned int idx)
const char * GetProxyName (const char *groupname, vtkSMProxy *proxy)
const char * IsProxyInGroup (vtkSMProxy *proxy, const char *groupname)
void UnRegisterProxies ()
void SaveState (const char *filename)
virtual void SaveState (const char *, ostream *, vtkIndent)
void InstantiateGroupPrototypes (const char *groupName)
unsigned int GetNumberOfXMLGroups ()
const char * GetXMLGroupName (unsigned int n)
int ProxyElementExists (const char *groupName, const char *proxyName)
vtkSMProxyGetProxy (const char *groupname, const char *name)
vtkSMProxyGetProxy (const char *name)
void UnRegisterProxy (const char *groupname, const char *name)
void UnRegisterProxy (const char *name)
void UpdateRegisteredProxies (const char *groupname)
void UpdateRegisteredProxies ()

Static Public Member Functions

vtkSMProxyManagerNew ()

Protected Member Functions

 vtkSMProxyManager ()
 ~vtkSMProxyManager ()
vtkSMProxyNewProxy (vtkPVXMLElement *element, const char *groupname)
void AddElement (const char *groupName, const char *name, vtkPVXMLElement *element)
vtkPVXMLElementGetProxyElement (const char *groupName, const char *proxyName)

Friends

class vtkSMXMLParser
class vtkSMProxyIterator
class vtkSMProxy

Detailed Description

singleton responsible for creating and managing proxies

vtkSMProxyManager is a singleton that creates and manages proxies. 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. For latter, pass the control of the proxy to the manager with RegisterProxy() and unregister it. At destruction, proxy manager deletes all managed proxies.

See also:
vtkSMXMLParser

Definition at line 41 of file vtkSMProxyManager.h.


Constructor & Destructor Documentation

vtkSMProxyManager::vtkSMProxyManager  )  [protected]
 

vtkSMProxyManager::~vtkSMProxyManager  )  [protected]
 


Member Function Documentation

vtkSMProxyManager* vtkSMProxyManager::New  )  [static]
 

Reimplemented from vtkSMObject.

vtkSMProxyManager::vtkTypeRevisionMacro vtkSMProxyManager  ,
vtkSMObject 
 

void vtkSMProxyManager::PrintSelf ostream &  os,
vtkIndent  indent
 

Reimplemented from vtkSMObject.

vtkSMProxy* vtkSMProxyManager::NewProxy const char *  groupName,
const char *  proxyName
 

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.

void vtkSMProxyManager::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.

vtkSMProxy* vtkSMProxyManager::GetProxy const char *  groupname,
const char *  name
 

Given its name (and group) returns a proxy. If not a managed proxy, returns 0.

vtkSMProxy* vtkSMProxyManager::GetProxy const char *  name  ) 
 

Given its name (and group) returns a proxy. If not a managed proxy, returns 0.

unsigned int vtkSMProxyManager::GetNumberOfProxies const char *  groupname  ) 
 

Returns the number of proxies in a group.

const char* vtkSMProxyManager::GetProxyName const char *  groupname,
unsigned int  idx
 

Given a group and an index, returns the name of a proxy. NOTE: This operation is slow.

const char* vtkSMProxyManager::GetProxyName const char *  groupname,
vtkSMProxy proxy
 

Given a group and a proxy, return it's name. NOTE: This operation is slow.

const char* vtkSMProxyManager::IsProxyInGroup vtkSMProxy proxy,
const char *  groupname
 

Is the proxy is in the given group, return it's name, otherwise return null. NOTE: Any following call to proxy manager might make the returned pointer invalid.

void vtkSMProxyManager::UnRegisterProxy const char *  groupname,
const char *  name
 

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

void vtkSMProxyManager::UnRegisterProxy const char *  name  ) 
 

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

void vtkSMProxyManager::UnRegisterProxies  ) 
 

Unregisters all managed proxies.

void vtkSMProxyManager::UpdateRegisteredProxies const char *  groupname  ) 
 

Calls UpdateVTKObjects() on all managed proxies.

void vtkSMProxyManager::UpdateRegisteredProxies  ) 
 

Calls UpdateVTKObjects() on all managed proxies.

void vtkSMProxyManager::SaveState const char *  filename  ) 
 

Save the state of the server manager in XML format in a file. This saves the state of all proxies and properties. NOTE: The XML format is still evolving.

virtual void vtkSMProxyManager::SaveState const char *  ,
ostream *  ,
vtkIndent 
[virtual]
 

Saves the state of the object in XML format. Should be overwritten by proxies and properties.

Reimplemented from vtkSMObject.

void vtkSMProxyManager::InstantiateGroupPrototypes const char *  groupName  ) 
 

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

unsigned int vtkSMProxyManager::GetNumberOfXMLGroups  ) 
 

Returns the number of XML groups from which proxies can be created.

const char* vtkSMProxyManager::GetXMLGroupName unsigned int  n  ) 
 

Returns the name of nth XML group.

int vtkSMProxyManager::ProxyElementExists const char *  groupName,
const char *  proxyName
 

Returns 1 if a proxy element of given group and exists, 0 otherwise. If a proxy element does not exist, a call to NewProxy() will fail.

void vtkSMProxyManager::AddElement const char *  groupName,
const char *  name,
vtkPVXMLElement element
[protected]
 

Called by the XML parser to add an element from which a proxy can be created. Called during parsing.

vtkSMProxy* vtkSMProxyManager::NewProxy vtkPVXMLElement element,
const char *  groupname
[protected]
 

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

vtkPVXMLElement* vtkSMProxyManager::GetProxyElement const char *  groupName,
const char *  proxyName
[protected]
 

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


Friends And Related Function Documentation

friend class vtkSMXMLParser [friend]
 

Definition at line 142 of file vtkSMProxyManager.h.

friend class vtkSMProxyIterator [friend]
 

Definition at line 143 of file vtkSMProxyManager.h.

friend class vtkSMProxy [friend]
 

Definition at line 144 of file vtkSMProxyManager.h.


The documentation for this class was generated from the following file:
Generated on Tue May 30 12:42:16 2006 for ParaView by doxygen 1.3.5