class Struct |
Base class for all classes to be transmitted by PVM++.
::Pvm::ReceiveAction | AutomaticUnPack () installs the "unpack on receive" action, ie. |
::Pvm::ReceiveAction | InstallHandler (HandlerFunc Func) installs the handler Func as a message handler for all messages of the current message type. |
::Pvm::ReceiveAction | NormalReceive () switches back to normal mode of operation, ie. |
void | Receive (Task &From = IgnoreTask) receives a message of the given type and returns the id of the sender in From. |
::Pvm::ReceiveAction | ReceiveAction (const ::Pvm::ReceiveAction &What) sets the new action on receive for the current message type to What. |
void | ReceiveFrom (const TaskSet &FromSet, Task &From = IgnoreTask) receives a message of the given type, but only from one of the tasks given by FromSet, and returns the id of the sender in From. |
void | ReceiveFrom (Task From) receives a message of the given type, but only from the task From. |
void | Send (Task To) const sends the message to task To. |
void | Send (const TaskSet &To) const sends the message to all tasks in the set To. |
::Pvm::ReceiveAction | SwallowOnReceive () installs the "swallow on receive" action, ie. |
bool | TimedReceive (unsigned long int &Time, Task &From = IgnoreTask) receives a message of the given type and returns the id of the sender in From. |
bool | TimedReceiveFrom (const TaskSet &FromSet, unsigned long int &Time, Task &From = IgnoreTask) receives a message of the given type, but only from one of the tasks given by FromSet, and returns the id of the sender in From. |
bool | TimedReceiveFrom (Task From, unsigned long int &Time) receives a message of the given type, but only from the task From. |
Base class for all classes to be transmitted by PVM++.Every struct (or class, for that matter) that should be sent between tasks must be publically derived from Struct. And it has to register all its members, that should be transmitted, to PVM++. Finally it has to provide a tag, which is used internally in PVM++ to determine the type of a message upon arrival, just like in PVM. It is very important not to use one number for different classes and to use the same number for the same type in the different communicating programs! For example a definition could look like this:
struct Test : public Pvm::Struct { PvmSetStructId (42); // Setting the Tag for this struct. // Don't use twice!! PvmRegistration () { Pvm::Register (Data); Pvm::Register (Character); Pvm::Register (DoubleArray, 187); Pvm::Register (Host); Pvm::Register (IntSet); } int Data; char Character; double DoubleArray[187]; Pvm::Host Host; std::set< int > IntSet; };As you can see, STL types can be used and will be transmitted correctly, if they are registered and if the template arguments (i.e. int in set< int >) can be registered. The following list shows all types, that can be registered (and therefore transmitted):
- bool.
- char.
- unsigned char.
- short int.
- int.
- float.
- double.
- long int.
- unsigned short.
- unsigned int.
- unsigned long int.
- Pvm::Host.
- Pvm::HostSet.
- Pvm::Task.
- Pvm::TaskSet.
- std::string.
- std::complex< Type >, if Type can be registered.
- std::pair< First, Second >, if First and Second can be registered.
- std::vector< Key >, if Key can be registered.
- std::list< Key >, if Key can be registered.
- std::deque< Key >, if Key can be registered.
- std::set< Key >, if Key can be registered.
- std::multiset< Key >, if Key can be registered.
- std::map< Key >, if Key can be registered.
- std::multimap< Key >, if Key can be registered.
- Classes derived from Pvm::Struct.
- Classes derived from Pvm::Custom.
Arrays for all of the above types (except Struct and Custom, where it isn't possible due to inheritance) are supported as well. The corresponding syntax is Register (type PointerToArray, int Size).
Alphabetic index Hierarchy of classes