Safir SDK Core
|
Proxy class for a message. More...
#include <Safir/Dob/MessageProxy.h>
Public Member Functions | |
const Dob::Typesystem::TypeId | GetTypeId () const |
Get type id. More... | |
const Dob::MessagePtr | GetMessage () const |
Get message. More... | |
const Dob::ConnectionInfoPtr | GetSenderConnectionInfo () const |
Get info about the sender. More... | |
const Dob::Typesystem::ChannelId | GetChannelId () const |
Get channel id. More... | |
const char * | GetBlob () const |
Get binary blob of the received message. More... | |
MessageProxy (Internal::MessageProxyImpl *pImpl) | |
Trace and Debug stuff | |
const Dob::Typesystem::ChannelId | GetChannelIdWithStringRepresentation () const |
Get channel id that also contains the string representation. More... | |
Proxy class for a message.
|
explicit |
const char* Safir::Dob::MessageProxy::GetBlob | ( | ) | const |
Get binary blob of the received message.
This method will give you a pointer to the underlying representation of the object. Note that this pointer is only valid while the MessageProxy is in scope. If you want to keep the blob you must copy it using methods in Safir::Dob::Typesystem.
This method is mainly useful if all you want to do with a received object is to write it to a database or pass it over a C-interface to a library or plugin.
As an example, if you want to copy the bytes into a std::vector<char> you could do it like this "v = std::vector<char>(blob,blob+Safir::Dob::Typesystem::BlobOperations.GetSize())"
const Dob::Typesystem::ChannelId Safir::Dob::MessageProxy::GetChannelId | ( | ) | const |
Get channel id.
Retrieves the channel on which the message is sent.
const Dob::Typesystem::ChannelId Safir::Dob::MessageProxy::GetChannelIdWithStringRepresentation | ( | ) | const |
Get channel id that also contains the string representation.
Mainly for trace and debug purposes.
const Dob::MessagePtr Safir::Dob::MessageProxy::GetMessage | ( | ) | const |
const Dob::ConnectionInfoPtr Safir::Dob::MessageProxy::GetSenderConnectionInfo | ( | ) | const |
Get info about the sender.
Retrieves a smart pointer to info about the connection sending the message.
const Dob::Typesystem::TypeId Safir::Dob::MessageProxy::GetTypeId | ( | ) | const |
Get type id.
Retrieves type id of the message.