| 445 | } |
| 446 | |
| 447 | char* |
| 448 | ConfigStoreImpl::get_string(const char* key, |
| 449 | const char* value) |
| 450 | { |
| 451 | const ConfigPair cp(key, ""); |
| 452 | CORBA::String_var retval(value); |
| 453 | |
| 454 | DCPS::InternalDataReader<ConfigPair>::SampleSequence samples; |
| 455 | DCPS::InternalSampleInfoSequence infos; |
| 456 | config_reader_->read_instance(samples, infos, DDS::LENGTH_UNLIMITED, cp, |
| 457 | DDS::ANY_SAMPLE_STATE, DDS::ANY_VIEW_STATE, DDS::ALIVE_INSTANCE_STATE); |
| 458 | for (size_t idx = 0; idx != samples.size(); ++idx) { |
| 459 | const ConfigPair& sample = samples[idx]; |
| 460 | const DDS::SampleInfo& info = infos[idx]; |
| 461 | if (info.valid_data) { |
| 462 | retval = sample.value().c_str(); |
| 463 | } |
| 464 | } |
| 465 | |
| 466 | if (debug_logging) { |
| 467 | ACE_DEBUG((LM_DEBUG, "(%P|%t) %C: ConfigStoreImpl::get_string: %C=%C\n", |
| 468 | CONFIG_DEBUG_LOGGING, |
| 469 | cp.key().c_str(), |
| 470 | retval.in())); |
| 471 | |
| 472 | } |
| 473 | |
| 474 | return retval._retn(); |
| 475 | } |
| 476 | |
| 477 | void |
| 478 | ConfigStoreImpl::set_duration(const char* key, |