Utility class to load state from XML.
More...
#include <vtkSMStateLoader.h>
|
virtual int | LoadStateInternal (vtkPVXMLElement *rootElement) |
| The rootElement must be the <ServerManagerState> xml element. More...
|
|
virtual void | CreatedNewProxy (vtkTypeUInt32 id, vtkSMProxy *proxy) |
| Called after a new proxy is created. More...
|
|
virtual vtkSMProxy * | CreateProxy (const char *xmlgroup, const char *xmlname, const char *subProxyName=NULL) |
| Overridden so that when new views are to be created, we create views suitable for the connection. More...
|
|
virtual int | HandleProxyCollection (vtkPVXMLElement *collectionElement) |
|
virtual void | HandleCustomProxyDefinitions (vtkPVXMLElement *element) |
|
int | HandleLinks (vtkPVXMLElement *linksElement) |
|
virtual int | BuildProxyCollectionInformation (vtkPVXMLElement *) |
|
virtual bool | UpdateRegistrationInfo (std::string &group, std::string &name, vtkSMProxy *proxy) |
| Update a proxy's registration group and name before it gets registered. More...
|
|
virtual vtkPVXMLElement * | LocateProxyElement (vtkTypeUInt32 id) |
| Return the xml element for the state of the proxy with the given id. More...
|
|
vtkPVXMLElement * | LocateProxyElementInternal (vtkPVXMLElement *root, vtkTypeUInt32 id) |
| Used by LocateProxyElement(). More...
|
|
virtual bool | VerifyXMLVersion (vtkPVXMLElement *rootElement) |
| Checks the root element for version. More...
|
|
vtkSMProxy * | LocateExistingProxyUsingRegistrationName (vtkTypeUInt32 id) |
| Returns the first proxy already registered using any of the registration (group, name) assigned to the proxy with the given id in the state file. More...
|
|
|
virtual void | RegisterProxy (vtkTypeUInt32 id, vtkSMProxy *proxy) |
| This method scans through the internal data structure built during BuildProxyCollectionInformation() and registers the proxy. More...
|
|
virtual void | RegisterProxyInternal (const char *group, const char *name, vtkSMProxy *proxy) |
| This method scans through the internal data structure built during BuildProxyCollectionInformation() and registers the proxy. More...
|
|
| vtkSMDeserializerXML () |
|
| ~vtkSMDeserializerXML () |
|
virtual vtkSMProxy * | NewProxy (vtkTypeUInt32 id, vtkSMProxyLocator *locator) |
| Create a new proxy with the id if possible. More...
|
|
virtual int | LoadProxyState (vtkPVXMLElement *element, vtkSMProxy *, vtkSMProxyLocator *locator) |
| TEMPORARY. More...
|
|
| vtkSMDeserializer () |
|
| ~vtkSMDeserializer () |
|
Utility class to load state from XML.
vtkSMStateLoader can load server manager state from a given vtkPVXMLElement. This element is usually populated by a vtkPVXMLParser.
- See also
- vtkPVXMLParser vtkPVXMLElement
Definition at line 40 of file vtkSMStateLoader.h.
◆ Superclass
◆ vtkSMStateLoader()
vtkSMStateLoader::vtkSMStateLoader |
( |
| ) |
|
|
protected |
Return an array of ids.
The ids are stored in the following order and the size of the array is provided as argument. [key, value, key, value, ...] The array is kept internaly using a std::vector
◆ ~vtkSMStateLoader()
vtkSMStateLoader::~vtkSMStateLoader |
( |
| ) |
|
|
protected |
Return an array of ids.
The ids are stored in the following order and the size of the array is provided as argument. [key, value, key, value, ...] The array is kept internaly using a std::vector
◆ New()
◆ GetClassName()
virtual const char* vtkSMStateLoader::GetClassName |
( |
| ) |
|
|
virtual |
◆ IsTypeOf()
static int vtkSMStateLoader::IsTypeOf |
( |
const char * |
type | ) |
|
|
static |
◆ IsA()
virtual int vtkSMStateLoader::IsA |
( |
const char * |
type | ) |
|
|
virtual |
◆ SafeDownCast()
◆ PrintSelf()
void vtkSMStateLoader::PrintSelf |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
| |
◆ LoadState()
int vtkSMStateLoader::LoadState |
( |
vtkPVXMLElement * |
rootElement, |
|
|
bool |
keepOriginalId = false |
|
) |
| |
Load the state from the given root element.
◆ SetProxyLocator()
◆ GetProxyLocator()
◆ SetKeepIdMapping()
virtual void vtkSMStateLoader::SetKeepIdMapping |
( |
int |
| ) |
|
|
virtual |
Allow the loader to keep the mapping between the id from the loaded state to the current proxy attributed id.
◆ GetKeepIdMapping()
virtual int vtkSMStateLoader::GetKeepIdMapping |
( |
| ) |
|
|
virtual |
Allow the loader to keep the mapping between the id from the loaded state to the current proxy attributed id.
◆ KeepIdMappingOn()
virtual void vtkSMStateLoader::KeepIdMappingOn |
( |
| ) |
|
|
virtual |
Allow the loader to keep the mapping between the id from the loaded state to the current proxy attributed id.
◆ KeepIdMappingOff()
virtual void vtkSMStateLoader::KeepIdMappingOff |
( |
| ) |
|
|
virtual |
Allow the loader to keep the mapping between the id from the loaded state to the current proxy attributed id.
◆ GetMappingArray()
vtkTypeUInt32* vtkSMStateLoader::GetMappingArray |
( |
int & |
size | ) |
|
Return an array of ids.
The ids are stored in the following order and the size of the array is provided as argument. [key, value, key, value, ...] The array is kept internaly using a std::vector
◆ LoadStateInternal()
virtual int vtkSMStateLoader::LoadStateInternal |
( |
vtkPVXMLElement * |
rootElement | ) |
|
|
protectedvirtual |
The rootElement must be the <ServerManagerState> xml element.
If rootElement is not a <ServerManagerState> element, then we try to locate the first <ServerManagerState> nested element and load that. Load the state from the given root element.
◆ CreatedNewProxy()
virtual void vtkSMStateLoader::CreatedNewProxy |
( |
vtkTypeUInt32 |
id, |
|
|
vtkSMProxy * |
proxy |
|
) |
| |
|
protectedvirtual |
Called after a new proxy is created.
The main responsibility of this method is to ensure that proxy gets a GlobalId (either automatically or using the id from the state if LoadState() was called with keepOriginalId
set to true). It also called vtkSMProxy::UpdateVTKObjects() and vtkSMProxy::UpdatePipelineInformation() (if applicable) to ensure that the state loaded on the proxy is "pushed" and any info properties updated. We also create a list to track the order in which proxies are created. This order is a dependency order too and hence helps us register proxies in order of dependencies.
Reimplemented from vtkSMDeserializerXML.
◆ CreateProxy()
virtual vtkSMProxy* vtkSMStateLoader::CreateProxy |
( |
const char * |
xmlgroup, |
|
|
const char * |
xmlname, |
|
|
const char * |
subProxyName = NULL |
|
) |
| |
|
protectedvirtual |
Overridden so that when new views are to be created, we create views suitable for the connection.
Reimplemented from vtkSMDeserializerXML.
◆ HandleProxyCollection()
virtual int vtkSMStateLoader::HandleProxyCollection |
( |
vtkPVXMLElement * |
collectionElement | ) |
|
|
protectedvirtual |
◆ HandleCustomProxyDefinitions()
virtual void vtkSMStateLoader::HandleCustomProxyDefinitions |
( |
vtkPVXMLElement * |
element | ) |
|
|
protectedvirtual |
◆ HandleLinks()
◆ BuildProxyCollectionInformation()
virtual int vtkSMStateLoader::BuildProxyCollectionInformation |
( |
vtkPVXMLElement * |
| ) |
|
|
protectedvirtual |
◆ RegisterProxy()
virtual void vtkSMStateLoader::RegisterProxy |
( |
vtkTypeUInt32 |
id, |
|
|
vtkSMProxy * |
proxy |
|
) |
| |
|
protectedvirtual |
This method scans through the internal data structure built during BuildProxyCollectionInformation() and registers the proxy.
The DS keeps info about each proxy ID and the groups and names the proxy should be registered as (as indicated in the state file).
◆ RegisterProxyInternal()
virtual void vtkSMStateLoader::RegisterProxyInternal |
( |
const char * |
group, |
|
|
const char * |
name, |
|
|
vtkSMProxy * |
proxy |
|
) |
| |
|
protectedvirtual |
This method scans through the internal data structure built during BuildProxyCollectionInformation() and registers the proxy.
The DS keeps info about each proxy ID and the groups and names the proxy should be registered as (as indicated in the state file).
◆ UpdateRegistrationInfo()
virtual bool vtkSMStateLoader::UpdateRegistrationInfo |
( |
std::string & |
group, |
|
|
std::string & |
name, |
|
|
vtkSMProxy * |
proxy |
|
) |
| |
|
protectedvirtual |
Update a proxy's registration group and name before it gets registered.
Default implementation handles helper group group names. Returns false to skip registering the proxy.
- Parameters
-
[in,out] | group | proxy registration group |
[in,out] | name | proxy registration name |
[in] | proxy | proxy being registered |
- Returns
- true to continue registering the proxy, false to skip registering it.
◆ LocateProxyElement()
virtual vtkPVXMLElement* vtkSMStateLoader::LocateProxyElement |
( |
vtkTypeUInt32 |
id | ) |
|
|
protectedvirtual |
Return the xml element for the state of the proxy with the given id.
This is used by NewProxy() when the proxy with the given id is not located in the internal CreatedProxies map.
Reimplemented from vtkSMDeserializerXML.
◆ LocateProxyElementInternal()
◆ VerifyXMLVersion()
virtual bool vtkSMStateLoader::VerifyXMLVersion |
( |
vtkPVXMLElement * |
rootElement | ) |
|
|
protectedvirtual |
Checks the root element for version.
If failed, return false.
◆ LocateExistingProxyUsingRegistrationName()
vtkSMProxy* vtkSMStateLoader::LocateExistingProxyUsingRegistrationName |
( |
vtkTypeUInt32 |
id | ) |
|
|
protected |
Returns the first proxy already registered using any of the registration (group, name) assigned to the proxy with the given id in the state file.
◆ ServerManagerStateElement
◆ ProxyLocator
◆ KeepIdMapping
int vtkSMStateLoader::KeepIdMapping |
|
protected |
The documentation for this class was generated from the following file: