TransportSendElement.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_TRANSPORTSENDELEMENT_H
00009 #define OPENDDS_DCPS_TRANSPORTSENDELEMENT_H
00010 
00011 #include "dds/DCPS/dcps_export.h"
00012 #include "TransportQueueElement.h"
00013 #include "dds/DCPS/DataSampleElement.h"
00014 
00015 namespace OpenDDS {
00016 namespace DCPS {
00017 
00018 class OpenDDS_Dcps_Export TransportSendElement : public TransportQueueElement {
00019 public:
00020 
00021   static TransportSendElement* alloc(int initial_count,
00022                                      const DataSampleElement* sample);
00023 
00024   TransportSendElement(int initial_count,
00025                        const DataSampleElement* sample,
00026                        TransportSendElementAllocator* allocator = 0);
00027 
00028   virtual ~TransportSendElement();
00029 
00030   /// Accessor for the publisher id.
00031   virtual RepoId publication_id() const;
00032 
00033   virtual RepoId subscription_id() const;
00034 
00035   /// Accessor for the ACE_Message_Block
00036   virtual const ACE_Message_Block* msg() const;
00037 
00038   virtual const ACE_Message_Block* msg_payload() const;
00039 
00040   virtual SequenceNumber sequence() const;
00041 
00042   /// Original sample from send listener.
00043   const DataSampleElement* sample() const;
00044 
00045   virtual bool owned_by_transport();
00046 
00047 protected:
00048 
00049   virtual void release_element(bool dropped_by_transport);
00050 
00051 private:
00052 
00053   /// This is the actual element that the transport framework was
00054   /// asked to send.
00055   const DataSampleElement* element_;
00056 
00057   /// Reference to TransportSendElement allocator.
00058   TransportSendElementAllocator* allocator_;
00059 };
00060 
00061 } // namespace DCPS
00062 } // namespace OpenDDS
00063 
00064 #if defined (__ACE_INLINE__)
00065 #include "TransportSendElement.inl"
00066 #endif /* __ACE_INLINE__ */
00067 
00068 #endif  /* OPENDDS_DCPS_TRANSPORTSENDELEMENT_H */

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