OpenDDS  Snapshot(2023/04/07-19:43)
Public Member Functions | Private Attributes | List of all members
OpenDDS::DCPS::PartitionName Class Reference

Public Member Functions

 PartitionName (const char *name)
 
bool matches (const PartitionName &n)
 

Private Attributes

const char * name_
 
bool wildcard_
 

Detailed Description

Definition at line 117 of file DCPS_Utils.cpp.

Constructor & Destructor Documentation

◆ PartitionName()

OpenDDS::DCPS::PartitionName::PartitionName ( const char *  name)
inline

Definition at line 119 of file DCPS_Utils.cpp.

120  : name_(name),
bool is_wildcard(const char *str)
Definition: DCPS_Utils.cpp:100
const char *const name
Definition: debug.cpp:60

Member Function Documentation

◆ matches()

bool OpenDDS::DCPS::PartitionName::matches ( const PartitionName n)
inline

Definition at line 123 of file DCPS_Utils.cpp.

References name_, ACE_OS::strcmp(), ACE::wild_match(), and wildcard_.

Referenced by OpenDDS::DCPS::matches_name().

123  {
124  if (wildcard_ && n.wildcard_)
125  return false; // wildcards never match
126 
127  if (wildcard_)
128  return ACE::wild_match(n.name_, name_, true, true);
129 
130  else if (n.wildcard_)
131  return ACE::wild_match(name_, n.name_, true, true);
132 
133  else
134  return ACE_OS::strcmp(name_, n.name_) == 0;
135  }
int strcmp(const char *s, const char *t)
bool wild_match(const char *s, const char *pattern, bool case_sensitive=true, bool character_classes=false)

Member Data Documentation

◆ name_

const char* OpenDDS::DCPS::PartitionName::name_
private

Definition at line 138 of file DCPS_Utils.cpp.

Referenced by matches().

◆ wildcard_

bool OpenDDS::DCPS::PartitionName::wildcard_
private

Definition at line 139 of file DCPS_Utils.cpp.

Referenced by matches().


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