Utility class to load state from XML. More...
#include <vtkSMStateLoader.h>
Public Types | |
typedef vtkSMDeserializerXML | Superclass |
![]() | |
typedef vtkSMDeserializer | Superclass |
![]() | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) override |
int | LoadState (vtkPVXMLElement *rootElement, bool keepOriginalId=false) |
Load the state from the given root element. More... | |
void | SetProxyLocator (vtkSMProxyLocator *loc) |
Get/Set the proxy locator to use. More... | |
virtual vtkSMProxyLocator * | GetProxyLocator () |
Get/Set the proxy locator to use. More... | |
virtual void | SetKeepIdMapping (int) |
Allow the loader to keep the mapping between the id from the loaded state to the current proxy attributed id. More... | |
virtual int | GetKeepIdMapping () |
Allow the loader to keep the mapping between the id from the loaded state to the current proxy attributed id. More... | |
virtual void | KeepIdMappingOn () |
Allow the loader to keep the mapping between the id from the loaded state to the current proxy attributed id. More... | |
virtual void | KeepIdMappingOff () |
Allow the loader to keep the mapping between the id from the loaded state to the current proxy attributed id. More... | |
![]() | |
void | SetSession (vtkSMSession *session) |
Convenience method for setting the SessionProxyManager. More... | |
vtkSMSession * | GetSession () |
Provides access to the session. More... | |
vtkSMSessionProxyManager * | GetSessionProxyManager () |
Get/Set the proxy manager on which this deserializer is expected to operate. More... | |
void | SetSessionProxyManager (vtkSMSessionProxyManager *) |
Get/Set the proxy manager on which this deserializer is expected to operate. More... | |
![]() | |
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) |
![]() | |
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 vtkSMStateLoader * | New () |
static int | IsTypeOf (const char *type) |
static vtkSMStateLoader * | SafeDownCast (vtkObject *o) |
![]() | |
static vtkSMDeserializerXML * | New () |
static int | IsTypeOf (const char *type) |
static vtkSMDeserializerXML * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkSMDeserializer * | SafeDownCast (vtkObject *o) |
![]() | |
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 vtkTypeBool | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
static vtkObjectBase * | New () |
Protected Member Functions | |
virtual int | LoadStateInternal (vtkPVXMLElement *rootElement) |
The rootElement must be the <ServerManagerState/> xml element. More... | |
void | CreatedNewProxy (vtkTypeUInt32 id, vtkSMProxy *proxy) override |
Called after a new proxy is created. More... | |
vtkSMProxy * | CreateProxy (const char *xmlgroup, const char *xmlname, const char *subProxyName=nullptr) override |
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... | |
vtkPVXMLElement * | LocateProxyElement (vtkTypeUInt32 id) override |
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 () override | |
vtkSMProxy * | NewProxy (vtkTypeUInt32 id, vtkSMProxyLocator *locator) override |
Create a new proxy with the id if possible. More... | |
virtual int | LoadProxyState (vtkPVXMLElement *element, vtkSMProxy *, vtkSMProxyLocator *locator) |
TEMPORARY. More... | |
![]() | |
vtkSMDeserializer () | |
~vtkSMDeserializer () override | |
![]() | |
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 () |
![]() | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
vtkPVXMLElement * | ServerManagerStateElement |
vtkSMProxyLocator * | ProxyLocator |
int | KeepIdMapping |
![]() | |
vtkWeakPointer< vtkSMSessionProxyManager > | SessionProxyManager |
![]() | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
![]() | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
vtkTypeUInt32 * | GetMappingArray (int &size) |
Return an array of ids. More... | |
vtkSMStateLoader () | |
Return an array of ids. More... | |
~vtkSMStateLoader () override | |
Return an array of ids. More... | |
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.
Definition at line 28 of file vtkSMStateLoader.h.
Definition at line 32 of file vtkSMStateLoader.h.
|
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 internally using a std::vector
|
overrideprotected |
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 internally using a std::vector
|
static |
|
virtual |
Reimplemented from vtkSMDeserializerXML.
Reimplemented in vtkSMInsituStateLoader.
Reimplemented from vtkSMDeserializerXML.
Reimplemented in vtkSMInsituStateLoader.
|
static |
|
overridevirtual |
Reimplemented from vtkSMDeserializerXML.
int vtkSMStateLoader::LoadState | ( | vtkPVXMLElement * | rootElement, |
bool | keepOriginalId = false |
||
) |
Load the state from the given root element.
void vtkSMStateLoader::SetProxyLocator | ( | vtkSMProxyLocator * | loc | ) |
Get/Set the proxy locator to use.
Default is vtkSMProxyLocator will be used.
|
virtual |
Get/Set the proxy locator to use.
Default is vtkSMProxyLocator will be used.
|
virtual |
Allow the loader to keep the mapping between the id from the loaded state to the current proxy attributed id.
|
virtual |
Allow the loader to keep the mapping between the id from the loaded state to the current proxy attributed id.
|
virtual |
Allow the loader to keep the mapping between the id from the loaded state to the current proxy attributed id.
|
virtual |
Allow the loader to keep the mapping between the id from the loaded state to the current proxy attributed id.
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 internally using a std::vector
|
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.
|
overrideprotectedvirtual |
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.
|
overrideprotectedvirtual |
Overridden so that when new views are to be created, we create views suitable for the connection.
Reimplemented from vtkSMDeserializerXML.
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protectedvirtual |
|
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).
|
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).
|
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.
[in,out] | group | proxy registration group |
[in,out] | name | proxy registration name |
[in] | proxy | proxy being registered |
|
overrideprotectedvirtual |
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.
|
protected |
Used by LocateProxyElement().
Recursively tries to locate the proxy state element for the proxy.
|
protectedvirtual |
Checks the root element for version.
If failed, return false.
|
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.
|
protected |
Definition at line 153 of file vtkSMStateLoader.h.
|
protected |
Definition at line 154 of file vtkSMStateLoader.h.
|
protected |
Definition at line 155 of file vtkSMStateLoader.h.