SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
ORE.h
Go to the documentation of this file.
1// ReSharper disable CppRedundantQualifier
2
3#pragma once
4
5#include "../PackFile.h"
6
7namespace vpkpp {
8
9constexpr std::string_view ORE_EXTENSION = ".ore";
10
11class ORE : public PackFileReadOnly {
12public:
14 static std::unique_ptr<PackFile> create(const std::string& path);
15
17 [[nodiscard]] static std::unique_ptr<PackFile> open(const std::string& path, const EntryCallback& callback = nullptr);
18
19 [[nodiscard]] std::optional<std::vector<std::byte>> readEntry(const std::string& path_) const override;
20
21 [[nodiscard]] Attribute getSupportedEntryAttributes() const override;
22
23protected:
25
26private:
28};
29
30} // namespace vpkpp
#define VPKPP_REGISTER_PACKFILE_OPEN(extension, function)
Definition PackFile.h:245
std::optional< std::vector< std::byte > > readEntry(const std::string &path_) const override
Try to read the entry's data to a bytebuffer.
Definition ORE.cpp:76
static std::unique_ptr< PackFile > create(const std::string &path)
Create an ORE file.
Definition ORE.cpp:10
Attribute getSupportedEntryAttributes() const override
Returns a list of supported entry attributes Mostly for GUI programs that show entries and their meta...
Definition ORE.cpp:95
static std::unique_ptr< PackFile > open(const std::string &path, const EntryCallback &callback=nullptr)
Open an ORE file.
Definition ORE.cpp:21
PackFileReadOnly(const std::string &fullFilePath_)
Definition PackFile.cpp:728
PackFileReadOnly(const std::string &fullFilePath_)
Definition PackFile.cpp:728
EntryCallbackBase< void > EntryCallback
Definition PackFile.h:38
constexpr std::string_view ORE_EXTENSION
Definition ORE.h:9
Attribute
Definition Attribute.h:7