SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Toggle main menu visibility
Loading...
Searching...
No Matches
HOG.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
HOG_SIGNATURE
=
"DHF"
;
10
constexpr
std::string_view
HOG_EXTENSION
=
".hog"
;
11
12
class
HOG
:
public
PackFileReadOnly
{
13
public
:
15
[[nodiscard]]
static
std::unique_ptr<PackFile>
open
(
const
std::string& path,
const
EntryCallback
& callback =
nullptr
);
16
17
[[nodiscard]] std::optional<std::vector<std::byte>>
readEntry
(
const
std::string& path_)
const override
;
18
19
[[nodiscard]]
Attribute
getSupportedEntryAttributes
()
const override
;
20
21
protected
:
22
using
PackFileReadOnly::PackFileReadOnly
;
23
24
private
:
25
VPKPP_REGISTER_PACKFILE_OPEN
(
HOG_EXTENSION
, &
HOG::open
);
26
};
27
28
}
// namespace vpkpp
PackFile.h
VPKPP_REGISTER_PACKFILE_OPEN
#define VPKPP_REGISTER_PACKFILE_OPEN(extension, function)
Definition
PackFile.h:254
vpkpp::HOG
Definition
HOG.h:12
vpkpp::HOG::getSupportedEntryAttributes
Attribute getSupportedEntryAttributes() const override
Returns a list of supported entry attributes Mostly for GUI programs that show entries and their meta...
Definition
HOG.cpp:77
vpkpp::HOG::open
static std::unique_ptr< PackFile > open(const std::string &path, const EntryCallback &callback=nullptr)
Open a HOG file.
Definition
HOG.cpp:10
vpkpp::HOG::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
HOG.cpp:58
vpkpp::HOG::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::HOG_EXTENSION
constexpr std::string_view HOG_EXTENSION
Definition
HOG.h:10
vpkpp::Attribute
Attribute
Definition
Attribute.h:7
vpkpp::HOG_SIGNATURE
constexpr std::string_view HOG_SIGNATURE
Definition
HOG.h:9
include
vpkpp
format
HOG.h
Generated on
for SourcePP by
1.17.0