diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-11-24 14:20:44 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:12:07 -0300 |
commit | fe97dab5ba84e7b2abe7736cf0dbb3b6227d649a (patch) | |
tree | 595ed2640585859cafc1a53136a850d5abf0a394 /libshiboken/bindingmanager.cpp | |
parent | 5f28a31c58e44303c5fc7f5ba54ca0620c698b6a (diff) |
Added BindingManager::visitAllPyObjects function, used to visit all PyObjects with a function.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'libshiboken/bindingmanager.cpp')
-rw-r--r-- | libshiboken/bindingmanager.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libshiboken/bindingmanager.cpp b/libshiboken/bindingmanager.cpp index a43852614..2bcf2debe 100644 --- a/libshiboken/bindingmanager.cpp +++ b/libshiboken/bindingmanager.cpp @@ -277,5 +277,14 @@ std::set<SbkObject*> BindingManager::getAllPyObjects() return pyObjects; } +void BindingManager::visitAllPyObjects(ObjectVisitor visitor, void* data) +{ + WrapperMap copy = m_d->wrapperMapper; + for (WrapperMap::iterator it = copy.begin(); it != copy.end(); ++it) { + if (hasWrapper(it->first)) + visitor(it->second, data); + } +} + } // namespace Shiboken |