Finished archives; remove pod.h
This commit is contained in:
@@ -172,7 +172,9 @@ protected:
|
||||
|
||||
private:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {}
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& delay_generator;
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
|
||||
|
@@ -30,7 +30,6 @@
|
||||
// FileSys namespace
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(FileSys::NCCHArchive)
|
||||
SERIALIZE_EXPORT_IMPL(FileSys::NCCHFile)
|
||||
SERIALIZE_EXPORT_IMPL(FileSys::ArchiveFactory_NCCH)
|
||||
|
||||
namespace FileSys {
|
||||
|
@@ -98,13 +98,6 @@ private:
|
||||
NCCHFile() = default; // NOTE: If the public ctor has behaviour, need to replace this with
|
||||
// *_construct_data
|
||||
std::vector<u8> file_buffer; // TODO: Replace with file ref for serialization
|
||||
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& boost::serialization::base_object<FileBackend>(*this);
|
||||
ar& file_buffer;
|
||||
}
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
|
||||
/// File system interface to the NCCH archive
|
||||
@@ -130,5 +123,4 @@ private:
|
||||
} // namespace FileSys
|
||||
|
||||
BOOST_CLASS_EXPORT_KEY(FileSys::NCCHArchive)
|
||||
BOOST_CLASS_EXPORT_KEY(FileSys::NCCHFile)
|
||||
BOOST_CLASS_EXPORT_KEY(FileSys::ArchiveFactory_NCCH)
|
||||
|
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <array>
|
||||
#include <cinttypes>
|
||||
#include "common/archives.h"
|
||||
#include "common/common_types.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/swap.h"
|
||||
@@ -16,6 +17,8 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// FileSys namespace
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(FileSys::ArchiveFactory_SelfNCCH)
|
||||
|
||||
namespace FileSys {
|
||||
|
||||
enum class SelfNCCHFilePathType : u32 {
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "core/file_sys/archive_backend.h"
|
||||
#include "core/hle/result.h"
|
||||
@@ -44,7 +45,10 @@ public:
|
||||
|
||||
private:
|
||||
/// Mapping of ProgramId -> NCCHData
|
||||
std::unordered_map<u64, NCCHData> ncch_data;
|
||||
std::unordered_map<u64, NCCHData>
|
||||
ncch_data; // TODO: Remove this, or actually set the values here
|
||||
};
|
||||
|
||||
} // namespace FileSys
|
||||
|
||||
BOOST_CLASS_EXPORT_KEY(FileSys::ArchiveFactory_SelfNCCH)
|
||||
|
@@ -3,8 +3,11 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <algorithm>
|
||||
#include "common/archives.h"
|
||||
#include "core/file_sys/delay_generator.h"
|
||||
|
||||
SERIALIZE_EXPORT_IMPL(FileSys::DefaultDelayGenerator)
|
||||
|
||||
namespace FileSys {
|
||||
|
||||
DelayGenerator::~DelayGenerator() = default;
|
||||
|
@@ -5,6 +5,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/serialization/access.hpp>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include "common/common_types.h"
|
||||
|
||||
namespace FileSys {
|
||||
@@ -16,6 +18,10 @@ public:
|
||||
virtual u64 GetOpenDelayNs() = 0;
|
||||
|
||||
// TODO (B3N30): Add getter for all other file/directory io operations
|
||||
private:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {}
|
||||
friend class boost::serialization::access;
|
||||
};
|
||||
|
||||
class DefaultDelayGenerator : public DelayGenerator {
|
||||
@@ -25,3 +31,5 @@ public:
|
||||
};
|
||||
|
||||
} // namespace FileSys
|
||||
|
||||
BOOST_CLASS_EXPORT_KEY(FileSys::DefaultDelayGenerator);
|
||||
|
@@ -89,12 +89,7 @@ public:
|
||||
virtual void Flush() const = 0;
|
||||
|
||||
protected:
|
||||
std::unique_ptr<DelayGenerator> delay_generator; // TODO: replace with virtual Get*DelayNs
|
||||
|
||||
private:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {}
|
||||
friend class boost::serialization::access;
|
||||
std::unique_ptr<DelayGenerator> delay_generator;
|
||||
};
|
||||
|
||||
} // namespace FileSys
|
||||
|
Reference in New Issue
Block a user