Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Streamline KeyObserver attachment to EntityNode
- EntityNode has a new observeKey() method which adds a simple callback function to observe a particular key, rather than requiring a full KeyObserver object owned and managed by the calling code. - KeyObserverMap now stores the KeyObservers as shared_ptrs rather than raw pointers. If the legacy addKeyObserver() method is called, the observer is wrapped in a shared_ptr with a null deleter. If the new observeKey() method is called, a new KeyObserver is constructed to wrap the callback function. - EntityKeyValue::detach() has a new parameter to disable sending the final empty value when the observer is detached. This avoids feedback loops and crashes when EntityNode (and its contained KeyObserverMap) is destroyed. - All KeyObserverDelegates are now removed from Doom3GroupNode, in favour of the simpler observeKey() interface.
- Loading branch information
Matthew Mott
committed
Nov 25, 2021
1 parent
74feb75
commit f6f4798
Showing
7 changed files
with
144 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters