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

Method clearData

tools/monitor/MonitorData.cpp:109–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109bool
110Monitor::MonitorData::clearData()
111{
112 if( !this->enabled_) {
113 return false;
114 }
115
116 // Copy out the previous header settings.
117 QList< QVariant> list;
118 int cols = this->model_->columnCount();
119 for( int index = 0; index < cols; ++index) {
120 QString value
121 = this->model_->headerData( index, Qt::Horizontal).toString();
122 list << value;
123 }
124
125 // Clear the mappings.
126 this->storage_->reset();
127
128 // Create a new tree to install fresh data into.
129 TreeNode* root = new TreeNode( list);
130
131 // Install the empty tree into the data model.
132 this->model_->newRoot( root);
133
134 // Clear the active IOR field.
135 this->storage_->activeIor() = std::string();
136
137 return true;
138}
139
140bool
141Monitor::MonitorData::stopInstrumentation()

Callers 4

setRepoIorMethod · 0.95
removeRepoMethod · 0.95
newRepoMethod · 0.80
newRepoMethod · 0.80

Calls 6

columnCountMethod · 0.80
headerDataMethod · 0.80
newRootMethod · 0.80
activeIorMethod · 0.80
toStringMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected