Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkCommunicator Class Reference

`#include <vtkCommunicator.h>`

Inheritance diagram for vtkCommunicator:

[legend]
Collaboration diagram for vtkCommunicator:

[legend]
List of all members.

## Detailed Description

Used to send/receive messages in a multiprocess/thread environment.

Date:
  2002/05/17 01:50:34

Revision:
  1.16

This is an abstact class which contains functionality for sending and receiving inter-process messages. It contains methods for marshaling an object into a string (currently used by the MPI communicator but not the shared memory communicator).

Warning:
  Communication between systems with different vtkIdTypes is not supported. All machines have to have the same vtkIdType.

See also:
  vtkSharedMemoryCommunicator vtkMPICommunicator

Created by:
  - Martin, Ken

CVS contributions (if > 5%):
  - Martin, Ken (48%)
  - Geveci, Berk (35%)
  - Lee, Jeff (10%)

CVS logs (CVSweb):
  - .`cxx` (`/Parallel/vtkCommunicator.cxx)`
  - .`h` (`/Parallel/vtkCommunicator.h)`

Tests:
  vtkCommunicator (Tests)

Definition at line 60 of file vtkCommunicator.h.

## [NOHEADER]

virtual int | Receive (int *data, int length, int remoteHandle, int tag)=0
virtual int | Receive (unsigned long *data, int length, int remoteHandle, int tag)=0
virtual int | Receive (unsigned char *data, int length, int remoteHandle, int tag)=0
virtual int | Receive (char *data, int length, int remoteHandle, int tag)=0
virtual int | Receive (float *data, int length, int remoteHandle, int tag)=0
virtual int | Receive (double *data, int length, int remoteHandle, int tag)=0
void | SetUseCopy (int useCopy)
void | DeleteAndSetMarshalString (char *str, int strLength)
int | WriteObject (vtkDataObject *object)
int | ReadObject (vtkDataObject *object)
int | WriteDataSet (vtkDataSet *object)
int | ReadDataSet (vtkDataSet *object)
int | WriteImageData (vtkImageData *object)
int | ReadImageData (vtkImageData *object)
int | WriteDataArray (vtkDataArray *object)
int | ReadDataArray (vtkDataArray *object)
| vtkCommunicator ()
| ~vtkCommunicator ()
char * | MarshalString
int | MarshalStringLength
int | MarshalDataLength
int | UseCopy

## Public Types

typedef vtkObject | Superclass

## Public Methods

virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
virtual int | Send (vtkDataObject *data, int remoteHandle, int tag)
virtual int | Send (vtkDataArray *data, int remoteHandle, int tag)
virtual int | Send (int *data, int length, int remoteHandle, int tag)=0
virtual int | Send (unsigned long *data, int length, int remoteHandle, int tag)=0
virtual int | Send (unsigned char *data, int length, int remoteHandle, int tag)=0
virtual int | Send (char *data, int length, int remoteHandle, int tag)=0
virtual int | Send (float *data, int length, int remoteHandle, int tag)=0
virtual int | Send (double *data, int length, int remoteHandle, int tag)=0
virtual int | Receive (vtkDataObject *data, int remoteHandle, int tag)
virtual int | Receive (vtkDataArray *data, int remoteHandle, int tag)

## Static Public Methods

int | IsTypeOf (const char *type)
vtkCommunicator * | SafeDownCast (vtkObject *o)

## Member Typedef Documentation

typedef vtkObject vtkCommunicator::Superclass

| Reimplemented from vtkObject. Reimplemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator. Definition at line 65 of file vtkCommunicator.h.

## Constructor & Destructor Documentation

vtkCommunicator::vtkCommunicator | ( |  | ) | `[protected]`

| Subclass have to supply these methods to receive various arrays of data.

vtkCommunicator::~vtkCommunicator | ( |  | ) | `[protected]`

| Subclass have to supply these methods to receive various arrays of data.

## Member Function Documentation

virtual const char* vtkCommunicator::GetClassName | ( |  | ) | `[virtual]`

| Reimplemented from vtkObject. Reimplemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

int vtkCommunicator::IsTypeOf | ( | const char * | type | ) | `[static]`

| Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

virtual int vtkCommunicator::IsA | ( | const char * | type | ) | `[virtual]`

| Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

vtkCommunicator* vtkCommunicator::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Reimplemented from vtkObject. Reimplemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

void vtkCommunicator::PrintSelf | ( | ostream & | os,
|  | vtkIndent | indent
| ) | `[virtual]`

| Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkObject. Reimplemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

virtual int vtkCommunicator::Send | ( | vtkDataObject * | data,
|  | int | remoteHandle,
|  | int | tag
| ) | `[virtual]`

| This method sends a data object to a destination. Tag eliminates ambiguity and is used to match sends to receives. Reimplemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator. Referenced by vtkSocketCommunicator::Send(), vtkMultiProcessController::Send(), and vtkMPICommunicator::Send().

virtual int vtkCommunicator::Send | ( | vtkDataArray * | data,
|  | int | remoteHandle,
|  | int | tag
| ) | `[virtual]`

| This method sends a data array to a destination. Tag eliminates ambiguity and is used to match sends to receives. Reimplemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

virtual int vtkCommunicator::Send | ( | int * | data,
|  | int | length,
|  | int | remoteHandle,
|  | int | tag
| ) | `[pure virtual]`

| Subclass have to supply these methods to send various arrays of data. Implemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

virtual int vtkCommunicator::Send | ( | unsigned long * | data,
|  | int | length,
|  | int | remoteHandle,
|  | int | tag
| ) | `[pure virtual]`

| Subclass have to supply these methods to send various arrays of data. Implemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

virtual int vtkCommunicator::Send | ( | unsigned char * | data,
|  | int | length,
|  | int | remoteHandle,
|  | int | tag
| ) | `[pure virtual]`

| Subclass have to supply these methods to send various arrays of data. Implemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

virtual int vtkCommunicator::Send | ( | char * | data,
|  | int | length,
|  | int | remoteHandle,
|  | int | tag
| ) | `[pure virtual]`

| Subclass have to supply these methods to send various arrays of data. Implemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

virtual int vtkCommunicator::Send | ( | float * | data,
|  | int | length,
|  | int | remoteHandle,
|  | int | tag
| ) | `[pure virtual]`

| Subclass have to supply these methods to send various arrays of data. Implemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

virtual int vtkCommunicator::Send | ( | double * | data,
|  | int | length,
|  | int | remoteHandle,
|  | int | tag
| ) | `[pure virtual]`

| Subclass have to supply these methods to send various arrays of data. Implemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

virtual int vtkCommunicator::Receive | ( | vtkDataObject * | data,
|  | int | remoteHandle,
|  | int | tag
| ) | `[virtual]`

| This method receives a data object from a corresponding send. It blocks until the receive is finished. Reimplemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator. Referenced by vtkSocketCommunicator::Receive(), vtkMultiProcessController::Receive(), and vtkMPICommunicator::Receive().

virtual int vtkCommunicator::Receive | ( | vtkDataArray * | data,
|  | int | remoteHandle,
|  | int | tag
| ) | `[virtual]`

| This method receives a data array from a corresponding send. It blocks until the receive is finished. Reimplemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

virtual int vtkCommunicator::Receive | ( | int * | data,
|  | int | length,
|  | int | remoteHandle,
|  | int | tag
| ) | `[pure virtual]`

| Subclass have to supply these methods to receive various arrays of data. Implemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

virtual int vtkCommunicator::Receive | ( | unsigned long * | data,
|  | int | length,
|  | int | remoteHandle,
|  | int | tag
| ) | `[pure virtual]`

| Subclass have to supply these methods to receive various arrays of data. Implemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

virtual int vtkCommunicator::Receive | ( | unsigned char * | data,
|  | int | length,
|  | int | remoteHandle,
|  | int | tag
| ) | `[pure virtual]`

| Subclass have to supply these methods to receive various arrays of data. Implemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

virtual int vtkCommunicator::Receive | ( | char * | data,
|  | int | length,
|  | int | remoteHandle,
|  | int | tag
| ) | `[pure virtual]`

| Subclass have to supply these methods to receive various arrays of data. Implemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

virtual int vtkCommunicator::Receive | ( | float * | data,
|  | int | length,
|  | int | remoteHandle,
|  | int | tag
| ) | `[pure virtual]`

| Subclass have to supply these methods to receive various arrays of data. Implemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

virtual int vtkCommunicator::Receive | ( | double * | data,
|  | int | length,
|  | int | remoteHandle,
|  | int | tag
| ) | `[pure virtual]`

| Subclass have to supply these methods to receive various arrays of data. Implemented in vtkMPICommunicator, vtkSharedMemoryCommunicator, and vtkSocketCommunicator.

void vtkCommunicator::SetUseCopy | ( | int | useCopy | ) | `[static]`

| Subclass have to supply these methods to receive various arrays of data.

void vtkCommunicator::DeleteAndSetMarshalString | ( | char * | str,
|  | int | strLength
| ) | `[protected]`

| Subclass have to supply these methods to receive various arrays of data.

int vtkCommunicator::WriteObject | ( | vtkDataObject * | object | ) | `[protected]`

| Subclass have to supply these methods to receive various arrays of data.

int vtkCommunicator::ReadObject | ( | vtkDataObject * | object | ) | `[protected]`

| Subclass have to supply these methods to receive various arrays of data.

int vtkCommunicator::WriteDataSet | ( | vtkDataSet * | object | ) | `[protected]`

| Subclass have to supply these methods to receive various arrays of data.

int vtkCommunicator::ReadDataSet | ( | vtkDataSet * | object | ) | `[protected]`

| Subclass have to supply these methods to receive various arrays of data.

int vtkCommunicator::WriteImageData | ( | vtkImageData * | object | ) | `[protected]`

| Subclass have to supply these methods to receive various arrays of data.

int vtkCommunicator::ReadImageData | ( | vtkImageData * | object | ) | `[protected]`

| Subclass have to supply these methods to receive various arrays of data.

int vtkCommunicator::WriteDataArray | ( | vtkDataArray * | object | ) | `[protected]`

| Subclass have to supply these methods to receive various arrays of data.

int vtkCommunicator::ReadDataArray | ( | vtkDataArray * | object | ) | `[protected]`

| Subclass have to supply these methods to receive various arrays of data.

## Member Data Documentation

char* vtkCommunicator::MarshalString`[protected]`

| Subclass have to supply these methods to receive various arrays of data. Definition at line 148 of file vtkCommunicator.h.

int vtkCommunicator::MarshalStringLength`[protected]`

| Subclass have to supply these methods to receive various arrays of data. Definition at line 149 of file vtkCommunicator.h.

int vtkCommunicator::MarshalDataLength`[protected]`

| Subclass have to supply these methods to receive various arrays of data. Definition at line 151 of file vtkCommunicator.h.

int vtkCommunicator::UseCopy`[static, protected]`

| Subclass have to supply these methods to receive various arrays of data. Definition at line 153 of file vtkCommunicator.h.

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

- Parallel/vtkCommunicator.h