OpenDDS  Snapshot(2021/11/05-18:34)
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 69 of file DomainParticipantImpl.cpp.

References find(), and name.

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

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

◆ 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 53 of file DomainParticipantImpl.cpp.

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

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