OpenDDS  Snapshot(2023/04/28-20:55)
CopyChainVisitor.h
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
8 #ifndef OPENDDS_DCPS_TRANSPORT_FRAMEWORK_COPYCHAINVISITOR_H
9 #define OPENDDS_DCPS_TRANSPORT_FRAMEWORK_COPYCHAINVISITOR_H
10 
11 #include "dds/DCPS/dcps_export.h"
12 #include "BasicQueue_T.h"
14 
16 class ACE_Message_Block;
18 
20 
21 namespace OpenDDS {
22 namespace DCPS {
23 
24 class TransportQueueElement;
25 
26 class OpenDDS_Dcps_Export CopyChainVisitor : public BasicQueueVisitor<TransportQueueElement> {
27 public:
28 
31  MessageBlockAllocator* mb_allocator,
32  DataBlockAllocator* db_allocator,
33  bool duplicate = false
34  );
35 
36  virtual ~CopyChainVisitor();
37 
38  virtual int visit_element(TransportQueueElement* element);
39 
40  /// Access the status.
41  int status() const;
42 
43 private:
44  /// Target queue to fill with copied elements.
46 
47  /// Allocator to create copied elements.
50 
51  /// Status of visitation.
52  int status_;
53  bool duplicate_;
54 };
55 
56 } // namespace DCPS
57 } // namespace OpenDDS
58 
60 
61 #if defined (__ACE_INLINE__)
62 #include "CopyChainVisitor.inl"
63 #endif /* __ACE_INLINE__ */
64 
65 #endif /* OPENDDS_DCPS_COPYCHAINVISTOR_H */
#define ACE_BEGIN_VERSIONED_NAMESPACE_DECL
#define OpenDDS_Dcps_Export
Definition: dcps_export.h:24
MessageBlockAllocator * mb_allocator_
Allocator to create copied elements.
DataBlockAllocator * db_allocator_
int status_
Status of visitation.
A fixed-size allocator that caches items for quicker access but if the pool is exhausted it will use ...
#define ACE_END_VERSIONED_NAMESPACE_DECL
BasicQueue< TransportQueueElement > & target_
Target queue to fill with copied elements.
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
Base wrapper class around a data/control sample to be sent.