ParaView
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
vtkSIProxyDefinitionManager Class Reference

object responsible for managing XML proxies definitions More...

#include <vtkSIProxyDefinitionManager.h>

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

List of all members.

Classes

struct  RegisteredDefinitionInformation

Public Types

enum  Events { ProxyDefinitionsUpdated = 2000, CompoundProxyDefinitionsUpdated = 2001 }
enum  { ALL_DEFINITIONS = 0, CORE_DEFINITIONS = 1, CUSTOM_DEFINITIONS = 2 }

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
bool HasDefinition (const char *groupName, const char *proxyName)
void RemoveCustomProxyDefinition (const char *group, const char *name)
void ClearCustomProxyDefinitions ()
void SaveCustomProxyDefinitions (vtkPVXMLElement *root)
vtkPVProxyDefinitionIteratorNewIterator (int scope=ALL_DEFINITIONS)
void EnableXMLProxyDefnitionUpdate (bool)
virtual void Push (vtkSMMessage *msg)
virtual void Pull (vtkSMMessage *msg)
vtkPVXMLElementGetProxyDefinition (const char *group, const char *name, bool throwError)
vtkPVXMLElementGetProxyDefinition (const char *group, const char *name)
vtkPVXMLElementGetCollapsedProxyDefinition (const char *group, const char *name, const char *subProxyName, bool throwError)
vtkPVXMLElementGetCollapsedProxyDefinition (const char *group, const char *name, const char *subProxyName)
void AddCustomProxyDefinition (const char *group, const char *name, vtkPVXMLElement *top)
void AddCustomProxyDefinition (const char *groupName, const char *proxyName, const char *xmlcontents)
void LoadCustomProxyDefinitions (vtkPVXMLElement *root)
void LoadCustomProxyDefinitionsFromString (const char *xmlContent)
bool LoadConfigurationXML (vtkPVXMLElement *root)
bool LoadConfigurationXMLFromString (const char *xmlContent)
vtkPVProxyDefinitionIteratorNewSingleGroupIterator (const char *groupName, int scope=ALL_DEFINITIONS)

Static Public Member Functions

static
vtkSIProxyDefinitionManager
New ()
static int IsTypeOf (const char *type)
static
vtkSIProxyDefinitionManager
SafeDownCast (vtkObject *o)
static vtkTypeUInt32 GetReservedGlobalID ()
static void PatchXMLProperty (vtkPVXMLElement *propElement)

Protected Member Functions

 vtkSIProxyDefinitionManager ()
 ~vtkSIProxyDefinitionManager ()
void AttachShowInMenuHintsToProxy (vtkPVXMLElement *proxy)
void AttachShowInMenuHintsToProxyFromProxyGroups (vtkPVXMLElement *root)
void MergeProxyDefinition (vtkPVXMLElement *element, vtkPVXMLElement *elementToFill)
void InvalidateCollapsedDefinition ()
void InvokeCustomDefitionsUpdated ()
bool LoadConfigurationXML (vtkPVXMLElement *root, bool attachShowInMenuHints)
bool LoadConfigurationXMLFromString (const char *xmlContent, bool attachShowInMenuHints)
void OnPluginLoaded (vtkObject *caller, unsigned long event, void *calldata)
void HandlePlugin (vtkPVPlugin *)
void AddElement (const char *groupName, const char *proxyName, vtkPVXMLElement *element)
bool AddCustomProxyDefinitionInternal (const char *group, const char *name, vtkPVXMLElement *top)
vtkPVXMLElementGetProxyElement (const char *groupName, const char *proxyName)
vtkPVXMLElementExtractSubProxy (vtkPVXMLElement *proxyDefinition, const char *subProxyName)

Detailed Description

object responsible for managing XML proxies definitions

vtkSIProxyDefinitionManager is a class that manages XML proxies definition. It maintains a map of vtkPVXMLElement (populated by the XML parser) from which it can extract Hint, Documentation, Properties, Domains definition.

This class fires the following events:

Definition at line 50 of file vtkSIProxyDefinitionManager.h.


Member Enumeration Documentation

Enumerator:
ProxyDefinitionsUpdated 
CompoundProxyDefinitionsUpdated 

Definition at line 139 of file vtkSIProxyDefinitionManager.h.

anonymous enum

Return a new configured iterator for traversing a set of proxy definition for all the available groups. Scope values: 0 : ALL (default in case) 1 : CORE_DEFINITIONS 2 : CUSTOM_DEFINITIONS

Enumerator:
ALL_DEFINITIONS 
CORE_DEFINITIONS 
CUSTOM_DEFINITIONS 

Definition at line 149 of file vtkSIProxyDefinitionManager.h.


Constructor & Destructor Documentation

vtkSIProxyDefinitionManager::vtkSIProxyDefinitionManager ( ) [protected]
vtkSIProxyDefinitionManager::~vtkSIProxyDefinitionManager ( ) [protected]

