Safir SDK Core
|
Proxy class for an entity request. More...
#include <Safir/Dob/EntityRequestProxy.h>
Public Member Functions | |
const Dob::Typesystem::TypeId | GetTypeId () const |
Get type id. More... | |
const Dob::Typesystem::InstanceId | GetInstanceId () const |
Get instance id. More... | |
const Dob::Typesystem::EntityId | GetEntityId () const |
Get entity id. More... | |
const Dob::EntityPtr | GetRequest () const |
Get entity request. More... | |
const Dob::ConnectionInfoPtr | GetSenderConnectionInfo () const |
Get info about the sender. More... | |
const Dob::Typesystem::HandlerId | GetReceivingHandlerId () const |
Get id of receiving handler. More... | |
const char * | GetBlob () const |
Get binary blob of the received entity request. More... | |
EntityRequestProxy (Internal::EntityRequestProxyImpl *pImpl) | |
Trace and Debug stuff | |
const Dob::Typesystem::HandlerId | GetReceiverWithStringRepresentation () const |
Get receiver handler id that also contains the string representation. More... | |
Proxy class for an entity request.
|
explicit |
const char* Safir::Dob::EntityRequestProxy::GetBlob | ( | ) | const |
Get binary blob of the received entity request.
This method will give you a pointer to the underlying representation of the object. Note that this pointer is only valid while the EntityRequestProxy 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::EntityId Safir::Dob::EntityRequestProxy::GetEntityId | ( | ) | const |
Get entity id.
Aggregation of type id and instance id.
Note that it is illegal to call this method on proxies received in OnCreateRequest callbacks if the handler is registered as "HandlerDecidesInstanceId". This is because there is no instance id in the request in this case...
const Dob::Typesystem::InstanceId Safir::Dob::EntityRequestProxy::GetInstanceId | ( | ) | const |
Get instance id.
Retrieves instance id of the entity request.
Note that it is illegal to call this method on proxies received in OnCreateRequest callbacks if the handler is registered as "HandlerDecidesInstanceId". This is because there is no instance id in the request in this case...
const Dob::Typesystem::HandlerId Safir::Dob::EntityRequestProxy::GetReceiverWithStringRepresentation | ( | ) | const |
Get receiver handler id that also contains the string representation.
Mainly for trace and debug purposes.
const Dob::Typesystem::HandlerId Safir::Dob::EntityRequestProxy::GetReceivingHandlerId | ( | ) | const |
Get id of receiving handler.
Can be handy when one consumer is used for several handlers.
const Dob::EntityPtr Safir::Dob::EntityRequestProxy::GetRequest | ( | ) | const |
Get entity request.
Retrieves a smart pointer to the entity request.
Note that it is not valid to call this for a DeleteRequest.
const Dob::ConnectionInfoPtr Safir::Dob::EntityRequestProxy::GetSenderConnectionInfo | ( | ) | const |
Get info about the sender.
Retrieves a smart pointer to info about the connection sending the request.
const Dob::Typesystem::TypeId Safir::Dob::EntityRequestProxy::GetTypeId | ( | ) | const |
Get type id.
Retrieves type id of the entity request.