SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Toggle main menu visibility
Loading...
Searching...
No Matches
OO7.h
Go to the documentation of this file.
1
// ReSharper disable CppRedundantQualifier
2
3
#pragma once
4
5
#include <array>
6
7
#include "
../PackFile.h
"
8
9
namespace
vpkpp
{
10
11
constexpr
std::string_view
OO7_EXTENSION
=
".007"
;
12
13
class
OO7
:
public
PackFileReadOnly
{
14
public
:
16
[[nodiscard]]
static
std::unique_ptr<PackFile>
open
(
const
std::string& path,
const
EntryCallback
& callback =
nullptr
);
17
18
[[nodiscard]]
bool
hasPackFileChecksum
()
const override
;
19
20
[[nodiscard]]
bool
verifyPackFileChecksum
()
const override
;
21
22
[[nodiscard]]
constexpr
bool
isCaseSensitive
()
const override
{
23
return
true
;
24
}
25
26
[[nodiscard]] std::optional<std::vector<std::byte>>
readEntry
(
const
std::string& path_)
const override
;
27
28
[[nodiscard]]
Attribute
getSupportedEntryAttributes
()
const override
;
29
30
[[nodiscard]]
explicit
operator
std::string()
const override
;
31
32
protected
:
33
using
PackFileReadOnly::PackFileReadOnly
;
34
35
uint32_t
majorVersion
{};
36
uint32_t
minorVersion
{};
37
bool
hasChecksum
=
false
;
38
std::array<std::byte, 16>
checksum
{};
39
40
private
:
41
VPKPP_REGISTER_PACKFILE_OPEN
(
OO7_EXTENSION
, &
OO7::open
);
42
};
43
44
}
// namespace vpkpp
PackFile.h
VPKPP_REGISTER_PACKFILE_OPEN
#define VPKPP_REGISTER_PACKFILE_OPEN(extension, function)
Definition
PackFile.h:254
vpkpp::OO7
Definition
OO7.h:13
vpkpp::OO7::minorVersion
uint32_t minorVersion
Definition
OO7.h:36
vpkpp::OO7::getSupportedEntryAttributes
Attribute getSupportedEntryAttributes() const override
Returns a list of supported entry attributes Mostly for GUI programs that show entries and their meta...
Definition
OO7.cpp:160
vpkpp::OO7::majorVersion
uint32_t majorVersion
Definition
OO7.h:35
vpkpp::OO7::open
static std::unique_ptr< PackFile > open(const std::string &path, const EntryCallback &callback=nullptr)
Open a 007 file.
Definition
OO7.cpp:13
vpkpp::OO7::isCaseSensitive
constexpr bool isCaseSensitive() const override
Does the format support case-sensitive file names?
Definition
OO7.h:22
vpkpp::OO7::hasChecksum
bool hasChecksum
Definition
OO7.h:37
vpkpp::OO7::verifyPackFileChecksum
bool verifyPackFileChecksum() const override
Verify the checksum of the entire file, returns true on success Will return true if there is no check...
Definition
OO7.cpp:111
vpkpp::OO7::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
OO7.cpp:130
vpkpp::OO7::hasPackFileChecksum
bool hasPackFileChecksum() const override
Returns true if the entire file has a checksum.
Definition
OO7.cpp:107
vpkpp::OO7::checksum
std::array< std::byte, 16 > checksum
Definition
OO7.h:38
vpkpp::OO7::PackFileReadOnly
PackFileReadOnly(const std::string &fullFilePath_)
Definition
PackFile.cpp:755
vpkpp::PackFileReadOnly::PackFileReadOnly
PackFileReadOnly(const std::string &fullFilePath_)
Definition
PackFile.cpp:755
vpkpp::PackFile::EntryCallback
EntryCallbackBase< void > EntryCallback
Definition
PackFile.h:38
vpkpp
Definition
Attribute.h:5
vpkpp::Attribute
Attribute
Definition
Attribute.h:7
vpkpp::OO7_EXTENSION
constexpr std::string_view OO7_EXTENSION
Definition
OO7.h:11
include
vpkpp
format
OO7.h
Generated on
for SourcePP by
1.17.0