diff options
author | Andrew Bardsley <Andrew.Bardsley@arm.com> | 2014-10-16 05:49:32 -0400 |
---|---|---|
committer | Andrew Bardsley <Andrew.Bardsley@arm.com> | 2014-10-16 05:49:32 -0400 |
commit | d8502ee46d356830698d7b96b29e4b27906a2d79 (patch) | |
tree | c7d052a7e276126bd1630658b386ac715f75238d /src/sim/serialize.hh | |
parent | a63ba6c7b7fe6620478c0d8d7812661c6a36d55a (diff) | |
download | gem5-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/sim/serialize.hh')
-rw-r--r-- | src/sim/serialize.hh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/sim/serialize.hh b/src/sim/serialize.hh index d3c9bb40b..18efa2a26 100644 --- a/src/sim/serialize.hh +++ b/src/sim/serialize.hh @@ -255,14 +255,28 @@ class SerializableClass SerializableClass the##OBJ_CLASS##Class(CLASS_NAME, \ OBJ_CLASS::createForUnserialize); +// Base class to wrap object resolving functionality. This can be +// provided to Checkpoint to allow it to map object names onto +// object C++ objects in which to unserialize +class SimObjectResolver +{ + public: + virtual ~SimObjectResolver() { } + + // Find a SimObject given a full path name + virtual SimObject *resolveSimObject(const std::string &name) = 0; +}; + class Checkpoint { private: IniFile *db; + SimObjectResolver &objNameResolver; + public: - Checkpoint(const std::string &cpt_dir); + Checkpoint(const std::string &cpt_dir, SimObjectResolver &resolver); ~Checkpoint(); const std::string cptDir; |