libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
ResourceFactory.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include "File.h"
6
7namespace Ship {
28 public:
39 virtual std::shared_ptr<IResource> ReadResource(std::shared_ptr<File> file,
40 std::shared_ptr<ResourceInitData> initData) = 0;
41
42 protected:
53 virtual bool FileHasValidFormatAndReader(std::shared_ptr<File> file,
54 std::shared_ptr<Ship::ResourceInitData> initData) = 0;
55};
56} // namespace Ship
Abstract factory interface for deserializing a specific resource type and format.
Definition ResourceFactory.h:27
virtual std::shared_ptr< IResource > ReadResource(std::shared_ptr< File > file, std::shared_ptr< ResourceInitData > initData)=0
Deserializes a File into an IResource.
virtual bool FileHasValidFormatAndReader(std::shared_ptr< File > file, std::shared_ptr< Ship::ResourceInitData > initData)=0
Validates that the file's format tag and reader type are compatible with this factory.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14