Const version of getReceivedStructStorage(), clarified docs

This commit is contained in:
Pavel Kirienko
2015-02-04 22:53:17 +03:00
parent 222ea1e093
commit c415cf90c3
@@ -207,10 +207,13 @@ protected:
TransferListenerType* getTransferListener() { return forwarder_; }
/**
* Returns the mutable reference to the temporary storage for decoded received messages.
* Returns a reference to the temporary storage for decoded received messages.
* Reference to this storage is used as a parameter for subscription callbacks.
* This storage is guaranteed to stay intact after the last message was decoded, i.e.
* the application can use it to access the last received message object.
*/
ReceivedDataStructure<DataStruct>& getReceivedStructStorage() { return message_; }
ReceivedDataStructure<DataStruct>& getReceivedStructStorage() { return message_; }
const ReceivedDataStructure<DataStruct>& getReceivedStructStorage() const { return message_; }
};
// ----------------------------------------------------------------------------