Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
vtkPVSessionCore Class Reference

vtkPVSessionCore is used by vtkSMSession. More...

#include <vtkPVSessionCore.h>

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

Public Types

enum  MessageTypes {
  PUSH_STATE = 12, PULL_STATE = 13, EXECUTE_STREAM = 14, GATHER_INFORMATION = 15,
  REGISTER_SI = 16, UNREGISTER_SI = 17
}
 
typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual void PushState (vtkSMMessage *message)
 Push the state message. More...
 
virtual void PullState (vtkSMMessage *message)
 Pull the state message from the local SI object instances. More...
 
virtual void ExecuteStream (vtkTypeUInt32 location, const vtkClientServerStream &stream, bool ignore_errors=false)
 Execute a command on the given processes. More...
 
virtual const vtkClientServerStreamGetLastResult ()
 Returns the response of the ExecuteStream() call from the location. More...
 
virtual void UnRegisterSIObject (vtkSMMessage *message)
 Notify that the given SIObject is not used anymore . More...
 
virtual void RegisterSIObject (vtkSMMessage *message)
 Notify that the given SIObject is used. More...
 
vtkSIObjectGetSIObject (vtkTypeUInt32 globalid)
 Returns a vtkSIObject or subclass given its global id, if any otherwise return nullptr;. More...
 
vtkObjectGetRemoteObject (vtkTypeUInt32 globalid)
 Return a vtkObject given its global id if any otherwise return nullptr;. More...
 
void RegisterRemoteObject (vtkTypeUInt32 globalid, vtkObject *obj)
 Register a remote object. More...
 
void UnRegisterRemoteObject (vtkTypeUInt32 globalid)
 Unregister a remote object. More...
 
virtual bool GatherInformation (vtkTypeUInt32 location, vtkPVInformation *information, vtkTypeUInt32 globalid)
 Gather information about an object referred by the globalid. More...
 
int GetNumberOfProcesses ()
 Returns the number of processes. More...
 
virtual vtkTypeUInt32 GetNextGlobalUniqueIdentifier ()
 Provides the next available identifier. More...
 
virtual vtkTypeUInt32 GetNextChunkGlobalUniqueIdentifier (vtkTypeUInt32 chunkSize)
 Return the first Id of the requested chunk. More...
 
void PushStateSatelliteCallback ()
 
void ExecuteStreamSatelliteCallback ()
 
void GatherInformationStatelliteCallback ()
 
void RegisterSIObjectSatelliteCallback ()
 
void UnRegisterSIObjectSatelliteCallback ()
 
virtual void GetAllRemoteObjects (vtkCollection *collection)
 Allow the user to fill a vtkCollection with all RemoteObjects This is useful when you want to hold a reference to them to prevent any deletion across several method call. More...
 
void GarbageCollectSIObject (int *clientIds, int nbClients)
 Delete SIObject that are held by clients that disappeared from the given list. More...
 
virtual vtkClientServerInterpreterGetInterpreter ()
 Provides access to the interpreter. More...
 
virtual vtkSIProxyDefinitionManagerGetProxyDefinitionManager ()
 Provides access to the proxy definition manager. More...
 
void SetMPIMToNSocketConnection (vtkMPIMToNSocketConnection *)
 Get/Set the socket connection used to communicate between data=server and render-server processes. More...
 
virtual vtkMPIMToNSocketConnectionGetMPIMToNSocketConnection ()
 Get/Set the socket connection used to communicate between data=server and render-server processes. 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 vtkPVSessionCoreNew ()
 
static int IsTypeOf (const char *type)
 
