OpenDDS  Snapshot(2023/04/28-20:55)
Public Member Functions | Private Attributes | List of all members
OpenDDS::DCPS::DataDurabilityCache::key_type Class Reference

Key type for underlying maps. More...

#include <DataDurabilityCache.h>

Collaboration diagram for OpenDDS::DCPS::DataDurabilityCache::key_type:
Collaboration graph
[legend]

Public Member Functions

 key_type ()
 
 key_type (DDS::DomainId_t domain_id, char const *topic, char const *type, ACE_Allocator *allocator)
 
 key_type (key_type const &rhs)
 
key_typeoperator= (key_type const &rhs)
 
bool operator== (key_type const &rhs) const
 
bool operator< (key_type const &rhs) const
 
u_long hash () const
 

Private Attributes

DDS::DomainId_t domain_id_
 
ACE_CString topic_name_
 
ACE_CString type_name_
 

Detailed Description

Key type for underlying maps.

Each sample may be uniquely identified by its domain ID, topic name and type name. We use that property to establish a map key type.

Definition at line 81 of file DataDurabilityCache.h.

Constructor & Destructor Documentation

◆ key_type() [1/3]

OpenDDS::DCPS::DataDurabilityCache::key_type::key_type ( void  )
inline

◆ key_type() [2/3]

OpenDDS::DCPS::DataDurabilityCache::key_type::key_type ( DDS::DomainId_t  domain_id,
char const *  topic,
char const *  type,
ACE_Allocator allocator 
)
inline

Definition at line 90 of file DataDurabilityCache.h.

94  : domain_id_(domain_id)
95  , topic_name_(topic, allocator)
96  , type_name_(type, allocator) {
97  }

◆ key_type() [3/3]

OpenDDS::DCPS::DataDurabilityCache::key_type::key_type ( key_type const &  rhs)
inline

Definition at line 99 of file DataDurabilityCache.h.

100  : domain_id_(rhs.domain_id_)
101  , topic_name_(rhs.topic_name_)
102  , type_name_(rhs.type_name_) {
103  }

Member Function Documentation

◆ hash()

u_long OpenDDS::DCPS::DataDurabilityCache::key_type::hash ( void  ) const
inline

Definition at line 127 of file DataDurabilityCache.h.

127  {
128  return
129  static_cast<u_long>(this->domain_id_)
130  + this->topic_name_.hash()
131  + this->type_name_.hash();
132  }
u_long hash(void) const

◆ operator<()

bool OpenDDS::DCPS::DataDurabilityCache::key_type::operator< ( key_type const &  rhs) const
inline

Definition at line 120 of file DataDurabilityCache.h.

References domain_id_, topic_name_, and type_name_.

120  {
121  return
122  this->domain_id_ < rhs.domain_id_
123  && this->topic_name_ < rhs.topic_name_
124  && this->type_name_ < rhs.type_name_;
125  }

◆ operator=()

key_type& OpenDDS::DCPS::DataDurabilityCache::key_type::operator= ( key_type const &  rhs)
inline

Definition at line 105 of file DataDurabilityCache.h.

References domain_id_, topic_name_, and type_name_.

105  {
106  this->domain_id_ = rhs.domain_id_;
107  this->topic_name_ = rhs.topic_name_;
108  this->type_name_ = rhs.type_name_;
109 
110  return *this;
111  }

◆ operator==()

bool OpenDDS::DCPS::DataDurabilityCache::key_type::operator== ( key_type const &  rhs) const
inline

Definition at line 113 of file DataDurabilityCache.h.

References domain_id_, topic_name_, and type_name_.

113  {
114  return
115  this->domain_id_ == rhs.domain_id_
116  && this->topic_name_ == rhs.topic_name_
117  && this->type_name_ == rhs.type_name_;
118  }

Member Data Documentation

◆ domain_id_

DDS::DomainId_t OpenDDS::DCPS::DataDurabilityCache::key_type::domain_id_
private

Definition at line 136 of file DataDurabilityCache.h.

Referenced by operator<(), operator=(), and operator==().

◆ topic_name_

ACE_CString OpenDDS::DCPS::DataDurabilityCache::key_type::topic_name_
private

Definition at line 137 of file DataDurabilityCache.h.

Referenced by operator<(), operator=(), and operator==().

◆ type_name_

ACE_CString OpenDDS::DCPS::DataDurabilityCache::key_type::type_name_
private

Definition at line 138 of file DataDurabilityCache.h.

Referenced by operator<(), operator=(), and operator==().


The documentation for this class was generated from the following file: