SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Toggle main menu visibility
Loading...
Searching...
No Matches
REZ.h
Go to the documentation of this file.
1
// ReSharper disable CppRedundantQualifier
2
3
#pragma once
4
5
#include "
../PackFile.h
"
6
7
namespace
vpkpp
{
8
9
constexpr
std::string_view
REZ_EXTENSION
=
".rez"
;
10
11
class
REZ
:
public
PackFileReadOnly
{
12
public
:
14
[[nodiscard]]
static
std::unique_ptr<PackFile>
open
(
const
std::string& path,
const
EntryCallback
& callback =
nullptr
);
15
16
[[nodiscard]] std::optional<std::vector<std::byte>>
readEntry
(
const
std::string& path_)
const override
;
17
18
[[nodiscard]]
Attribute
getSupportedEntryAttributes
()
const override
;
19
20
[[nodiscard]] std::string_view
getFileType
()
const
;
21
22
[[nodiscard]] std::string_view
getUserTitle
()
const
;
23
24
[[nodiscard]] uint32_t
getVersion
()
const
;
25
26
protected
:
27
using
PackFileReadOnly::PackFileReadOnly
;
28
29
std::string
fileType
;
30
std::string
userTitle
;
31
uint32_t
version
;
32
33
private
:
34
VPKPP_REGISTER_PACKFILE_OPEN(
REZ_EXTENSION
, &
REZ::open
);
35
};
36
37
}
// namespace vpkpp
PackFile.h
vpkpp::PackFileReadOnly::PackFileReadOnly
PackFileReadOnly(const std::string &fullFilePath_)
Definition
PackFile.cpp:755
vpkpp::PackFile::EntryCallback
EntryCallbackBase< void > EntryCallback
Definition
PackFile.h:38
vpkpp::REZ
Definition
REZ.h:11
vpkpp::REZ::userTitle
std::string userTitle
Definition
REZ.h:30
vpkpp::REZ::getSupportedEntryAttributes
Attribute getSupportedEntryAttributes() const override
Returns a list of supported entry attributes Mostly for GUI programs that show entries and their meta...
Definition
REZ.cpp:164
vpkpp::REZ::getFileType
std::string_view getFileType() const
Definition
REZ.cpp:169
vpkpp::REZ::getVersion
uint32_t getVersion() const
Definition
REZ.cpp:177
vpkpp::REZ::getUserTitle
std::string_view getUserTitle() const
Definition
REZ.cpp:173
vpkpp::REZ::readEntry
std::optional< std::vector< std::byte > > readEntry(const std::string &path_) const override
Try to read the entry's data to a bytebuffer.
Definition
REZ.cpp:145
vpkpp::REZ::open
static std::unique_ptr< PackFile > open(const std::string &path, const EntryCallback &callback=nullptr)
Open a REZ file.
Definition
REZ.cpp:10
vpkpp::REZ::fileType
std::string fileType
Definition
REZ.h:29
vpkpp::REZ::PackFileReadOnly
PackFileReadOnly(const std::string &fullFilePath_)
Definition
PackFile.cpp:755
vpkpp::REZ::version
uint32_t version
Definition
REZ.h:31
vpkpp
Definition
Attribute.h:5
vpkpp::Attribute
Attribute
Definition
Attribute.h:7
vpkpp::REZ_EXTENSION
constexpr std::string_view REZ_EXTENSION
Definition
REZ.h:9
include
vpkpp
format
REZ.h
Generated on
for SourcePP by
1.18.0