| 1137 | } |
| 1138 | |
| 1139 | ConfigStoreImpl::StringList |
| 1140 | ConfigStoreImpl::get_section_names(const String& prefix) const |
| 1141 | { |
| 1142 | const String cprefix = ConfigPair::canonicalize(prefix); |
| 1143 | |
| 1144 | ConfigReader::SampleSequence samples; |
| 1145 | DCPS::InternalSampleInfoSequence infos; |
| 1146 | config_reader_->read(samples, infos, DDS::LENGTH_UNLIMITED, |
| 1147 | DDS::ANY_SAMPLE_STATE, DDS::ANY_VIEW_STATE, DDS::ALIVE_INSTANCE_STATE); |
| 1148 | StringList retval; |
| 1149 | for (ConfigReader::SampleSequence::const_iterator pos = samples.begin(), limit = samples.end(); pos != limit; ++pos) { |
| 1150 | if (pos->key_has_prefix(cprefix) && |
| 1151 | pos->key() != cprefix && |
| 1152 | !pos->value().empty() && |
| 1153 | pos->value().substr(0, 1) == "@") { |
| 1154 | const String name = pos->value().substr(1); |
| 1155 | if (ConfigPair::canonicalize(prefix + "_" + name) == pos->key()) { |
| 1156 | retval.push_back(name); |
| 1157 | } |
| 1158 | } |
| 1159 | } |
| 1160 | |
| 1161 | return retval; |
| 1162 | } |
| 1163 | |
| 1164 | ConfigStoreImpl::StringMap |
| 1165 | ConfigStoreImpl::get_section_values(const String& prefix) const |
no test coverage detected