Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkPVSessionBase Class Referenceabstract

Abstract class used to provide the main implementation of the ParaView session methods for the following classes: vtkSMSession, vtkSMSessionClient, vtkSMSessionServer. More...

#include <vtkPVSessionBase.h>

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

Public Types

enum  EventIds { RegisterRemoteObjectEvent = 1234, UnRegisterRemoteObjectEvent = 4321, ProcessingRemoteEnd = 2143, ConnectionLost = 6789 }
 
typedef vtkPVSession Superclass
 
- Public Types inherited from vtkPVSession
enum  ServerFlags {
  NONE = 0, DATA_SERVER = 0x01, DATA_SERVER_ROOT = 0x02, RENDER_SERVER = 0x04,
  RENDER_SERVER_ROOT = 0x08, SERVERS = DATA_SERVER | RENDER_SERVER, CLIENT = 0x10, CLIENT_AND_SERVERS = DATA_SERVER | CLIENT | RENDER_SERVER
}
 
typedef vtkSession Superclass
 
- Public Types inherited from vtkSession
typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
ServerFlags GetProcessRoles () override
 Returns a ServerFlags indicate the nature of the current processes. More...
 
vtkPVServerInformationGetServerInformation () override
 vtkPVServerInformation is an information-object that provides information about the server processes. More...
 
vtkMPIMToNSocketConnectionGetMPIMToNSocketConnection () override
 This is socket connection, if any to communicate between the data-server and render-server nodes. More...
 
virtual void PushState (vtkSMMessage *msg)
 Push the state message. More...
 
virtual void PullState (vtkSMMessage *msg)
 Pull the state message. More...
 
virtual void ExecuteStream (vtkTypeUInt32 location, const vtkClientServerStream &stream, bool ignore_errors=false)
 Execute a command on the given processes. More...
 
virtual const vtkClientServerStreamGetLastResult (vtkTypeUInt32 location)
 Returns the response of the ExecuteStream() call from the location. More...
 
virtual bool GatherInformation (vtkTypeUInt32 location, vtkPVInformation *information, vtkTypeUInt32 globalid)
 Gather information about an object referred by the globalid. More...
 
virtual void NotifyAllClients (const vtkSMMessage *)=0
 Sends the message to all clients. More...
 
virtual void NotifyOtherClients (const vtkSMMessage *)=0
 Sends the message to all but the active client-session. More...
 
vtkSIProxyDefinitionManagerGetProxyDefinitionManager ()
 Get the ProxyDefinitionManager. More...
 
vtkSIObjectGetSIObject (vtkTypeUInt32 globalid)
 Returns a vtkSIObject or subclass given its global id, if any. More...
 
virtual void UnRegisterSIObject (vtkSMMessage *msg)
 Unregister server side object. More...
 
virtual void RegisterSIObject (vtkSMMessage *msg)
 Register server side object. More...
 
vtkObjectGetRemoteObject (vtkTypeUInt32 globalid)
 Return a vtkSMRemoteObject given its global id if any otherwise return NULL;. More...
 
virtual void GetAllRemoteObjects (vtkCollection *collection)
 Allow the user to fill its vtkCollection with all RemoteObject This could be useful when you want to hold a reference to them to prevent any deletion across several method call. More...
 
virtual vtkTypeUInt32 GetNextGlobalUniqueIdentifier ()
 Provides the next available identifier. More...
 
virtual vtkTypeUInt32 GetNextChunkGlobalUniqueIdentifier (vtkTypeUInt32 chunkSize)
 Return the first Id of the requested chunk. More...
 
virtual bool IsProcessingRemoteNotification ()
 This property is used to discard ignore_synchronization proxy property when we load protobuf states. More...
 
virtual void UseSessionCoreOf (vtkPVSessionBase *other)
 Update internal session core in order to use the one used in another session. More...
 
virtual vtkPVSessionCoreGetSessionCore ()
 Provides access to the session core. More...
 
- Public Member Functions inherited from vtkPVSession
bool HasProcessRole (vtkTypeUInt32 flag)
 Convenience method that returns true if the current session is serving the indicated role on this process. More...
 
virtual vtkMultiProcessControllerGetController (ServerFlags processType)
 Returns the controller used to communicate with the process. More...
 
virtual bool IsMultiClients ()
 Allow anyone to know easily if the current session is involved in collaboration or not. More...
 
bool GetPendingProgress ()
 Returns true if the session is within a PrepareProgress() and CleanupPendingProgress() block. More...
 
virtual vtkPVProgressHandlerGetProgressHandler ()
 Provides access to the progress handler. More...
 
void PrepareProgress ()
 Should be called to begin/end receiving progresses on this session. More...
 
void CleanupPendingProgress ()
 Should be called to begin/end receiving progresses on this session. More...
 
