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