summaryrefslogtreecommitdiff
path: root/src/python/swig/pyobject.hh
diff options
context:
space:
mode:
authorAndrew Bardsley <Andrew.Bardsley@arm.com>2014-10-16 05:49:32 -0400
committerAndrew Bardsley <Andrew.Bardsley@arm.com>2014-10-16 05:49:32 -0400
commitd8502ee46d356830698d7b96b29e4b27906a2d79 (patch)
treec7d052a7e276126bd1630658b386ac715f75238d /src/python/swig/pyobject.hh
parenta63ba6c7b7fe6620478c0d8d7812661c6a36d55a (diff)
downloadgem5-d8502ee46d356830698d7b96b29e4b27906a2d79.tar.xz
config: Add a --without-python option to build process
Add the ability to build libgem5 without embedded Python or the ability to configure with Python. This is a prelude to a patch to allow config.ini files to be loaded into libgem5 using only C++ which would make embedding gem5 within other simulation systems easier. This adds a few registration interfaces to things which cross between Python and C++. Namely: stats dumping and SimObject resolving
Diffstat (limited to 'src/python/swig/pyobject.hh')
-rw-r--r--src/python/swig/pyobject.hh14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/python/swig/pyobject.hh b/src/python/swig/pyobject.hh
index 8debcc82c..a4f06555e 100644
--- a/src/python/swig/pyobject.hh
+++ b/src/python/swig/pyobject.hh
@@ -36,7 +36,12 @@
#include "sim/sim_object.hh"
extern "C" SimObject *convertSwigSimObjectPtr(PyObject *);
-SimObject *resolveSimObject(const std::string &name);
+
+/** Resolve a SimObject name using the Python configuration */
+class PythonSimObjectResolver : public SimObjectResolver
+{
+ SimObject *resolveSimObject(const std::string &name);
+};
EtherInt * lookupEthPort(SimObject *so, const std::string &name, int i);
@@ -53,11 +58,8 @@ serializeAll(const std::string &cpt_dir)
Serializable::serializeAll(cpt_dir);
}
-inline Checkpoint *
-getCheckpoint(const std::string &cpt_dir)
-{
- return new Checkpoint(cpt_dir);
-}
+Checkpoint *
+getCheckpoint(const std::string &cpt_dir);
inline void
unserializeGlobals(Checkpoint *cp)