- Public Member Functions inherited from vtkSession
virtual bool GetIsAlive ()=0
 Returns true is this session is active/alive/valid. 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)
 
vtkCommandGetCommand (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)
 
vtkCommandGetCommand (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 int IsTypeOf (const char *type)
 
static vtkPVSessionBaseSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkPVSession
static int IsTypeOf (const char *type)
 
static vtkPVSessionSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkSession
static int IsTypeOf (const char *type)
 
static vtkSessionSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 
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 vtkObjectBaseNew ()
 
static vtkObjectBaseNew ()
 

Protected Member Functions

 vtkPVSessionBase ()
 
 vtkPVSessionBase (vtkPVSessionCore *coreToUse)
 
 ~vtkPVSessionBase () override
 
void RegisterRemoteObject (vtkTypeUInt32 globalid, vtkTypeUInt32 location, vtkObject *obj)
 Register a remote object. More...
 
void UnRegisterRemoteObject (vtkTypeUInt32 globalid, vtkTypeUInt32 location)
 Unregister a remote object. More...
 
vtkPVSessionCoreGetSessionCore () const
 Method used to migrate from one Session type to another by keeping the same vtkPVSessionCore. More...
 
void SetSessionCore (vtkPVSessionCore *)
 Method used to migrate from one Session type to another by keeping the same vtkPVSessionCore. More...
 
void PrepareProgressInternal () override
 Should be called to begin/end receiving progresses on this session. More...
 
void CleanupPendingProgressInternal () override
 Should be called to begin/end receiving progresses on this session. More...
 
- Protected Member Functions inherited from vtkPVSession
 vtkPVSession ()
 
 ~vtkPVSession () override
 
virtual bool OnWrongTagEvent (vtkObject *caller, unsigned long eventid, void *calldata)
 Callback when any vtkMultiProcessController subclass fires a WrongTagEvent. More...
 
- Protected Member Functions inherited from vtkSession
 vtkSession ()
 
 ~vtkSession () override
 
virtual void Activate ()
 Subclasses must call this to mark the session active. More...
 
virtual void DeActivate ()
 Subclasses must call this to mark the session inactive. More...
 
- 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

vtkPVSessionCoreSessionCore
 
- Protected Attributes inherited from vtkPVSession
vtkPVProgressHandlerProgressHandler
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Friends

class vtkSMRemoteObject
 
class vtkSMSessionProxyManager
 
class vtkSMLiveInsituLinkProxy
 
bool ProcessingRemoteNotification
 Methods used to monitor if we are currently processing a server notification Only vtkSMSessionClient use the flag to disable ignore_synchronization properties from being updated. More...
 
virtual bool StartProcessingRemoteNotification ()
 Methods used to monitor if we are currently processing a server notification Only vtkSMSessionClient use the flag to disable ignore_synchronization properties from being updated. More...
 
virtual void StopProcessingRemoteNotification (bool previousValue)
 Methods used to monitor if we are currently processing a server notification Only vtkSMSessionClient use the flag to disable ignore_synchronization properties from being updated. More...
 

Additional Inherited Members

- Protected Types inherited from vtkPVSession
enum  { EXCEPTION_EVENT_TAG = 31416 }
 

Detailed Description

Abstract class used to provide the main implementation of the ParaView session methods for the following classes: vtkSMSession, vtkSMSessionClient, vtkSMSessionServer.

Definition at line 39 of file vtkPVSessionBase.h.

Member Typedef Documentation

◆ Superclass

Definition at line 42 of file vtkPVSessionBase.h.

Member Enumeration Documentation

◆ EventIds

Enumerator
RegisterRemoteObjectEvent 
UnRegisterRemoteObjectEvent 
ProcessingRemoteEnd 
ConnectionLost 

Definition at line 45 of file vtkPVSessionBase.h.

Constructor & Destructor Documentation

◆ vtkPVSessionBase() [1/2]

vtkPVSessionBase::vtkPVSessionBase ( )
protected

◆ vtkPVSessionBase() [2/2]

vtkPVSessionBase::vtkPVSessionBase ( vtkPVSessionCore coreToUse)
protected

◆ ~vtkPVSessionBase()

vtkPVSessionBase::~vtkPVSessionBase ( )
overrideprotected

Member Function Documentation

◆ GetClassName()

virtual const char* vtkPVSessionBase::GetClassName ( )
virtual

Reimplemented from vtkPVSession.

Reimplemented in vtkSMSession, vtkSMSessionClient, and vtkPVSessionServer.

◆ IsTypeOf()

static int vtkPVSessionBase::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkPVSessionBase::IsA ( const char *  type)
virtual

Reimplemented from vtkPVSession.

Reimplemented in vtkSMSession, vtkSMSessionClient, and vtkPVSessionServer.

◆ SafeDownCast()

static vtkPVSessionBase* vtkPVSessionBase::SafeDownCast ( vtkObject o)
static

◆ PrintSelf()

void vtkPVSessionBase::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Reimplemented from vtkPVSession.

Reimplemented in vtkSMSession, vtkSMSessionClient, and vtkPVSessionServer.

◆ GetProcessRoles()

ServerFlags vtkPVSessionBase::GetProcessRoles ( )
overridevirtual

Returns a ServerFlags indicate the nature of the current processes.

e.g. if the current processes acts as a data-server and a render-server, it returns DATA_SERVER | RENDER_SERVER. The implementation provided is suitable for server processes such as pvserver, pvdataserver (both root and satellites).

Reimplemented from vtkPVSession.

Reimplemented in vtkSMSession, and vtkSMSessionClient.

◆ GetServerInformation()

vtkPVServerInformation* vtkPVSessionBase::GetServerInformation ( )
overridevirtual

vtkPVServerInformation is an information-object that provides information about the server processes.

These include server-side capabilities as well as server-side command line arguments e.g. tile-display parameters. Use this method to obtain the server-side information. Overridden to provide support for non-remote-server case. We simply read the local process information and return it.

Implements vtkPVSession.

Reimplemented in vtkSMSessionClient.

◆ GetMPIMToNSocketConnection()

vtkMPIMToNSocketConnection* vtkPVSessionBase::GetMPIMToNSocketConnection ( )
overridevirtual

This is socket connection, if any to communicate between the data-server and render-server nodes.

Forwarded for vtkPVSessionCore.

Reimplemented from vtkPVSession.

◆ PushState()

virtual void vtkPVSessionBase::PushState ( vtkSMMessage msg)
virtual

Push the state message.

Reimplemented in vtkSMSession, and vtkSMSessionClient.

◆ PullState()

virtual void vtkPVSessionBase::PullState ( vtkSMMessage msg)
virtual

Pull the state message.

Reimplemented in vtkSMSessionClient.

◆ ExecuteStream()

virtual void vtkPVSessionBase::ExecuteStream ( vtkTypeUInt32  location,
const vtkClientServerStream stream,
bool  ignore_errors = false 
)
virtual

Execute a command on the given processes.

Use GetLastResult() to obtain the last result after the command stream is evaluated. Once can set ignore_errors to true, to ignore any interpreting errors.

Reimplemented in vtkSMSessionClient.

◆ GetLastResult()

virtual const vtkClientServerStream& vtkPVSessionBase::GetLastResult ( vtkTypeUInt32  location)
virtual

Returns the response of the ExecuteStream() call from the location.

Note if location refers to multiple processes, then the reply is only fetched from the "closest" process.

Reimplemented in vtkSMSessionClient.

◆ GatherInformation()

virtual bool vtkPVSessionBase::GatherInformation ( vtkTypeUInt32  location,
vtkPVInformation information,
vtkTypeUInt32  globalid 
)
virtual

Gather information about an object referred by the globalid.

location identifies the processes to gather the information from.

Reimplemented in vtkSMSessionClient.

◆ NotifyAllClients()

virtual void vtkPVSessionBase::NotifyAllClients ( const vtkSMMessage )
pure virtual

Sends the message to all clients.

Implemented in vtkSMSession, and vtkPVSessionServer.

◆ NotifyOtherClients()

virtual void vtkPVSessionBase::NotifyOtherClients ( const vtkSMMessage )
pure virtual

Sends the message to all but the active client-session.

Implemented in vtkSMSession, and vtkPVSessionServer.

◆ GetSessionCore() [1/2]

virtual vtkPVSessionCore* vtkPVSessionBase::GetSessionCore ( )
virtual

Provides access to the session core.

◆ GetProxyDefinitionManager()

vtkSIProxyDefinitionManager* vtkPVSessionBase::GetProxyDefinitionManager ( )

Get the ProxyDefinitionManager.

◆ GetSIObject()

vtkSIObject* vtkPVSessionBase::GetSIObject ( vtkTypeUInt32  globalid)

Returns a vtkSIObject or subclass given its global id, if any.

◆ UnRegisterSIObject()

virtual void vtkPVSessionBase::UnRegisterSIObject ( vtkSMMessage msg)
virtual

Unregister server side object.

(SIObject)

Reimplemented in vtkSMSessionClient.

◆ RegisterSIObject()

virtual void vtkPVSessionBase::RegisterSIObject ( vtkSMMessage msg)
virtual

Register server side object.

(SIObject)

Reimplemented in vtkSMSessionClient.

◆ GetRemoteObject()

vtkObject* vtkPVSessionBase::GetRemoteObject ( vtkTypeUInt32  globalid)

Return a vtkSMRemoteObject given its global id if any otherwise return NULL;.

◆ GetAllRemoteObjects()

virtual void vtkPVSessionBase::GetAllRemoteObjects ( vtkCollection collection)
virtual

Allow the user to fill its vtkCollection with all RemoteObject This could be useful when you want to hold a reference to them to prevent any deletion across several method call.

◆ GetNextGlobalUniqueIdentifier()

virtual vtkTypeUInt32 vtkPVSessionBase::GetNextGlobalUniqueIdentifier ( )
virtual

Provides the next available identifier.

This implementation works locally. without any code distribution. To support the distributed architecture the vtkSMSessionClient override those method to call them on the DATA_SERVER vtkPVSessionBase instance.

Reimplemented in vtkSMSessionClient.

◆ GetNextChunkGlobalUniqueIdentifier()

virtual vtkTypeUInt32 vtkPVSessionBase::GetNextChunkGlobalUniqueIdentifier ( vtkTypeUInt32  chunkSize)
virtual

Return the first Id of the requested chunk.

1 = ReverveNextIdChunk(10); | Reserved ids [1,2,3,4,5,6,7,8,9,10] 11 = ReverveNextIdChunk(10);| Reserved ids [11,12,13,14,15,16,17,18,19,20] b = a + 10;

Reimplemented in vtkSMSessionClient.

◆ IsProcessingRemoteNotification()

virtual bool vtkPVSessionBase::IsProcessingRemoteNotification ( )
virtual

This property is used to discard ignore_synchronization proxy property when we load protobuf states.

Therefore, if we load any camera state while that property is true, this won't affect the proxy/property state at all. It will simply remain the same.

◆ UseSessionCoreOf()

virtual void vtkPVSessionBase::UseSessionCoreOf ( vtkPVSessionBase other)
virtual

Update internal session core in order to use the one used in another session.

◆ GetSessionCore() [2/2]

vtkPVSessionCore* vtkPVSessionBase::GetSessionCore ( ) const
protected

Method used to migrate from one Session type to another by keeping the same vtkPVSessionCore.

◆ SetSessionCore()

void vtkPVSessionBase::SetSessionCore ( vtkPVSessionCore )
protected

Method used to migrate from one Session type to another by keeping the same vtkPVSessionCore.

◆ PrepareProgressInternal()

void vtkPVSessionBase::PrepareProgressInternal ( )
overrideprotectedvirtual

Should be called to begin/end receiving progresses on this session.

Overridden to relay to the server(s).

Reimplemented from vtkPVSession.

Reimplemented in vtkSMSessionClient.

◆ CleanupPendingProgressInternal()

void vtkPVSessionBase::CleanupPendingProgressInternal ( )
overrideprotectedvirtual

Should be called to begin/end receiving progresses on this session.

Overridden to relay to the server(s).

Reimplemented from vtkPVSession.

Reimplemented in vtkSMSessionClient.

◆ StartProcessingRemoteNotification()

virtual bool vtkPVSessionBase::StartProcessingRemoteNotification ( )
protectedvirtual

Methods used to monitor if we are currently processing a server notification Only vtkSMSessionClient use the flag to disable ignore_synchronization properties from being updated.

◆ StopProcessingRemoteNotification()

virtual void vtkPVSessionBase::StopProcessingRemoteNotification ( bool  previousValue)
protectedvirtual

Methods used to monitor if we are currently processing a server notification Only vtkSMSessionClient use the flag to disable ignore_synchronization properties from being updated.

◆ RegisterRemoteObject()

void vtkPVSessionBase::RegisterRemoteObject ( vtkTypeUInt32  globalid,
vtkTypeUInt32  location,
vtkObject obj 
)
protected

Register a remote object.

◆ UnRegisterRemoteObject()

void vtkPVSessionBase::UnRegisterRemoteObject ( vtkTypeUInt32  globalid,
vtkTypeUInt32  location 
)
protected

Unregister a remote object.

Friends And Related Function Documentation

◆ vtkSMRemoteObject

friend class vtkSMRemoteObject
friend

Definition at line 237 of file vtkPVSessionBase.h.

◆ vtkSMSessionProxyManager

friend class vtkSMSessionProxyManager
friend

Definition at line 238 of file vtkPVSessionBase.h.

◆ vtkSMLiveInsituLinkProxy

friend class vtkSMLiveInsituLinkProxy
friend

Definition at line 239 of file vtkPVSessionBase.h.

Member Data Documentation

◆ ProcessingRemoteNotification

bool vtkPVSessionBase::ProcessingRemoteNotification
protected

Methods used to monitor if we are currently processing a server notification Only vtkSMSessionClient use the flag to disable ignore_synchronization properties from being updated.

Definition at line 249 of file vtkPVSessionBase.h.

◆ SessionCore

vtkPVSessionCore* vtkPVSessionBase::SessionCore
protected

Definition at line 262 of file vtkPVSessionBase.h.


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