static vtkPVSessionCoreSafeDownCast (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 Types

enum  { ROOT_SATELLITE_RMI_TAG = 887822, ROOT_SATELLITE_INFO_TAG = 887823 }
 

Protected Member Functions

 vtkPVSessionCore ()
 
 ~vtkPVSessionCore () override
 
virtual void PushStateInternal (vtkSMMessage *)
 This will create a vtkSIObject and/or execute some update on the vtkObject that it own. More...
 
virtual void ExecuteStreamInternal (const vtkClientServerStream &stream, bool ignore_errors)
 This will execute localy the given vtkClientServerStream either by calling method on the vtkSIObject or its internal vtkObject. More...
 
bool GatherInformationInternal (vtkPVInformation *information, vtkTypeUInt32 globalid)
 This will gather information on the local vtkObjects through the local vtkSIObjects. More...
 
bool CollectInformation (vtkPVInformation *)
 Gather information across MPI satellites. More...
 
virtual void RegisterSIObjectInternal (vtkSMMessage *message)
 Increment reference count of a local vtkSIObject. More...
 
virtual void UnRegisterSIObjectInternal (vtkSMMessage *message)
 Decrement reference count of a local vtkSIObject. More...
 
void OnInterpreterError (vtkObject *, unsigned long, void *calldata)
 Callback for reporting interpreter errors. 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

vtkSIProxyDefinitionManagerProxyDefinitionManager
 
vtkWeakPointer< vtkMultiProcessControllerParallelController
 
vtkClientServerInterpreterInterpreter
 
vtkMPIMToNSocketConnectionMPIMToNSocketConnection
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

vtkPVSessionCore is used by vtkSMSession.

vtkPVSessionCore handle the communication to MPI satellites and ServerImplementation code instantiation and execution. On the other hand, the vtkSMSession dispatch the request to the right process and therefore to the right vtkPVSessionCore instance.

Definition at line 30 of file vtkPVSessionCore.h.

Member Typedef Documentation

◆ Superclass

Definition at line 34 of file vtkPVSessionCore.h.

Member Enumeration Documentation

◆ MessageTypes

Enumerator
PUSH_STATE 
PULL_STATE 
EXECUTE_STREAM 
GATHER_INFORMATION 
REGISTER_SI 
UNREGISTER_SI 

Definition at line 150 of file vtkPVSessionCore.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
ROOT_SATELLITE_RMI_TAG 
ROOT_SATELLITE_INFO_TAG 

Definition at line 223 of file vtkPVSessionCore.h.

Constructor & Destructor Documentation

◆ vtkPVSessionCore()

vtkPVSessionCore::vtkPVSessionCore ( )
protected

◆ ~vtkPVSessionCore()

vtkPVSessionCore::~vtkPVSessionCore ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkPVSessionCore* vtkPVSessionCore::New ( )
static

◆ GetClassName()

virtual const char* vtkPVSessionCore::GetClassName ( )
virtual

Reimplemented in vtkPVCatalystSessionCore.

◆ IsTypeOf()

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

◆ IsA()

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

Reimplemented from vtkObjectBase.

Reimplemented in vtkPVCatalystSessionCore.

◆ SafeDownCast()

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

◆ PrintSelf()

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

Reimplemented from vtkObject.

◆ GetInterpreter()

virtual vtkClientServerInterpreter* vtkPVSessionCore::GetInterpreter ( )
virtual

Provides access to the interpreter.

◆ GetProxyDefinitionManager()

virtual vtkSIProxyDefinitionManager* vtkPVSessionCore::GetProxyDefinitionManager ( )
virtual

Provides access to the proxy definition manager.

◆ PushState()

virtual void vtkPVSessionCore::PushState ( vtkSMMessage message)
virtual

Push the state message.

This might forward the message to the MPI statellites if needed.

◆ PullState()

virtual void vtkPVSessionCore::PullState ( vtkSMMessage message)
virtual

Pull the state message from the local SI object instances.

◆ ExecuteStream()

virtual void vtkPVSessionCore::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.

◆ GetLastResult()

virtual const vtkClientServerStream& vtkPVSessionCore::GetLastResult ( )
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.

◆ UnRegisterSIObject()

virtual void vtkPVSessionCore::UnRegisterSIObject ( vtkSMMessage message)
virtual

Notify that the given SIObject is not used anymore .

This does not necessary delete the SIObject specially if this one is used by other local SIObject. It only decrease its reference count.

◆ RegisterSIObject()

virtual void vtkPVSessionCore::RegisterSIObject ( vtkSMMessage message)
virtual

Notify that the given SIObject is used.

It only increase its reference count.

◆ GetSIObject()

vtkSIObject* vtkPVSessionCore::GetSIObject ( vtkTypeUInt32  globalid)

Returns a vtkSIObject or subclass given its global id, if any otherwise return nullptr;.

◆ GetRemoteObject()

vtkObject* vtkPVSessionCore::GetRemoteObject ( vtkTypeUInt32  globalid)

Return a vtkObject given its global id if any otherwise return nullptr;.

◆ RegisterRemoteObject()

void vtkPVSessionCore::RegisterRemoteObject ( vtkTypeUInt32  globalid,
vtkObject obj 
)

Register a remote object.

◆ UnRegisterRemoteObject()

void vtkPVSessionCore::UnRegisterRemoteObject ( vtkTypeUInt32  globalid)

Unregister a remote object.

◆ GatherInformation()

virtual bool vtkPVSessionCore::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 vtkPVCatalystSessionCore.

◆ GetNumberOfProcesses()

int vtkPVSessionCore::GetNumberOfProcesses ( )

Returns the number of processes.

This simply calls the GetNumberOfProcesses() on this->ParallelController

◆ SetMPIMToNSocketConnection()

void vtkPVSessionCore::SetMPIMToNSocketConnection ( vtkMPIMToNSocketConnection )

Get/Set the socket connection used to communicate between data=server and render-server processes.

This is valid only on data-server and render-server processes.

◆ GetMPIMToNSocketConnection()

virtual vtkMPIMToNSocketConnection* vtkPVSessionCore::GetMPIMToNSocketConnection ( )
virtual

Get/Set the socket connection used to communicate between data=server and render-server processes.

This is valid only on data-server and render-server processes.

◆ GetNextGlobalUniqueIdentifier()

virtual vtkTypeUInt32 vtkPVSessionCore::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.

◆ GetNextChunkGlobalUniqueIdentifier()

virtual vtkTypeUInt32 vtkPVSessionCore::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;

◆ PushStateSatelliteCallback()

void vtkPVSessionCore::PushStateSatelliteCallback ( )

◆ ExecuteStreamSatelliteCallback()

void vtkPVSessionCore::ExecuteStreamSatelliteCallback ( )

◆ GatherInformationStatelliteCallback()

void vtkPVSessionCore::GatherInformationStatelliteCallback ( )

◆ RegisterSIObjectSatelliteCallback()

void vtkPVSessionCore::RegisterSIObjectSatelliteCallback ( )

◆ UnRegisterSIObjectSatelliteCallback()

void vtkPVSessionCore::UnRegisterSIObjectSatelliteCallback ( )

◆ GetAllRemoteObjects()

virtual void vtkPVSessionCore::GetAllRemoteObjects ( vtkCollection collection)
virtual

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

◆ GarbageCollectSIObject()

void vtkPVSessionCore::GarbageCollectSIObject ( int clientIds,
int  nbClients 
)

Delete SIObject that are held by clients that disappeared from the given list.

◆ PushStateInternal()

virtual void vtkPVSessionCore::PushStateInternal ( vtkSMMessage )
protectedvirtual

This will create a vtkSIObject and/or execute some update on the vtkObject that it own.

◆ ExecuteStreamInternal()

virtual void vtkPVSessionCore::ExecuteStreamInternal ( const vtkClientServerStream stream,
bool  ignore_errors 
)
protectedvirtual

This will execute localy the given vtkClientServerStream either by calling method on the vtkSIObject or its internal vtkObject.

◆ GatherInformationInternal()

bool vtkPVSessionCore::GatherInformationInternal ( vtkPVInformation information,
vtkTypeUInt32  globalid 
)
protected

This will gather information on the local vtkObjects through the local vtkSIObjects.

◆ CollectInformation()

bool vtkPVSessionCore::CollectInformation ( vtkPVInformation )
protected

Gather information across MPI satellites.

◆ RegisterSIObjectInternal()

virtual void vtkPVSessionCore::RegisterSIObjectInternal ( vtkSMMessage message)
protectedvirtual

Increment reference count of a local vtkSIObject.

◆ UnRegisterSIObjectInternal()

virtual void vtkPVSessionCore::UnRegisterSIObjectInternal ( vtkSMMessage message)
protectedvirtual

Decrement reference count of a local vtkSIObject.

This might not result in an actual deletion of the object if this one is used by another SIObject.

◆ OnInterpreterError()

void vtkPVSessionCore::OnInterpreterError ( vtkObject ,
unsigned  long,
void *  calldata 
)
protected

Callback for reporting interpreter errors.

Member Data Documentation

◆ ProxyDefinitionManager

vtkSIProxyDefinitionManager* vtkPVSessionCore::ProxyDefinitionManager
protected

Definition at line 229 of file vtkPVSessionCore.h.

◆ ParallelController

vtkWeakPointer<vtkMultiProcessController> vtkPVSessionCore::ParallelController
protected

Definition at line 230 of file vtkPVSessionCore.h.

◆ Interpreter

vtkClientServerInterpreter* vtkPVSessionCore::Interpreter
protected

Definition at line 231 of file vtkPVSessionCore.h.

◆ MPIMToNSocketConnection

vtkMPIMToNSocketConnection* vtkPVSessionCore::MPIMToNSocketConnection
protected

Definition at line 232 of file vtkPVSessionCore.h.


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