MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / setRepoIor

Method setRepoIor

tools/monitor/MonitorData.cpp:52–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52bool
53Monitor::MonitorData::setRepoIor( const QString& ior)
54{
55 if( !this->enabled_) {
56 return false;
57 }
58
59 // Replace call to toStdString() with toLocal8Bit().constData()
60 // to avoid QString-related aborts under windows.
61 QByteArray ior_arr = ior.toLocal8Bit();
62 const char* ior_str = ior_arr.constData();
63
64 // Return successfully if the requested repository is already the
65 // active repository.
66 if( this->storage_->activeIor() == ior_str) {
67 return true;
68 }
69
70 // Set the repository IOR.
71 MonitorTask::RepoKey key
72 = this->dataSource_->setRepoIor( ior_str);
73
74 // Clear existing data.
75 this->clearData();
76
77 // Switch to the new repository.
78 if( this->dataSource_->setActiveRepo( key)) {
79 this->storage_->activeIor() = ior_str;
80 return true;
81
82 } else {
83 return false;
84 }
85}
86
87bool
88Monitor::MonitorData::removeRepo( const QString& ior)

Callers

nothing calls this directly

Calls 3

clearDataMethod · 0.95
activeIorMethod · 0.80
setActiveRepoMethod · 0.80

Tested by

no test coverage detected