SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Toggle main menu visibility
Loading...
Searching...
No Matches
PakLump.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <array>
4
5
#include <
vpkpp/format/ZIP.h
>
6
7
namespace
bsppp
{
8
9
constexpr
std::string_view
BSP_EXTENSION
=
".bsp"
;
10
13
class
PakLump
:
public
vpkpp::ZIP
{
14
public
:
15
~PakLump
()
override
;
16
18
[[nodiscard]]
static
std::unique_ptr<PackFile>
open
(
const
std::string& path,
const
EntryCallback
& callback =
nullptr
);
19
20
[[nodiscard]]
constexpr
bool
isCaseSensitive
() const noexcept
override
{
21
return
false
;
22
}
23
24
bool
bake
(
const
std::string& outputDir_
/*= ""*/
,
vpkpp::BakeOptions
options
/*= {}*/
,
const
EntryCallback
& callback
/*= nullptr*/
)
override
;
25
26
[[nodiscard]]
explicit
operator
std::string()
const override
;
27
28
protected
:
29
explicit
PakLump
(
const
std::string& fullFilePath_);
30
31
const
std::string
tempPakLumpPath
;
32
uint32_t
version
{};
33
uint32_t
mapRevision
{};
34
35
private
:
36
VPKPP_REGISTER_PACKFILE_OPEN
(
BSP_EXTENSION
, &
PakLump::open
);
37
};
38
39
}
// namespace bsppp
VPKPP_REGISTER_PACKFILE_OPEN
#define VPKPP_REGISTER_PACKFILE_OPEN(extension, function)
Definition
PackFile.h:254
ZIP.h
bsppp::PakLump::version
uint32_t version
Definition
PakLump.h:32
bsppp::PakLump::mapRevision
uint32_t mapRevision
Definition
PakLump.h:33
bsppp::PakLump::PakLump
PakLump(const std::string &fullFilePath_)
Definition
PakLump.cpp:17
bsppp::PakLump::isCaseSensitive
constexpr bool isCaseSensitive() const noexcept override
Does the format support case-sensitive file names?
Definition
PakLump.h:20
bsppp::PakLump::open
static std::unique_ptr< PackFile > open(const std::string &path, const EntryCallback &callback=nullptr)
Open a BSP file.
Definition
PakLump.cpp:27
bsppp::PakLump::tempPakLumpPath
const std::string tempPakLumpPath
Definition
PakLump.h:31
bsppp::PakLump::~PakLump
~PakLump() override
Definition
PakLump.cpp:21
vpkpp::PackFile::EntryCallback
EntryCallbackBase< void > EntryCallback
Definition
PackFile.h:38
vpkpp::PackFile::bake
bool bake()
If output folder is an empty string, it will overwrite the original.
Definition
PackFile.cpp:369
vpkpp::ZIP
Definition
ZIP.h:17
bsppp
Definition
BSP.h:18
bsppp::BSP_EXTENSION
constexpr std::string_view BSP_EXTENSION
Definition
PakLump.h:9
vpkpp::BakeOptions
Definition
Options.h:20
include
bsppp
PakLump.h
Generated on
for SourcePP by
1.17.0