SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
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
7namespace vpkpp {
8
9constexpr std::string_view HOG_SIGNATURE = "DHF";
10constexpr std::string_view HOG_EXTENSION = ".hog";
11
12class HOG : public PackFileReadOnly {
13public:
15 [[nodiscard]] static std::unique_ptr<PackFile> open(const std::string& path, const EntryCallback& callback = nullptr);
16
17 static constexpr std::string_view GUID = "FDE9941424FF4EC1BC4C90A7DA52AF87";
18
19 [[nodiscard]] constexpr std::string_view getGUID() const override {
20 return HOG::GUID;
21 }
22
23 [[nodiscard]] std::optional<std::vector<std::byte>> readEntry(const std::string& path_) const override;
24
25 [[nodiscard]] Attribute getSupportedEntryAttributes() const override;
26
27protected:
29
30private:
32};
33
34} // namespace vpkpp
#define VPKPP_REGISTER_PACKFILE_OPEN(extension, function)
Definition PackFile.h:255
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
static constexpr std::string_view GUID
Definition HOG.h:17
constexpr std::string_view getGUID() const override
Get the GUID corresponding to the pack file type.
Definition HOG.h:19
static std::unique_ptr< PackFile > open(const std::string &path, const EntryCallback &callback=nullptr)
Open a HOG file.
Definition HOG.cpp:10
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
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 HOG_EXTENSION
Definition HOG.h:10
Attribute
Definition Attribute.h:7
constexpr std::string_view HOG_SIGNATURE
Definition HOG.h:9