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#pragma once
2
3#include "../PackFile.h"
4
5namespace vpkpp {
6
7constexpr std::string_view HOG_SIGNATURE = "DHF";
8constexpr std::string_view HOG_EXTENSION = ".hog";
9
10class HOG : public PackFileReadOnly {
11public:
13 [[nodiscard]] static std::unique_ptr<PackFile> open(const std::string& path, const EntryCallback& callback = nullptr);
14
15 static constexpr inline std::string_view GUID = "FDE9941424FF4EC1BC4C90A7DA52AF87";
16
17 [[nodiscard]] constexpr std::string_view getGUID() const override {
18 return HOG::GUID;
19 }
20
21 [[nodiscard]] std::optional<std::vector<std::byte>> readEntry(const std::string& path_) const override;
22
23 [[nodiscard]] Attribute getSupportedEntryAttributes() const override;
24
25protected:
27
28private:
30};
31
32} // namespace vpkpp
#define VPKPP_REGISTER_PACKFILE_OPEN(extension, function)
Definition: PackFile.h:242
Definition: HOG.h:10
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:15
constexpr std::string_view getGUID() const override
Get the GUID corresponding to the pack file type.
Definition: HOG.h:17
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:720
EntryCallbackBase< void > EntryCallback
Definition: PackFile.h:30
Definition: Attribute.h:5
constexpr std::string_view HOG_EXTENSION
Definition: HOG.h:8
Attribute
Definition: Attribute.h:7
constexpr std::string_view HOG_SIGNATURE
Definition: HOG.h:7