/**
* @brief Parameterized constructor.
*
- * @param payload_size_in_bytes the size of the payload (ie the internal buffer)
+ * @param payload_size_in_bytes the size of the payload (i.e. the internal buffer)
*/
MessagePayload::MessagePayload(
const std::size_t &payload_size_in_bytes
BOOST_ASSERT( PayloadSizeInBytes == other.PayloadSizeInBytes );
}
+/**
+ * @brief Destructor.
+ */
MessagePayload::~MessagePayload()
{
// The Payload is automatically deleted when the smart pointer's scope ends
*/
istream& MessagePayload::read( istream &is )
{
+ BOOST_ASSERT( Payload.get() != NULL );
+
char *payload_data_array = reinterpret_cast<char *>( Payload.get() );
(void) is.read( payload_data_array, PayloadSizeInBytes );
*/
ostream& MessagePayload::write( ostream &os ) const
{
+ BOOST_ASSERT( Payload.get() != NULL );
+
const char *data_array = reinterpret_cast<const char *>( Payload.get() );
(void) os.write( data_array, PayloadSizeInBytes );