Add method to return the number of attached listeners. Listeners have become
a much more important feature than they were two years or something ago, and it's helpful for debugging and exploration to get this important node property shown in property tree dumps or in the property browser (verbose mode).
This commit is contained in:
@@ -1110,6 +1110,12 @@ public:
|
||||
void removeChangeListener (SGPropertyChangeListener * listener);
|
||||
|
||||
|
||||
/**
|
||||
* Get the number of listeners.
|
||||
*/
|
||||
int nListeners () const { return _listeners ? _listeners->size() : 0; }
|
||||
|
||||
|
||||
/**
|
||||
* Fire a value change event to all listeners.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user