00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef OPENDDS_DCPS_BUILDCHAINVISTOR_H 00009 #define OPENDDS_DCPS_BUILDCHAINVISTOR_H 00010 00011 #include "dds/DCPS/dcps_export.h" 00012 #include "BasicQueueVisitor_T.h" 00013 00014 ACE_BEGIN_VERSIONED_NAMESPACE_DECL 00015 class ACE_Message_Block; 00016 ACE_END_VERSIONED_NAMESPACE_DECL 00017 00018 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00019 00020 namespace OpenDDS { 00021 namespace DCPS { 00022 00023 class TransportQueueElement; 00024 00025 class OpenDDS_Dcps_Export BuildChainVisitor : public BasicQueueVisitor<TransportQueueElement> { 00026 public: 00027 00028 BuildChainVisitor(); 00029 virtual ~BuildChainVisitor(); 00030 00031 virtual int visit_element(TransportQueueElement* element); 00032 00033 /// Accessor to extract the chain, leaving the head_ and tail_ 00034 /// set to 0 as a result. 00035 ACE_Message_Block* chain(); 00036 00037 private: 00038 00039 ACE_Message_Block* head_; 00040 ACE_Message_Block* tail_; 00041 }; 00042 00043 } // namespace DCPS 00044 } // namespace OpenDDS 00045 00046 OPENDDS_END_VERSIONED_NAMESPACE_DECL 00047 00048 #if defined (__ACE_INLINE__) 00049 #include "BuildChainVisitor.inl" 00050 #endif /* __ACE_INLINE__ */ 00051 00052 #endif /* OPENDDS_DCPS_BUILDCHAINVISTOR_H */