DDS  ver. 3.6
ChannelInfo.h
Go to the documentation of this file.
1 // Copyright 2017 GSI, Inc. All rights reserved.
2 //
3 //
4 //
5 
6 #ifndef __DDS__ChannelInfo_h
7 #define __DDS__ChannelInfo_h
8 
9 namespace dds
10 {
11  namespace protocol_api
12  {
13  template <class T>
14  struct SChannelInfo
15  {
16  SChannelInfo() = default;
17 
18  SChannelInfo(typename T::connectionPtr_t _channel, uint64_t _protocolHeaderID, bool _isSlot)
19  : m_channel(_channel)
20  , m_protocolHeaderID(_protocolHeaderID)
21  , m_isSlot(_isSlot)
22  {
23  }
24  typename T::connectionPtr_t m_channel;
25  uint64_t m_protocolHeaderID{ 0 };
26  bool m_isSlot{ false };
27 
28  typedef std::vector<SChannelInfo<T>> container_t;
29  };
30 
31  template <class T>
32  bool operator==(const SChannelInfo<T>& lhs, const SChannelInfo<T>& rhs)
33  {
34  return lhs.m_channel.get() == rhs.m_channel.get();
35  }
36 
37  template <class T>
39  {
40  SWeakChannelInfo() = default;
41 
42  SWeakChannelInfo(typename T::weakConnectionPtr_t _channel, uint64_t _protocolHeaderID, bool _isSlot)
43  : m_channel(_channel)
44  , m_protocolHeaderID(_protocolHeaderID)
45  , m_isSlot(_isSlot)
46  {
47  }
48  typename T::weakConnectionPtr_t m_channel;
49  uint64_t m_protocolHeaderID{ 0 };
50  bool m_isSlot{ false };
51 
52  typedef std::vector<SWeakChannelInfo> container_t;
53  };
54 
55  template <class T>
56  bool operator==(const SWeakChannelInfo<T>& lhs, const SWeakChannelInfo<T>& rhs)
57  {
58  return lhs.m_channel.get() == rhs.m_channel.get();
59  }
60  } // namespace protocol_api
61 } // namespace dds
62 #endif /* __DDS__ChannelInfo_h */
bool m_isSlot
Definition: ChannelInfo.h:26
bool m_isSlot
Definition: ChannelInfo.h:50
T::weakConnectionPtr_t m_channel
Definition: ChannelInfo.h:48
SChannelInfo(typename T::connectionPtr_t _channel, uint64_t _protocolHeaderID, bool _isSlot)
Definition: ChannelInfo.h:18
Definition: ChannelInfo.h:14
Miscellaneous functions and helpers are located here.
Definition: AgentConnectionManager.h:13
Definition: ChannelInfo.h:38
T::connectionPtr_t m_channel
Definition: ChannelInfo.h:24
bool operator==(const SChannelInfo< T > &lhs, const SChannelInfo< T > &rhs)
Definition: ChannelInfo.h:32
SWeakChannelInfo(typename T::weakConnectionPtr_t _channel, uint64_t _protocolHeaderID, bool _isSlot)
Definition: ChannelInfo.h:42
std::vector< SChannelInfo< T > > container_t
Definition: ChannelInfo.h:28
std::vector< SWeakChannelInfo > container_t
Definition: ChannelInfo.h:52
uint64_t m_protocolHeaderID
Definition: ChannelInfo.h:25
uint64_t m_protocolHeaderID
Definition: ChannelInfo.h:49