python: Add support for exporting static class methods from c++
authorNikos Nikoleris <nikos.nikoleris@arm.com>
Tue, 4 Jun 2019 12:21:30 +0000 (13:21 +0100)
committerNikos Nikoleris <nikos.nikoleris@arm.com>
Wed, 19 Jun 2019 10:13:01 +0000 (10:13 +0000)
commita2f0167b6e951e3a293f3c8d2c11188eb5c59012
tree817a2fdeed50953febaf30d08c756348b0f5a5f3
parentb510f95f43fd0714b87899ee553ae9301b773dd2
python: Add support for exporting static class methods from c++

This change adds support for exporting static methods in a c++
SimObject from the coressponsing python wrapper class. This will allow
us to define and use c++ methods without the need to instantiate an
object of the corresponding class.

Change-Id: Iaf24c1aa6f20feb5c91241f46ec8db005a6a0c0c
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19168
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
src/python/m5/SimObject.py
src/python/m5/util/pybind.py