Member Function Documentation

static vtkSIProxyDefinitionManager* vtkSIProxyDefinitionManager::New ( ) [static]

Reimplemented from vtkSIObject.

virtual const char* vtkSIProxyDefinitionManager::GetClassName ( ) [virtual]

Reimplemented from vtkSIObject.

static int vtkSIProxyDefinitionManager::IsTypeOf ( const char *  type) [static]

Reimplemented from vtkSIObject.

virtual int vtkSIProxyDefinitionManager::IsA ( const char *  type) [virtual]

Reimplemented from vtkSIObject.

static vtkSIProxyDefinitionManager* vtkSIProxyDefinitionManager::SafeDownCast ( vtkObject o) [static]

Reimplemented from vtkSIObject.

void vtkSIProxyDefinitionManager::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkSIObject.

static vtkTypeUInt32 vtkSIProxyDefinitionManager::GetReservedGlobalID ( ) [static]

Returns the ID reserved for the proxy definition manager.

static void vtkSIProxyDefinitionManager::PatchXMLProperty ( vtkPVXMLElement propElement) [static]

For now we dynamically convert InformationHelper into the correct si_class and attribute sets. THIS CODE SHOULD BE REMOVED once InformationHelper have been removed from legacy XML

vtkPVXMLElement* vtkSIProxyDefinitionManager::GetProxyDefinition ( const char *  group,
const char *  name,
bool  throwError 
)

Returns a registered proxy definition or return a NULL otherwise. Moreover, error can be throw if the definition was not found if the flag throwError is true.

vtkPVXMLElement* vtkSIProxyDefinitionManager::GetProxyDefinition ( const char *  group,
const char *  name 
) [inline]

Returns a registered proxy definition or return a NULL otherwise. Moreover, error can be throw if the definition was not found if the flag throwError is true.

Definition at line 71 of file vtkSIProxyDefinitionManager.h.

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

Return true if the XML Definition was found

vtkPVXMLElement* vtkSIProxyDefinitionManager::GetCollapsedProxyDefinition ( const char *  group,
const char *  name,
const char *  subProxyName,
bool  throwError 
)

Returns the same thing as GetProxyDefinition in a flatten manner. By flatten, we mean that the class hierarchy has been walked and merged into a single vtkPVXMLElement definition.

vtkPVXMLElement* vtkSIProxyDefinitionManager::GetCollapsedProxyDefinition ( const char *  group,
const char *  name,
const char *  subProxyName 
) [inline]

Returns the same thing as GetProxyDefinition in a flatten manner. By flatten, we mean that the class hierarchy has been walked and merged into a single vtkPVXMLElement definition.

Definition at line 89 of file vtkSIProxyDefinitionManager.h.

void vtkSIProxyDefinitionManager::AddCustomProxyDefinition ( const char *  group,
const char *  name,
vtkPVXMLElement top 
)

Add a custom proxy definition. Custom definitions are NOT ALLOWED to overrive or overlap any ProxyDefinition that has been defined by parsing server manager proxy configuration files. 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 vtkSIProxyDefinitionManager::AddCustomProxyDefinition ( const char *  groupName,
const char *  proxyName,
const char *  xmlcontents 
)

Add a custom proxy definition. Custom definitions are NOT ALLOWED to overrive or overlap any ProxyDefinition that has been defined by parsing server manager proxy configuration files. 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 vtkSIProxyDefinitionManager::RemoveCustomProxyDefinition ( const char *  group,
const char *  name 
)

Given its name, remove a custom proxy definition. Note that this can only be used to remove definitions added using AddCustomProxyDefinition(), cannot be used to remove definitions loaded using vtkSMXMLParser.

void vtkSIProxyDefinitionManager::ClearCustomProxyDefinitions ( )

Remove all registered custom proxy definitions. Note that this can only be used to remove definitions added using AddCustomProxyDefinition(), cannot be used to remove definitions loaded using vtkSMXMLParser.

void vtkSIProxyDefinitionManager::LoadCustomProxyDefinitions ( vtkPVXMLElement root)

Load custom proxy definitions and register them.

void vtkSIProxyDefinitionManager::LoadCustomProxyDefinitionsFromString ( const char *  xmlContent)

Load custom proxy definitions and register them.

void vtkSIProxyDefinitionManager::SaveCustomProxyDefinitions ( vtkPVXMLElement root)

Save registered custom proxy definitions. The caller must release the reference to the returned vtkPVXMLElement.

bool vtkSIProxyDefinitionManager::LoadConfigurationXML ( vtkPVXMLElement root)

Loads server-manager configuration xml.

bool vtkSIProxyDefinitionManager::LoadConfigurationXMLFromString ( const char *  xmlContent)

Loads server-manager configuration xml.

vtkPVProxyDefinitionIterator* vtkSIProxyDefinitionManager::NewIterator ( int  scope = ALL_DEFINITIONS)

