#include <source/toolbox/stream/MessageStream.h>
Inheritance diagram for SAMRAI::tbox::MessageStream:

Public Types | |
| enum | StreamMode { Read, Write } |
Public Member Functions | |
| MessageStream (const int bytes, const StreamMode mode) | |
| MessageStream (const int bytes, const StreamMode mode, const bool use_xdr) | |
| virtual | ~MessageStream () |
| void * | getBufferStart () |
| int | getCurrentSize () const |
| int | getCurrentIndex () const |
| void | setCurrentIndex (const int index) |
| void | resetIndex () |
| virtual void | printClassData (std::ostream &os) const |
Boolean Stream Primitives | |
Pack and unpack booleans into and out of the message stream. | |
| virtual AbstractStream & | operator<< (const bool &data) |
| Pack a single bool into the message stream. | |
| virtual AbstractStream & | operator>> (bool &data) |
| Remove a single bool from the message stream. | |
| virtual void | pack (const bool *data, const int n=1) |
| Pack an array of bools into the message stream. | |
| virtual void | unpack (bool *data, const int n=1) |
| Remove an array of bools from the message stream. | |
Character Stream Primitives | |
Pack and unpack chars into and out of the message stream. | |
| virtual AbstractStream & | operator<< (const char &data) |
| Pack a single char into the message stream. | |
| virtual AbstractStream & | operator>> (char &data) |
| Remove a single char from the message stream. | |
| virtual void | pack (const char *data, const int n=1) |
| Pack an array of chars into the message stream. | |
| virtual void | unpack (char *data, const int n=1) |
| Remove an array of chars from the message stream. | |
Double Complex Stream Primitives | |
Pack and unpack double complex into and out of the message stream. | |
| virtual AbstractStream & | operator<< (const dcomplex &data) |
| Pack a single double complex into the message stream. | |
| virtual AbstractStream & | operator>> (dcomplex &data) |
| Remove a single double complex from the message stream. | |
| virtual void | pack (const dcomplex *data, const int n=1) |
| Pack an array of double complex into the message stream. | |
| virtual void | unpack (dcomplex *data, const int n=1) |
| Remove an array of double complex from the message stream. | |
Double Stream Primitives | |
Pack and unpack doubles into and out of the message stream. | |
| virtual AbstractStream & | operator<< (const double &data) |
| Pack a single double into the message stream. | |
| virtual AbstractStream & | operator>> (double &data) |
| Remove a single double from the message stream. | |
| virtual void | pack (const double *data, const int n=1) |
| Pack an array of doubles into the message stream. | |
| virtual void | unpack (double *data, const int n=1) |
| Remove an array of doubles from the message stream. | |
Float Stream Primitives | |
Pack and unpack floats into and out of the message stream. | |
| virtual AbstractStream & | operator<< (const float &data) |
| Pack a single float into the message stream. | |
| virtual AbstractStream & | operator>> (float &data) |
| Remove a single float from the message stream. | |
| virtual void | pack (const float *data, const int n=1) |
| Pack an array of floats into the message stream. | |
| virtual void | unpack (float *data, const int n=1) |
| Remove an array of floats from the message stream. | |
Integer Stream Primitives | |
Pack and unpack integers into and out of the message stream. | |
| virtual AbstractStream & | operator<< (const int &data) |
| Pack a single integer into the message stream. | |
| virtual AbstractStream & | operator>> (int &data) |
| Remove a single integer from the message stream. | |
| virtual void | pack (const int *data, const int n=1) |
| Pack an array of integers into the message stream. | |
| virtual void | unpack (int *data, const int n=1) |
| Remove an array of integers from the message stream. | |
Static Public Member Functions | |
| static void | useXDR (const bool flag) |
| SAMRAI::tbox::MessageStream::MessageStream | ( | const int | bytes, | |
| const StreamMode | mode | |||
| ) |
Create a message stream of the specified size in bytes and the stream mode (one of MessageStream::Read or MessageStream::Write). The choice of XDR translation is based on the current value of the class-wide useXDR() flag.
| SAMRAI::tbox::MessageStream::MessageStream | ( | const int | bytes, | |
| const StreamMode | mode, | |||
| const bool | use_xdr | |||
| ) |
Create a message stream of the specified size in bytes and the stream mode (either MessageStream::Read or MessageStream::Write). The choice of XDR translation is based on the argument to the constructor, which is independent of the class-wide XDR flag.
| SAMRAI::tbox::MessageStream::~MessageStream | ( | ) | [virtual] |
Virtual destructor for a message stream.
| void SAMRAI::tbox::MessageStream::useXDR | ( | const bool | flag | ) | [inline, static] |
| void * SAMRAI::tbox::MessageStream::getBufferStart | ( | ) | [inline] |
Return a pointer to the start of the message buffer.
| int SAMRAI::tbox::MessageStream::getCurrentSize | ( | ) | const [inline] |
Return the current size of the buffer in bytes.
| int SAMRAI::tbox::MessageStream::getCurrentIndex | ( | ) | const [inline] |
Return the current index into the buffer.
| void SAMRAI::tbox::MessageStream::setCurrentIndex | ( | const int | index | ) | [inline] |
Set the current index into the buffer. Further packing/unpacking will begin at this new location.
| void SAMRAI::tbox::MessageStream::resetIndex | ( | ) | [inline] |
Reset the index to the beginning of the buffer. This is the same as setting the buffer index to zero via setCurrentIndex().
| AbstractStream & SAMRAI::tbox::MessageStream::operator<< | ( | const bool & | data | ) | [virtual] |
| AbstractStream & SAMRAI::tbox::MessageStream::operator>> | ( | bool & | data | ) | [virtual] |
| void SAMRAI::tbox::MessageStream::pack | ( | const bool * | data, | |
| const int | n = 1 | |||
| ) | [virtual] |
| void SAMRAI::tbox::MessageStream::unpack | ( | bool * | data, | |
| const int | n = 1 | |||
| ) | [virtual] |
| AbstractStream & SAMRAI::tbox::MessageStream::operator<< | ( | const char & | data | ) | [virtual] |
| AbstractStream & SAMRAI::tbox::MessageStream::operator>> | ( | char & | data | ) | [virtual] |
| void SAMRAI::tbox::MessageStream::pack | ( | const char * | data, | |
| const int | n = 1 | |||
| ) | [virtual] |
| void SAMRAI::tbox::MessageStream::unpack | ( | char * | data, | |
| const int | n = 1 | |||
| ) | [virtual] |
| AbstractStream & SAMRAI::tbox::MessageStream::operator<< | ( | const dcomplex & | data | ) | [virtual] |
| AbstractStream & SAMRAI::tbox::MessageStream::operator>> | ( | dcomplex & | data | ) | [virtual] |
| void SAMRAI::tbox::MessageStream::pack | ( | const dcomplex * | data, | |
| const int | n = 1 | |||
| ) | [virtual] |
| void SAMRAI::tbox::MessageStream::unpack | ( | dcomplex * | data, | |
| const int | n = 1 | |||
| ) | [virtual] |
| AbstractStream & SAMRAI::tbox::MessageStream::operator<< | ( | const double & | data | ) | [virtual] |
| AbstractStream & SAMRAI::tbox::MessageStream::operator>> | ( | double & | data | ) | [virtual] |
| void SAMRAI::tbox::MessageStream::pack | ( | const double * | data, | |
| const int | n = 1 | |||
| ) | [virtual] |
| void SAMRAI::tbox::MessageStream::unpack | ( | double * | data, | |
| const int | n = 1 | |||
| ) | [virtual] |
| AbstractStream & SAMRAI::tbox::MessageStream::operator<< | ( | const float & | data | ) | [virtual] |
| AbstractStream & SAMRAI::tbox::MessageStream::operator>> | ( | float & | data | ) | [virtual] |
| void SAMRAI::tbox::MessageStream::pack | ( | const float * | data, | |
| const int | n = 1 | |||
| ) | [virtual] |
| void SAMRAI::tbox::MessageStream::unpack | ( | float * | data, | |
| const int | n = 1 | |||
| ) | [virtual] |
| AbstractStream & SAMRAI::tbox::MessageStream::operator<< | ( | const int & | data | ) | [virtual] |
| AbstractStream & SAMRAI::tbox::MessageStream::operator>> | ( | int & | data | ) | [virtual] |
| void SAMRAI::tbox::MessageStream::pack | ( | const int * | data, | |
| const int | n = 1 | |||
| ) | [virtual] |
| void SAMRAI::tbox::MessageStream::unpack | ( | int * | data, | |
| const int | n = 1 | |||
| ) | [virtual] |
| void SAMRAI::tbox::MessageStream::printClassData | ( | std::ostream & | os | ) | const [virtual] |
Print out internal class data for debugging.
1.5.1