| 69 | } |
| 70 | |
| 71 | DDS::PropertySeq filter_properties(const DDS::PropertySeq& properties, const std::string& prefix) |
| 72 | { |
| 73 | DDS::PropertySeq result(properties.length()); |
| 74 | result.length(properties.length()); |
| 75 | unsigned int count = 0; |
| 76 | for (unsigned int i = 0; i < properties.length(); ++i) { |
| 77 | if (std::string(properties[i].name.in()).find(prefix) == 0) { |
| 78 | result[count++] = properties[i]; |
| 79 | } |
| 80 | } |
| 81 | result.length(count); |
| 82 | return result; |
| 83 | } |
| 84 | |
| 85 | } // namespace Util |
| 86 |