1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 29 unchanged lines hidden (view full) --- 38#define __SERIALIZE_HH__ 39 40 41#include <iostream> 42#include <list> 43#include <map> 44#include <vector> 45 |
46#include "base/bitunion.hh" |
47#include "base/types.hh" 48 49class IniFile; 50class Serializable; 51class Checkpoint; 52class SimObject; 53class EventQueue; 54 --- 4 unchanged lines hidden (view full) --- 59 * SimObject shouldn't cause the version number to increase, only changes to 60 * existing objects such as serializing/unserializing more state, changing sizes 61 * of serialized arrays, etc. */ 62static const uint64_t gem5CheckpointVersion = 0x000000000000000d; 63 64template <class T> 65void paramOut(std::ostream &os, const std::string &name, const T ¶m); 66 |
67template <typename DataType, typename BitUnion> 68void paramOut(std::ostream &os, const std::string &name, 69 const BitfieldBackend::BitUnionOperators<DataType, BitUnion> &p) 70{ 71 paramOut(os, name, p.__data); 72} 73 |
74template <class T> 75void paramIn(Checkpoint *cp, const std::string §ion, 76 const std::string &name, T ¶m); 77 |
78template <typename DataType, typename BitUnion> 79void paramIn(Checkpoint *cp, const std::string §ion, 80 const std::string &name, 81 BitfieldBackend::BitUnionOperators<DataType, BitUnion> &p) 82{ 83 paramIn(cp, section, name, p.__data); 84} 85 |
86template <class T> 87bool optParamIn(Checkpoint *cp, const std::string §ion, 88 const std::string &name, T ¶m); 89 |
90template <typename DataType, typename BitUnion> 91bool optParamIn(Checkpoint *cp, const std::string §ion, 92 const std::string &name, 93 BitfieldBackend::BitUnionOperators<DataType, BitUnion> &p) 94{ 95 return optParamIn(cp, section, name, p.__data); 96} 97 |
98template <class T> 99void arrayParamOut(std::ostream &os, const std::string &name, 100 const T *param, unsigned size); 101 102template <class T> 103void arrayParamOut(std::ostream &os, const std::string &name, 104 const std::vector<T> ¶m); 105 --- 238 unchanged lines hidden --- |