ReceivedDataSample.h

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #ifndef OPENDDS_DCPS_RECEIVEDDATASAMPLE_H
00009 #define OPENDDS_DCPS_RECEIVEDDATASAMPLE_H
00010 
00011 #include "dds/DCPS/DataSampleHeader.h"
00012 #include "ace/Synch.h"
00013 
00014 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00015 class ACE_Message_Block;
00016 ACE_END_VERSIONED_NAMESPACE_DECL
00017 
00018 namespace OpenDDS {
00019 namespace DCPS {
00020 
00021 /**
00022  * @class ReceivedDataSample
00023  *
00024  * @brief Holds a data sample received by the transport.
00025  *
00026  * This is the type of object that is delivered to the
00027  * TransportReceiveListener objects by the transport.
00028  * Note that the data sample header has already been
00029  * demarshalled by the transport, and the ACE_Message_Block (chain)
00030  * represents the "data" portion of the sample.
00031  */
00032 class OpenDDS_Dcps_Export ReceivedDataSample {
00033 public:
00034   explicit ReceivedDataSample(ACE_Message_Block* payload);
00035 
00036   ReceivedDataSample(const ReceivedDataSample&);
00037 
00038   ReceivedDataSample& operator=(const ReceivedDataSample&);
00039 
00040   ~ReceivedDataSample();
00041 
00042   /// The demarshalled sample header.
00043   DataSampleHeader header_;
00044 
00045   /// The "data" part (ie, no "header" part) of the sample.
00046   ACE_Message_Block* sample_;
00047 };
00048 
00049 void swap(ReceivedDataSample&, ReceivedDataSample&);
00050 
00051 } // namespace DCPS
00052 } // namespace OpenDDS
00053 
00054 #if defined(__ACE_INLINE__)
00055 #include "ReceivedDataSample.inl"
00056 #endif /* __ACE_INLINE__ */
00057 
00058 #endif  /* OPENDDS_DCPS_RECEIVEDDATASAMPLE_H */

Generated on Fri Feb 12 20:05:25 2016 for OpenDDS by  doxygen 1.4.7