OpenDDS  Snapshot(2021/12/03-20:38)
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 70 of file DomainParticipantImpl.cpp.

References find(), and name.

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

71  {
72  DDS::PropertySeq result(properties.length());
73  result.length(properties.length());
74  unsigned int count = 0;
75  for (unsigned int i = 0; i < properties.length(); ++i) {
76  if (std::string(properties[i].name.in()).find(prefix) == 0) {
77  result[count++] = properties[i];
78  }
79  }
80  result.length(count);
81  return result;
82  }
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 54 of file DomainParticipantImpl.cpp.

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

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