VTK  9.5.20251102
Public Member Functions | Friends | List of all members
vtkMultiProcessStream Class Reference

stream used to pass data across processes using vtkMultiProcessController. More...

#include <vtkMultiProcessStream.h>

Public Member Functions

 vtkMultiProcessStream ()
 
 vtkMultiProcessStream (const vtkMultiProcessStream &)
 
 ~vtkMultiProcessStream ()
 
vtkMultiProcessStreamoperator= (const vtkMultiProcessStream &)
 
void Reset ()
 Clears everything in the stream.
 
int Size ()
 Returns the size of the stream.
 
int RawSize ()
 Returns the size of the raw data returned by GetRawData.
 
bool Empty ()
 Returns true iff the stream is empty.
 
vtkMultiProcessStreamoperator<< (bool value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (char value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (signed char value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (unsigned char value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (short value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (unsigned short value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (int value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (unsigned int value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (long value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (unsigned long value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (long long value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (unsigned long long value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (float value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (double value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (const std::string &value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (const char *value)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator<< (const vtkMultiProcessStream &)
 Add-to-stream operators.
 
vtkMultiProcessStreamoperator>> (bool &value)
 Remove-from-stream operators.
 
vtkMultiProcessStreamoperator>> (char &value)
 Remove-from-stream operators.
 
vtkMultiProcessStreamoperator>> (signed char &value)
 Remove-from-stream operators.
 
vtkMultiProcessStreamoperator>> (unsigned char &value)
 Remove-from-stream operators.
 
vtkMultiProcessStreamoperator>> (short &value)
 Remove-from-stream operators.
 
vtkMultiProcessStreamoperator>> (unsigned short &value)
 Remove-from-stream operators.
 
vtkMultiProcessStreamoperator>> (int &value)
 Remove-from-stream operators.
 
vtkMultiProcessStreamoperator>> (unsigned int &value)
 Remove-from-stream operators.
 
vtkMultiProcessStreamoperator>> (long &value)
 Remove-from-stream operators.
 
vtkMultiProcessStreamoperator>> (unsigned long &value)
 Remove-from-stream operators.
 
vtkMultiProcessStreamoperator>> (long long &value)
 Remove-from-stream operators.
 
vtkMultiProcessStreamoperator>> (unsigned long long &value)
 Remove-from-stream operators.
 
vtkMultiProcessStreamoperator>> (float &value)
 Remove-from-stream operators.
 
vtkMultiProcessStreamoperator>> (double &value)
 Remove-from-stream operators.
 
vtkMultiProcessStreamoperator>> (std::string &value)
 Remove-from-stream operators.
 
vtkMultiProcessStreamoperator>> (vtkMultiProcessStream &)
 Remove-from-stream operators.
 
void Push (char array[], unsigned int size)
 Add-array-to-stream methods.
 
void Push (signed char array[], unsigned int size)
 Add-array-to-stream methods.
 
void Push (unsigned char array[], unsigned int size)
 Add-array-to-stream methods.
 
void Push (short array[], unsigned int size)
 Add-array-to-stream methods.
 
void Push (unsigned short array[], unsigned int size)
 Add-array-to-stream methods.
 
void Push (int array[], unsigned int size)
 Add-array-to-stream methods.
 
void Push (unsigned int array[], unsigned int size)
 Add-array-to-stream methods.
 
void Push (long array[], unsigned int size)
 Add-array-to-stream methods.
 
void Push (unsigned long array[], unsigned int size)
 Add-array-to-stream methods.
 
void Push (long long array[], unsigned int size)
 Add-array-to-stream methods.
 
void Push (unsigned long long array[], unsigned int size)
 Add-array-to-stream methods.
 
void Push (float array[], unsigned int size)
 Add-array-to-stream methods.
 
void Push (double array[], unsigned int size)
 Add-array-to-stream methods.
 
void Push (vtkDataArray *array)
 Add-array-to-stream methods.
 
void Push (vtkStringArray *array)
 Add-array-to-stream methods.
 
void Pop (char *&array, unsigned int &size)
 Remove-array-to-stream methods.
 
void Pop (signed char *&array, unsigned int &size)
 Remove-array-to-stream methods.
 
void Pop (unsigned char *&array, unsigned int &size)
 Remove-array-to-stream methods.
 
void Pop (short *&array, unsigned int &size)
 Remove-array-to-stream methods.
 
void Pop (unsigned short *&array, unsigned int &size)
 Remove-array-to-stream methods.
 
void Pop (int *&array, unsigned int &size)
 Remove-array-to-stream methods.
 
void Pop (unsigned int *&array, unsigned int &size)
 Remove-array-to-stream methods.
 
void Pop (long *&array, unsigned int &size)
 Remove-array-to-stream methods.
 
void Pop (unsigned long *&array, unsigned int &size)
 Remove-array-to-stream methods.
 
void Pop (long long *&array, unsigned int &size)
 Remove-array-to-stream methods.
 
void Pop (unsigned long long *&array, unsigned int &size)
 Remove-array-to-stream methods.
 
void Pop (float *&array, unsigned int &size)
 Remove-array-to-stream methods.
 
void Pop (double *&array, unsigned int &size)
 Remove-array-to-stream methods.
 
void Pop (vtkDataArray *&array)
 Remove-array-to-stream methods.
 
void Pop (vtkStringArray *&array)
 Remove-array-to-stream methods.
 
void GetRawData (std::vector< unsigned char > &data) const
 Serialization methods used to save/restore the stream to/from raw data.
 
void GetRawData (unsigned char *&data, unsigned int &size)
 Serialization methods used to save/restore the stream to/from raw data.
 
void SetRawData (const std::vector< unsigned char > &data)
 Serialization methods used to save/restore the stream to/from raw data.
 
void SetRawData (const unsigned char *, unsigned int size)
 Serialization methods used to save/restore the stream to/from raw data.
 
std::vector< unsigned char > GetRawData () const
 Serialization methods used to save/restore the stream to/from raw data.
 

Friends

struct vtkMultiProcessStreamPushArray
 
struct vtkMultiProcessStreamPopArray
 

Detailed Description

stream used to pass data across processes using vtkMultiProcessController.

vtkMultiProcessStream is used to pass data across processes. Using vtkMultiProcessStream it is possible to send data whose length is not known at the receiving end.

Warning
Note, stream operators cannot be combined with the Push/Pop array operators. For example, if you push an array to the stream,
Tests:
vtkMultiProcessStream (Tests)

Definition at line 33 of file vtkMultiProcessStream.h.

Constructor & Destructor Documentation

◆ vtkMultiProcessStream() [1/2]

vtkMultiProcessStream::vtkMultiProcessStream ( )

◆ vtkMultiProcessStream() [2/2]

vtkMultiProcessStream::vtkMultiProcessStream ( const vtkMultiProcessStream )

◆ ~vtkMultiProcessStream()

vtkMultiProcessStream::~vtkMultiProcessStream ( )

Member Function Documentation

◆ operator=()

vtkMultiProcessStream & vtkMultiProcessStream::operator= ( const vtkMultiProcessStream )

◆ operator<<() [1/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( bool  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [2/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( char  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [3/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( signed char  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [4/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( unsigned char  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [5/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( short  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [6/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( unsigned short  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [7/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( int  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [8/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( unsigned int  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [9/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( long  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [10/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( unsigned long  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [11/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( long long  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [12/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( unsigned long long  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [13/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( float  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [14/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( double  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [15/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( const std::string &  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [16/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( const char *  value)

Add-to-stream operators.

Adds to the end of the stream.

◆ operator<<() [17/17]

vtkMultiProcessStream & vtkMultiProcessStream::operator<< ( const vtkMultiProcessStream )

Add-to-stream operators.

Adds to the end of the stream.

◆ operator>>() [1/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( bool &  value)

Remove-from-stream operators.

Removes from the head of the stream.

◆ operator>>() [2/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( char &  value)

Remove-from-stream operators.

Removes from the head of the stream.

◆ operator>>() [3/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( signed char &  value)

Remove-from-stream operators.

Removes from the head of the stream.

◆ operator>>() [4/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( unsigned char &  value)

Remove-from-stream operators.

Removes from the head of the stream.

◆ operator>>() [5/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( short &  value)

Remove-from-stream operators.

Removes from the head of the stream.

◆ operator>>() [6/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( unsigned short &  value)

Remove-from-stream operators.

Removes from the head of the stream.

◆ operator>>() [7/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( int &  value)

Remove-from-stream operators.

Removes from the head of the stream.

◆ operator>>() [8/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( unsigned int &  value)

Remove-from-stream operators.

Removes from the head of the stream.

◆ operator>>() [9/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( long &  value)

Remove-from-stream operators.

Removes from the head of the stream.

◆ operator>>() [10/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( unsigned long &  value)

Remove-from-stream operators.

Removes from the head of the stream.

◆ operator>>() [11/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( long long &  value)

Remove-from-stream operators.

Removes from the head of the stream.

◆ operator>>() [12/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( unsigned long long &  value)

Remove-from-stream operators.

Removes from the head of the stream.

◆ operator>>() [13/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( float &  value)

Remove-from-stream operators.

Removes from the head of the stream.

◆ operator>>() [14/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( double &  value)

Remove-from-stream operators.

Removes from the head of the stream.

◆ operator>>() [15/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( std::string &  value)

Remove-from-stream operators.

Removes from the head of the stream.

◆ operator>>() [16/16]

vtkMultiProcessStream & vtkMultiProcessStream::operator>> ( vtkMultiProcessStream )

Remove-from-stream operators.

Removes from the head of the stream.

◆ Push() [1/15]

void vtkMultiProcessStream::Push ( char  array[],
unsigned int  size 
)

Add-array-to-stream methods.

Adds to the end of the stream

◆ Push() [2/15]

void vtkMultiProcessStream::Push ( signed char  array[],
unsigned int  size 
)

Add-array-to-stream methods.

Adds to the end of the stream

◆ Push() [3/15]

void vtkMultiProcessStream::Push ( unsigned char  array[],
unsigned int  size 
)

Add-array-to-stream methods.

Adds to the end of the stream

◆ Push() [4/15]

void vtkMultiProcessStream::Push ( short  array[],
unsigned int  size 
)

Add-array-to-stream methods.

Adds to the end of the stream

◆ Push() [5/15]

void vtkMultiProcessStream::Push ( unsigned short  array[],
unsigned int  size 
)

Add-array-to-stream methods.

Adds to the end of the stream

◆ Push() [6/15]

void vtkMultiProcessStream::Push ( int  array[],
unsigned int  size 
)

Add-array-to-stream methods.

Adds to the end of the stream

◆ Push() [7/15]

void vtkMultiProcessStream::Push ( unsigned int  array[],
unsigned int  size 
)

Add-array-to-stream methods.

Adds to the end of the stream

◆ Push() [8/15]

void vtkMultiProcessStream::Push ( long  array[],
unsigned int  size 
)

Add-array-to-stream methods.

Adds to the end of the stream

◆ Push() [9/15]

void vtkMultiProcessStream::Push ( unsigned long  array[],
unsigned int  size 
)

Add-array-to-stream methods.

Adds to the end of the stream

◆ Push() [10/15]

void vtkMultiProcessStream::Push ( long long  array[],
unsigned int  size 
)

Add-array-to-stream methods.

Adds to the end of the stream

◆ Push() [11/15]

void vtkMultiProcessStream::Push ( unsigned long long  array[],
unsigned int  size 
)

Add-array-to-stream methods.

Adds to the end of the stream

◆ Push() [12/15]

void vtkMultiProcessStream::Push ( float  array[],
unsigned int  size 
)

Add-array-to-stream methods.

Adds to the end of the stream

◆ Push() [13/15]

void vtkMultiProcessStream::Push ( double  array[],
unsigned int  size 
)

Add-array-to-stream methods.

Adds to the end of the stream

◆ Push() [14/15]

void vtkMultiProcessStream::Push ( vtkDataArray array)

Add-array-to-stream methods.

Adds to the end of the stream

◆ Push() [15/15]

void vtkMultiProcessStream::Push ( vtkStringArray array)

Add-array-to-stream methods.

Adds to the end of the stream

◆ Pop() [1/15]

void vtkMultiProcessStream::Pop ( char *&  array,
unsigned int &  size 
)

Remove-array-to-stream methods.

Removes from the head of the stream. Note: If the input array is nullptr, the array will be allocated internally and the calling application is responsible for properly de-allocating it. If the input array is not nullptr, it is expected to match the size of the data internally, and this method would just fill in the data.

◆ Pop() [2/15]

void vtkMultiProcessStream::Pop ( signed char *&  array,
unsigned int &  size 
)

Remove-array-to-stream methods.

Removes from the head of the stream. Note: If the input array is nullptr, the array will be allocated internally and the calling application is responsible for properly de-allocating it. If the input array is not nullptr, it is expected to match the size of the data internally, and this method would just fill in the data.

◆ Pop() [3/15]

void vtkMultiProcessStream::Pop ( unsigned char *&  array,
unsigned int &  size 
)

Remove-array-to-stream methods.

Removes from the head of the stream. Note: If the input array is nullptr, the array will be allocated internally and the calling application is responsible for properly de-allocating it. If the input array is not nullptr, it is expected to match the size of the data internally, and this method would just fill in the data.

◆ Pop() [4/15]

void vtkMultiProcessStream::Pop ( short *&  array,
unsigned int &  size 
)

Remove-array-to-stream methods.

Removes from the head of the stream. Note: If the input array is nullptr, the array will be allocated internally and the calling application is responsible for properly de-allocating it. If the input array is not nullptr, it is expected to match the size of the data internally, and this method would just fill in the data.

◆ Pop() [5/15]

void vtkMultiProcessStream::Pop ( unsigned short *&  array,
unsigned int &  size 
)

Remove-array-to-stream methods.

Removes from the head of the stream. Note: If the input array is nullptr, the array will be allocated internally and the calling application is responsible for properly de-allocating it. If the input array is not nullptr, it is expected to match the size of the data internally, and this method would just fill in the data.

◆ Pop() [6/15]

void vtkMultiProcessStream::Pop ( int *&  array,
unsigned int &  size 
)

Remove-array-to-stream methods.

Removes from the head of the stream. Note: If the input array is nullptr, the array will be allocated internally and the calling application is responsible for properly de-allocating it. If the input array is not nullptr, it is expected to match the size of the data internally, and this method would just fill in the data.

◆ Pop() [7/15]

void vtkMultiProcessStream::Pop ( unsigned int *&  array,
unsigned int &  size 
)

Remove-array-to-stream methods.

Removes from the head of the stream. Note: If the input array is nullptr, the array will be allocated internally and the calling application is responsible for properly de-allocating it. If the input array is not nullptr, it is expected to match the size of the data internally, and this method would just fill in the data.

◆ Pop() [8/15]

void vtkMultiProcessStream::Pop ( long *&  array,
unsigned int &  size 
)

Remove-array-to-stream methods.

Removes from the head of the stream. Note: If the input array is nullptr, the array will be allocated internally and the calling application is responsible for properly de-allocating it. If the input array is not nullptr, it is expected to match the size of the data internally, and this method would just fill in the data.

◆ Pop() [9/15]

void vtkMultiProcessStream::Pop ( unsigned long *&  array,
unsigned int &  size 
)

Remove-array-to-stream methods.

Removes from the head of the stream. Note: If the input array is nullptr, the array will be allocated internally and the calling application is responsible for properly de-allocating it. If the input array is not nullptr, it is expected to match the size of the data internally, and this method would just fill in the data.

◆ Pop() [10/15]

void vtkMultiProcessStream::Pop ( long long *&  array,
unsigned int &  size 
)

Remove-array-to-stream methods.

Removes from the head of the stream. Note: If the input array is nullptr, the array will be allocated internally and the calling application is responsible for properly de-allocating it. If the input array is not nullptr, it is expected to match the size of the data internally, and this method would just fill in the data.

◆ Pop() [11/15]

void vtkMultiProcessStream::Pop ( unsigned long long *&  array,
unsigned int &  size 
)

Remove-array-to-stream methods.

Removes from the head of the stream. Note: If the input array is nullptr, the array will be allocated internally and the calling application is responsible for properly de-allocating it. If the input array is not nullptr, it is expected to match the size of the data internally, and this method would just fill in the data.

◆ Pop() [12/15]

void vtkMultiProcessStream::Pop ( float *&  array,
unsigned int &  size 
)

Remove-array-to-stream methods.

Removes from the head of the stream. Note: If the input array is nullptr, the array will be allocated internally and the calling application is responsible for properly de-allocating it. If the input array is not nullptr, it is expected to match the size of the data internally, and this method would just fill in the data.

◆ Pop() [13/15]

void vtkMultiProcessStream::Pop ( double *&  array,
unsigned int &  size 
)

Remove-array-to-stream methods.

Removes from the head of the stream. Note: If the input array is nullptr, the array will be allocated internally and the calling application is responsible for properly de-allocating it. If the input array is not nullptr, it is expected to match the size of the data internally, and this method would just fill in the data.

◆ Pop() [14/15]

void vtkMultiProcessStream::Pop ( vtkDataArray *&  array)

Remove-array-to-stream methods.

Removes from the head of the stream. Note: If the input array is nullptr, the array will be allocated internally and the calling application is responsible for properly de-allocating it. If the input array is not nullptr, it is expected to match the size of the data internally, and this method would just fill in the data.

◆ Pop() [15/15]

void vtkMultiProcessStream::Pop ( vtkStringArray *&  array)

Remove-array-to-stream methods.

Removes from the head of the stream. Note: If the input array is nullptr, the array will be allocated internally and the calling application is responsible for properly de-allocating it. If the input array is not nullptr, it is expected to match the size of the data internally, and this method would just fill in the data.

◆ Reset()

void vtkMultiProcessStream::Reset ( )

Clears everything in the stream.

◆ Size()

int vtkMultiProcessStream::Size ( )

Returns the size of the stream.

◆ RawSize()

int vtkMultiProcessStream::RawSize ( )
inline

Returns the size of the raw data returned by GetRawData.

This includes 1 byte to store the endian type.

Definition at line 148 of file vtkMultiProcessStream.h.

◆ Empty()

bool vtkMultiProcessStream::Empty ( )

Returns true iff the stream is empty.

◆ GetRawData() [1/3]

void vtkMultiProcessStream::GetRawData ( std::vector< unsigned char > &  data) const

Serialization methods used to save/restore the stream to/from raw data.

Note: The 1st byte of the raw data buffer consists of the endian type.

◆ GetRawData() [2/3]

void vtkMultiProcessStream::GetRawData ( unsigned char *&  data,
unsigned int &  size 
)

Serialization methods used to save/restore the stream to/from raw data.

Note: The 1st byte of the raw data buffer consists of the endian type.

◆ SetRawData() [1/2]

void vtkMultiProcessStream::SetRawData ( const std::vector< unsigned char > &  data)

Serialization methods used to save/restore the stream to/from raw data.

Note: The 1st byte of the raw data buffer consists of the endian type.

◆ SetRawData() [2/2]

void vtkMultiProcessStream::SetRawData ( const unsigned char *  ,
unsigned int  size 
)

Serialization methods used to save/restore the stream to/from raw data.

Note: The 1st byte of the raw data buffer consists of the endian type.

◆ GetRawData() [3/3]

std::vector< unsigned char > vtkMultiProcessStream::GetRawData ( ) const

Serialization methods used to save/restore the stream to/from raw data.

Note: The 1st byte of the raw data buffer consists of the endian type.

Friends And Related Symbol Documentation

◆ vtkMultiProcessStreamPushArray

friend struct vtkMultiProcessStreamPushArray
friend

Definition at line 176 of file vtkMultiProcessStream.h.

◆ vtkMultiProcessStreamPopArray

friend struct vtkMultiProcessStreamPopArray
friend

Definition at line 177 of file vtkMultiProcessStream.h.


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