sim: Add a checkpoint function to test for entries
authorAndreas Sandberg <andreas.sandberg@arm.com>
Tue, 4 Oct 2016 10:22:16 +0000 (11:22 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Tue, 4 Oct 2016 10:22:16 +0000 (11:22 +0100)
commit18135ce6abc0ee02e36aef424be183cd7238a558
treed42079cc180d7f385e2efff5594964b6dfc5db39
parentee7875885783d8b0945d27052bbf1e0a43aca18e
sim: Add a checkpoint function to test for entries

When loading a checkpoint, it's sometimes desirable to be able to test
whether an entry within a secion exists. This is currently done
automatically in the UNSERIALIZE_OPT_SCALAR macro, but it isn't
possible to do for arrays, containers, or enums. Instead of adding
even more macros, add a helper function (CheckpointIn::entryExists())
that tests for the presence of an entry.

Change-Id: I4b4646b03276b889fd3916efefff3bd552317dbc
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
src/base/inifile.cc
src/base/inifile.hh
src/sim/serialize.cc
src/sim/serialize.hh