Resource::DatabasePackedFile class

A DatabasePackedFile is a type of file used in Spore to store and index multiple files inside a single container (usually in the .package extension).

This class contains all the necessary methods for accessing files and loading/saving DBPF files.

Base classes

class Database

Public static variables

static const uint32_t DATABASE_TYPE
static const uint32_t TYPE

Constructors, destructors, conversion operators

DatabasePackedFile(const char16_t* location, ICoreAllocator* allocator = nullptr)
~DatabasePackedFile() virtual

Public functions

auto Cast(uint32_t type) const -> void* override
auto Initialize() -> bool override
auto Dispose() -> bool override
auto GetDatabaseType() const -> uint32_t override
auto GetRefCount() const -> int override
auto Lock(bool lock) -> void override
auto Open(IO::AccessFlags desiredAccess = IO::AccessFlags::Read, IO::CD createDisposition = IO::CD::Default, bool arg_8 = false) -> bool override
auto Close() -> bool override
auto GetAccessFlags() const -> IO::AccessFlags override
auto Flush() -> bool override
auto GetLocation() const -> const char16_t* override
auto SetLocation(const char16_t* path) -> bool override
auto GetKeyList(eastl::vector<ResourceKey>& dstVector, IKeyFilter* filter = nullptr) -> size_t override
auto OpenRecord(const ResourceKey& name, IRecord** ppDst, IO::AccessFlags desiredAccess = IO::AccessFlags::Read, IO::CD createDisposition = IO::CD::Default, bool arg_10 = true, RecordInfo* pDstInfo = nullptr) -> bool override
auto GetOpenCount(const ResourceKey& key) -> int override
auto CloseRecord(IRecord* pRecord) -> bool override
auto DeleteRecord(const ResourceKey& name) -> bool override
auto Attach(bool, IResourceManager* pResourceMan, bool) -> bool override
auto GetAllocator() const -> ICoreAllocator* override
auto GetStream() -> IO::IStream* virtual
auto SetStream(IO::IStream* pStream) -> bool virtual
auto CreateRecordRead(IO::AccessFlags desiredAccess, RecordInfo* info, ResourceKey& key) -> PFRecordRead* virtual
auto CreateRecordReadCopy(IO::AccessFlags desiredAccess, PFRecordRead* pOther, ResourceKey& key) -> PFRecordRead* virtual
auto CreateRecordWriteData(IO::AccessFlags desiredAccess, void* pData, size_t nSize, ResourceKey& key) -> PFRecordWrite* virtual
auto CreateRecordWrite(IO::AccessFlags desiredAccess, size_t nChunkOffset, size_t nSize, ResourceKey& key) -> PFRecordWrite* virtual
auto ReadHeaders() -> bool virtual
auto ReadHeaderRecord() -> bool virtual
auto WriteEmptyHeaderRecord() -> bool virtual
auto WriteHeaderRecord() -> bool virtual
auto VerifyHeaderRecordIntegrity(char* header) -> bool virtual
auto ReadIndexRecord() -> bool virtual
auto WriteIndexRecord() -> bool virtual
auto VerifyIndexRecordIntegrity() -> bool virtual
auto CreateIndex(IO::AccessFlags desiredAccess = IO::AccessFlags::ReadWrite) -> PFIndexModifiable* virtual
auto DestroyIndex(IO::EAIOZoneObject* pObject) -> void virtual
auto MakeIndexModifiable() -> void virtual
auto InitializeHoleTable() -> bool virtual
auto ReadBytes(void* pDst, size_t nSize) -> int
auto ReadData(void* pDst, size_t nChunkOffset, size_t nSize) -> bool

Public variables

EAIOZoneObject_AMBIGOUS_DECLARATION
bool mIsInitialized
ICoreAllocator* mpAllocator
IO::AccessFlags mAccessFlags
int field_18
bool field_1C
bool field_1D
eastl::string16 mFilePath
IO::FileStream mFileStream
size_t mFileOffset
eastl::intrusive_ptr<IO::IStream> mpCurrentStream
char* mpDataBuffer
size_t mpBufferSize
size_t mnBufferOffset
Mutex mIndexMutex
Mutex mReadWriteMutex
PFIndexModifiable* mpIndex
bool field_2D4
int field_2D8
int field_2DC
bool field_2E0
float field_2E4
eastl::map<ResourceKey, PFRecordBase*, eastl::less<ResourceKey>, ICoreAllocatorAdapter> field_2E8
int field_308
int field_30C
int field_310
int field_314
int field_318
int field_31C
int field_320
size_t mnIndexOffset
size_t mnIndexCount
size_t mnIndexSize
bool field_330
int field_334
float field_338
PFHoleTable field_33C
PFHoleTable field_35C
bool field_37C
bool field_37D
cResourceManager* mpResourceMan
int field_384