OpenDDS  Snapshot(2021/07/08-18:22)
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 67 of file DomainParticipantImpl.cpp.

References find().

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

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

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

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

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