#include <TypeTag.hpp>
Public Member Functions | |
TypeTag (int tn) | |
Constructor with the typetag number. | |
TypeTag (const DriverSocket &in) throw (SocketIOException, UnexpectedException) | |
Reads/deserializes/constructs a TypeTag from a stream. | |
void | sendToStream (const DriverSocket &out) const throw (SocketIOException, UnexpectedException) |
Serialize "this" tag on the stream. | |
bool | operator== (const int &ref) |
Comparison with an integer: compares typeNumber. | |
operator int () | |
Cast to integer. |
Advantages of using string types is human-readability (debugging, trace analysis, etc.) and earlier detection in case of protocol corruption. Drawback maybe a small performance cost.
CarobNS::TypeTag::TypeTag | ( | int | tn | ) | [inline] |
Constructor with the typetag number.
tn | type number to affect |
CarobNS::TypeTag::TypeTag | ( | const DriverSocket & | in | ) | throw (SocketIOException, UnexpectedException) [inline] |
Reads/deserializes/constructs a TypeTag from a stream.
in | input driver socket |
SocketIOException | stream error |
void CarobNS::TypeTag::sendToStream | ( | const DriverSocket & | out | ) | const throw (SocketIOException, UnexpectedException) [inline] |
Serialize "this" tag on the stream.
out | output stream |
SocketIOException | stream error |