OpenDDS
Snapshot(2023/04/07-19:43)
|
Encapsulate a priority value and internet address as a key. More...
#include <PriorityKey.h>
Public Member Functions | |
PriorityKey () | |
PriorityKey (Priority priority, ACE_INET_Addr address, bool is_loopback, bool active) | |
bool | operator< (const PriorityKey &rhs) const |
bool | operator== (const PriorityKey &rhs) const |
unsigned long | hash () const |
Priority & | priority () |
Priority | priority () const |
ACE_INET_Addr & | address () |
ACE_INET_Addr | address () const |
bool & | is_loopback () |
bool | is_loopback () const |
bool & | is_active () |
bool | is_active () const |
Private Attributes | |
Priority | priority_ |
ACE_INET_Addr | address_ |
bool | is_loopback_ |
bool | is_active_ |
Encapsulate a priority value and internet address as a key.
This class is encapsulates a priority value and an internet address value for use as a key in either an STL container or an ACE hash container. The '<' operator is used by the STL containers and the '==' operator and hash() method are used by the ACE hash map container(s). The ACE hash map container(s) also require the use of a default constructor as well.
To use keys of this type as an STL container key, simply include this type as the key template parameter. An example usage is:
typedef std::map<PriorityKey, ValueType> PriorityMap;
To use this type as an ACE hash container key, use the function object templates ACE_Hash and ACE_Equal_To for the HASH_KEY and COMPARE_KEYS template parameters. An example usage is:
typedef ACE_Hash_Map_Manager_Ex< PriorityKey, ValueType, ACE_Hash<PriorityKey>, ACE_Equal_To<PriorityKey>, SynchType > PriorityHashMap;
Default copy constructor and assigment are sufficient. Readonly and read/write accessors for member data are provided.
Definition at line 52 of file PriorityKey.h.
ACE_INLINE OpenDDS::DCPS::PriorityKey::PriorityKey | ( | ) |
ACE_INLINE OpenDDS::DCPS::PriorityKey::PriorityKey | ( | Priority | priority, |
ACE_INET_Addr | address, | ||
bool | is_loopback, | ||
bool | active | ||
) |
ACE_INLINE ACE_INET_Addr & OpenDDS::DCPS::PriorityKey::address | ( | void | ) |
Definition at line 72 of file PriorityKey.inl.
References ACE_INLINE, and address_.
Referenced by OpenDDS::DCPS::UdpTransport::accept_datalink(), OpenDDS::DCPS::TcpTransport::accept_datalink(), OpenDDS::DCPS::UdpTransport::connect_datalink(), and OpenDDS::DCPS::TcpTransport::connect_datalink().
ACE_INLINE ACE_INET_Addr OpenDDS::DCPS::PriorityKey::address | ( | void | ) | const |
ACE_INLINE unsigned long OpenDDS::DCPS::PriorityKey::hash | ( | void | ) | const |
Definition at line 50 of file PriorityKey.inl.
References ACE_INLINE, address_, ACE_INET_Addr::hash(), is_active_, is_loopback_, and priority_.
ACE_INLINE bool & OpenDDS::DCPS::PriorityKey::is_active | ( | ) |
Definition at line 100 of file PriorityKey.inl.
References ACE_INLINE, and is_active_.
Referenced by OpenDDS::DCPS::UdpTransport::accept_datalink(), OpenDDS::DCPS::TcpTransport::accept_datalink(), OpenDDS::DCPS::UdpTransport::connect_datalink(), and OpenDDS::DCPS::TcpTransport::connect_datalink().
ACE_INLINE bool OpenDDS::DCPS::PriorityKey::is_active | ( | ) | const |
Definition at line 107 of file PriorityKey.inl.
References is_active_, and OPENDDS_END_VERSIONED_NAMESPACE_DECL.
ACE_INLINE bool & OpenDDS::DCPS::PriorityKey::is_loopback | ( | void | ) |
Definition at line 86 of file PriorityKey.inl.
References ACE_INLINE, and is_loopback_.
Referenced by OpenDDS::DCPS::UdpTransport::accept_datalink(), OpenDDS::DCPS::TcpTransport::accept_datalink(), OpenDDS::DCPS::UdpTransport::connect_datalink(), and OpenDDS::DCPS::TcpTransport::connect_datalink().
ACE_INLINE bool OpenDDS::DCPS::PriorityKey::is_loopback | ( | void | ) | const |
ACE_INLINE bool OpenDDS::DCPS::PriorityKey::operator< | ( | const PriorityKey & | rhs | ) | const |
Definition at line 27 of file PriorityKey.inl.
References ACE_INLINE, address_, is_active_, is_loopback_, and priority_.
ACE_INLINE bool OpenDDS::DCPS::PriorityKey::operator== | ( | const PriorityKey & | rhs | ) | const |
Definition at line 40 of file PriorityKey.inl.
References ACE_INLINE, address_, is_active_, is_loopback_, and priority_.
ACE_INLINE Priority & OpenDDS::DCPS::PriorityKey::priority | ( | void | ) |
Definition at line 58 of file PriorityKey.inl.
References ACE_INLINE, and priority_.
Referenced by OpenDDS::DCPS::UdpTransport::accept_datalink(), OpenDDS::DCPS::TcpTransport::accept_datalink(), OpenDDS::DCPS::UdpTransport::connect_datalink(), and OpenDDS::DCPS::TcpTransport::connect_datalink().
ACE_INLINE Priority OpenDDS::DCPS::PriorityKey::priority | ( | void | ) | const |
|
private |
Definition at line 88 of file PriorityKey.h.
Referenced by address(), hash(), operator<(), and operator==().
|
private |
Definition at line 91 of file PriorityKey.h.
Referenced by hash(), is_active(), operator<(), and operator==().
|
private |
Definition at line 90 of file PriorityKey.h.
Referenced by hash(), is_loopback(), operator<(), and operator==().
|
private |
Definition at line 85 of file PriorityKey.h.
Referenced by hash(), operator<(), operator==(), and priority().