OpenDDS  Snapshot(2023/01/05-18:03)
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 65 of file DomainParticipantImpl.cpp.

References find(), and name.

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

66  {
67  DDS::PropertySeq result(properties.length());
68  result.length(properties.length());
69  unsigned int count = 0;
70  for (unsigned int i = 0; i < properties.length(); ++i) {
71  if (std::string(properties[i].name.in()).find(prefix) == 0) {
72  result[count++] = properties[i];
73  }
74  }
75  result.length(count);
76  return result;
77  }
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:69

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

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

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