kernel: Move serialization code out of headers. (#7312)
This commit is contained in:
parent
9c84721d84
commit
a2d1c4a94c
52 changed files with 458 additions and 270 deletions
|
@ -11,10 +11,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
#include <boost/container/static_vector.hpp>
|
||||
#include <boost/serialization/array.hpp>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include "common/bit_field.h"
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/kernel/handle_table.h"
|
||||
|
@ -33,12 +30,7 @@ struct AddressMapping {
|
|||
private:
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& address;
|
||||
ar& size;
|
||||
ar& read_only;
|
||||
ar& unk_flag;
|
||||
}
|
||||
void serialize(Archive& ar, const unsigned int);
|
||||
};
|
||||
|
||||
union ProcessFlags {
|
||||
|
@ -77,11 +69,7 @@ public:
|
|||
private:
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& offset;
|
||||
ar& addr;
|
||||
ar& size;
|
||||
}
|
||||
void serialize(Archive& ar, const unsigned int);
|
||||
};
|
||||
|
||||
std::string GetTypeName() const override {
|
||||
|
@ -133,14 +121,7 @@ public:
|
|||
private:
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& boost::serialization::base_object<Object>(*this);
|
||||
ar& memory;
|
||||
ar& segments;
|
||||
ar& entrypoint;
|
||||
ar& name;
|
||||
ar& program_id;
|
||||
}
|
||||
void serialize(Archive& ar, const unsigned int);
|
||||
};
|
||||
|
||||
class Process final : public Object {
|
||||
|
@ -257,7 +238,9 @@ private:
|
|||
|
||||
} // namespace Kernel
|
||||
|
||||
BOOST_CLASS_EXPORT_KEY(Kernel::AddressMapping)
|
||||
BOOST_CLASS_EXPORT_KEY(Kernel::CodeSet)
|
||||
BOOST_CLASS_EXPORT_KEY(Kernel::CodeSet::Segment)
|
||||
BOOST_CLASS_EXPORT_KEY(Kernel::Process)
|
||||
CONSTRUCT_KERNEL_OBJECT(Kernel::CodeSet)
|
||||
CONSTRUCT_KERNEL_OBJECT(Kernel::Process)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue