OpenDDS  Snapshot(2023/01/27-10:40)
Functions
Util Namespace Reference

Functions

template<typename Key >
int find (OpenDDS::DCPS::DomainParticipantImpl::TopicMap &c, const Key &key, OpenDDS::DCPS::DomainParticipantImpl::TopicMap::mapped_type *&value)
 
DDS::PropertySeq filter_properties (const DDS::PropertySeq &properties, const std::string &prefix)
 

Function Documentation

◆ filter_properties()

DDS::PropertySeq Util::filter_properties ( const DDS::PropertySeq properties,
const std::string &  prefix 
)

Definition at line 66 of file DomainParticipantImpl.cpp.

References find(), and name.

Referenced by OpenDDS::DCPS::DomainParticipantImpl::enable().

67  {
68  DDS::PropertySeq result(properties.length());
69  result.length(properties.length());
70  unsigned int count = 0;
71  for (unsigned int i = 0; i < properties.length(); ++i) {
72  if (std::string(properties[i].name.in()).find(prefix) == 0) {
73  result[count++] = properties[i];
74  }
75  }
76  result.length(count);
77  return result;
78  }
const char *const name
Definition: debug.cpp:60
int find(const PG_Property_Set &decoder, const ACE_CString &key, TYPE &value)
sequence< Property_t > PropertySeq
Definition: DdsDcpsCore.idl:87

◆ find()

template<typename Key >
int Util::find ( OpenDDS::DCPS::DomainParticipantImpl::TopicMap &  c,
const Key &  key,
OpenDDS::DCPS::DomainParticipantImpl::TopicMap::mapped_type *&  value 
)

Definition at line 50 of file DomainParticipantImpl.cpp.

Referenced by OpenDDS::DCPS::DomainParticipantImpl::create_topic_i(), filter_properties(), and OpenDDS::DCPS::DomainParticipantImpl::lookup_topicdescription().

54  {
55  OpenDDS::DCPS::DomainParticipantImpl::TopicMap::iterator iter =
56  c.find(key);
57 
58  if (iter == c.end()) {
59  return -1;
60  }
61 
62  value = &iter->second;
63  return 0;
64  }
const LogLevel::Value value
Definition: debug.cpp:61
sequence< octet > key