The codegenerator now handles dynamic typing (that SWIG alone could never to) by...
authorJim Carroll <thecarrolls@jiminger.com>
Fri, 18 Oct 2013 01:24:02 +0000 (21:24 -0400)
committerJim Carroll <thecarrolls@jiminger.com>
Mon, 21 Oct 2013 13:20:11 +0000 (09:20 -0400)
commit395e4cd618d13702c4cf5fc371e9d48156bdcaaf
tree2145a4257eafd35ba71c12375b344c70ed33c820
parentf83b91395a0e1e72b5ae13483b9d0849a6340630
The codegenerator now handles dynamic typing (that SWIG alone could never to) by using RTTI on the objects passed so that their concrete types, rather than their current static types, are considered correctly when being returned to python. This allows us to remove a lot of extraneous virtual methods from the Control parent class.

Removed all of the extraneous methods at the parent level to handle the dynamic language concerns of returning a Control rather than a specific type.

Added more documentation and removed some things that were only visible for reasons no longer viable.

Hide show/close from python in WindowDialog since they are inherited from Window.

Also added a simplistic hack for handling dynamically typed parameters to methods using an Alternative<T1,T2> template. The only better step would be full support of overridden methods. This allows the removal all of the explicit python code in the *.i files (with the exception of the rich compare _rcmp on the Action class).
54 files changed:
tools/codegenerator/SwigTypeParser.groovy
xbmc/commons/typeindex.h [new file with mode: 0644]
xbmc/cores/VideoRenderers/RenderManager.h
xbmc/interfaces/legacy/Addon.cpp
xbmc/interfaces/legacy/Addon.h
xbmc/interfaces/legacy/AddonCallback.h
xbmc/interfaces/legacy/AddonClass.cpp
xbmc/interfaces/legacy/AddonClass.h
xbmc/interfaces/legacy/Alternative.h
xbmc/interfaces/legacy/CallbackFunction.cpp
xbmc/interfaces/legacy/CallbackFunction.h
xbmc/interfaces/legacy/CallbackHandler.cpp
xbmc/interfaces/legacy/CallbackHandler.h
xbmc/interfaces/legacy/Control.cpp
xbmc/interfaces/legacy/Control.h
xbmc/interfaces/legacy/Dialog.cpp
xbmc/interfaces/legacy/Dialog.h
xbmc/interfaces/legacy/Exception.h
xbmc/interfaces/legacy/File.cpp
xbmc/interfaces/legacy/File.h
xbmc/interfaces/legacy/InfoTagMusic.cpp
xbmc/interfaces/legacy/InfoTagMusic.h
xbmc/interfaces/legacy/InfoTagVideo.cpp
xbmc/interfaces/legacy/Keyboard.cpp
xbmc/interfaces/legacy/Keyboard.h
xbmc/interfaces/legacy/LanguageHook.h
xbmc/interfaces/legacy/ListItem.cpp
xbmc/interfaces/legacy/ListItem.h
xbmc/interfaces/legacy/ModuleXbmcvfs.h
xbmc/interfaces/legacy/Monitor.cpp
xbmc/interfaces/legacy/Monitor.h
xbmc/interfaces/legacy/PlayList.cpp
xbmc/interfaces/legacy/Player.cpp
xbmc/interfaces/legacy/Player.h
xbmc/interfaces/legacy/RenderCapture.h
xbmc/interfaces/legacy/Stat.h
xbmc/interfaces/legacy/Window.cpp
xbmc/interfaces/legacy/Window.h
xbmc/interfaces/legacy/WindowDialog.cpp
xbmc/interfaces/legacy/WindowDialog.h
xbmc/interfaces/legacy/WindowXML.cpp
xbmc/interfaces/legacy/WindowXML.h
xbmc/interfaces/python/CallbackHandler.cpp
xbmc/interfaces/python/LanguageHook.cpp
xbmc/interfaces/python/LanguageHook.h
xbmc/interfaces/python/PythonInvoker.cpp
xbmc/interfaces/python/PythonSwig.cpp.template
xbmc/interfaces/python/swig.cpp
xbmc/interfaces/python/swig.h
xbmc/interfaces/python/typemaps/python.Alternative.intm [new file with mode: 0644]
xbmc/interfaces/swig/AddonModuleXbmc.i
xbmc/interfaces/swig/AddonModuleXbmcgui.i
xbmc/interfaces/swig/AddonModuleXbmcvfs.i
xbmc/interfaces/swig/ControlListAddItemMethods.i [deleted file]