Return a NEW instance of vtkPVProxyDefinitionIterator configured to get through all the definition available for the requested scope. Possible scope defined as enum inside vtkSIProxyDefinitionManager: ALL_DEFINITIONS=0 / CORE_DEFINITIONS=1 / CUSTOM_DEFINITIONS=2 Some extra restriction can be set directly on the iterator itself by setting a set of GroupName...

vtkPVProxyDefinitionIterator* vtkSIProxyDefinitionManager::NewSingleGroupIterator ( const char *  groupName,
int  scope = ALL_DEFINITIONS 
)

Return a new configured iterator for traversing a set of proxy definition for only one GroupName. Possible scope defined as enum inside vtkSIProxyDefinitionManager: ALL_DEFINITIONS=0 / CORE_DEFINITIONS=1 / CUSTOM_DEFINITIONS=2

void vtkSIProxyDefinitionManager::EnableXMLProxyDefnitionUpdate ( bool  )

Desactivate the modification of the ProxyDefinitions for that given vtkSIProxyDefinitionManager to make sure update only come from the remote server and not plugin loaded on the client.

virtual void vtkSIProxyDefinitionManager::Push ( vtkSMMessage msg) [virtual]

Push a new state to the underneath implementation The provided implementation just store the message and return it at the Pull one.

Reimplemented from vtkSIObject.

virtual void vtkSIProxyDefinitionManager::Pull ( vtkSMMessage msg) [virtual]

Pull the current state of the underneath implementation The provided implementation update the given message with the one that has been previously pushed

Reimplemented from vtkSIObject.

void vtkSIProxyDefinitionManager::AttachShowInMenuHintsToProxy ( vtkPVXMLElement proxy) [protected]

Helper method that add a ShowInMenu Hint for a proxy definition. This allow that given proxy to show up inside the Sources/Filters menu inside the UI.

void vtkSIProxyDefinitionManager::AttachShowInMenuHintsToProxyFromProxyGroups ( vtkPVXMLElement root) [protected]

Helper method that add a ShowInMenu Hint for any proxy definition that lie in a sources or filters group. method AttachShowInMenuHintsToProxy

bool vtkSIProxyDefinitionManager::LoadConfigurationXML ( vtkPVXMLElement root,
bool  attachShowInMenuHints 
) [protected]

Loads server-manager configuration xml. Those method are protected as they allow to automatically add some extra hints for those loaded definition set. This is essentially used when proxy get loaded as legacy proxy don't have those expected Hints. FIXME: Once those pluging get updated, this extra hint attachement might be removed.

bool vtkSIProxyDefinitionManager::LoadConfigurationXMLFromString ( const char *  xmlContent,
bool  attachShowInMenuHints 
) [protected]

Loads server-manager configuration xml. Those method are protected as they allow to automatically add some extra hints for those loaded definition set. This is essentially used when proxy get loaded as legacy proxy don't have those expected Hints. FIXME: Once those pluging get updated, this extra hint attachement might be removed.

void vtkSIProxyDefinitionManager::OnPluginLoaded ( vtkObject caller,
unsigned long  event,
void *  calldata 
) [protected]

Callback called when a plugin is loaded.

void vtkSIProxyDefinitionManager::HandlePlugin ( vtkPVPlugin ) [protected]

Callback called when a plugin is loaded.

void vtkSIProxyDefinitionManager::AddElement ( const char *  groupName,
const char *  proxyName,
vtkPVXMLElement element 
) [protected]

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

bool vtkSIProxyDefinitionManager::AddCustomProxyDefinitionInternal ( const char *  group,
const char *  name,
vtkPVXMLElement top 
) [protected]

Implementation for add custom proxy definition.

void vtkSIProxyDefinitionManager::MergeProxyDefinition ( vtkPVXMLElement element,
vtkPVXMLElement elementToFill 
) [protected]

Integrate a ProxyDefinition into another ProxyDefinition by merging them. If properties are overriden is the last property that will last. So when we build a merged definition hierarchy, we should start from the root and go down.

void vtkSIProxyDefinitionManager::InvalidateCollapsedDefinition ( ) [protected]

Method used to clear the Flatten version of the definition. This will force its recomputation when needed. This should be called each time new definition get added. (Not the Custom one since those should NOT conflict with the core definitions.)

vtkPVXMLElement* vtkSIProxyDefinitionManager::GetProxyElement ( const char *  groupName,
const char *  proxyName 
) [protected]

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

vtkPVXMLElement* vtkSIProxyDefinitionManager::ExtractSubProxy ( vtkPVXMLElement proxyDefinition,
const char *  subProxyName 
) [protected]

Convenient method used to extract sub-proxy definition inside a proxy definition. If (subProxyName == NULL) return proxyDefinition;

void vtkSIProxyDefinitionManager::InvokeCustomDefitionsUpdated ( ) [protected]

Called when custom definitions are updated. Fires appropriate events.


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