MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / ~Node

Method ~Node

cpp/src/Node.cpp:213–257  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Destructor -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

211// Destructor
212//-----------------------------------------------------------------------------
213Node::~Node
214(
215)
216{
217 // Remove any messages from queues
218 GetDriver()->RemoveQueues( m_nodeId );
219
220 // Remove the values from the poll list
221 for( ValueStore::Iterator it = m_values->Begin(); it != m_values->End(); ++it )
222 {
223 ValueID const& valueId = it->second->GetID();
224 if( GetDriver()->isPolled( valueId ) )
225 {
226 GetDriver()->DisablePoll( valueId );
227 }
228 }
229
230 Scene::RemoveValues( m_homeId, m_nodeId );
231
232 // Delete the values
233 delete m_values;
234
235 // Delete the command classes
236 while( !m_commandClassMap.empty() )
237 {
238 map<uint8,CommandClass*>::iterator it = m_commandClassMap.begin();
239 delete it->second;
240 m_commandClassMap.erase( it );
241 }
242
243 // Delete the groups
244 while( !m_groups.empty() )
245 {
246 map<uint8,Group*>::iterator it = m_groups.begin();
247 delete it->second;
248 m_groups.erase( it );
249 }
250
251 // Delete the button map
252 while( !m_buttonMap.empty() )
253 {
254 map<uint8,uint8>::iterator it = m_buttonMap.begin();
255 m_buttonMap.erase( it );
256 }
257}
258
259//-----------------------------------------------------------------------------
260// <Node::AdvanceQueries>

Callers

nothing calls this directly

Calls 7

RemoveQueuesMethod · 0.80
BeginMethod · 0.45
EndMethod · 0.45
isPolledMethod · 0.45
DisablePollMethod · 0.45
emptyMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected