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

Method AddWatcher

cpp/src/platform/Wait.cpp:72–89  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Add a watcher to our object. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

70// Add a watcher to our object.
71//-----------------------------------------------------------------------------
72void Wait::AddWatcher
73(
74 pfnWaitNotification_t _callback,
75 void* _context
76)
77{
78 if( !_callback )
79 {
80 assert(0);
81 return;
82 }
83
84 // Add a ref so our object cannot disappear while being watched
85 AddRef();
86
87 // Add the watcher (platform specific code required here for thread safety)
88 m_pImpl->AddWatcher( _callback, _context );
89}
90
91//-----------------------------------------------------------------------------
92// <Wait::RemoveWatcher>

Callers 1

MultipleMethod · 0.45

Calls 1

AddRefClass · 0.85

Tested by

no test coverage detected