SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Toggle main menu visibility
Loading...
Searching...
No Matches
OL.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
OL_SIGNATURE
=
"Worldcraft Prefab Library\x0d\x0a\x1a"
;
10
constexpr
std::string_view
OL_EXTENSION
=
".ol"
;
11
12
class
OL
:
public
PackFileReadOnly
{
13
public
:
15
[[nodiscard]]
static
std::unique_ptr<PackFile>
open
(
const
std::string& path,
const
EntryCallback
& callback =
nullptr
);
16
17
[[nodiscard]]
constexpr
bool
isCaseSensitive
()
const override
{
18
return
true
;
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
25
[[nodiscard]]
const
std::string&
getNotes
()
const
;
26
27
[[nodiscard]] std::optional<std::string>
getEntryNotes
(
const
std::string& path)
const
;
28
29
protected
:
30
using
PackFileReadOnly::PackFileReadOnly
;
31
32
std::string
notes
;
33
34
private
:
35
VPKPP_REGISTER_PACKFILE_OPEN
(
OL_EXTENSION
, &
OL::open
);
36
};
37
38
}
// namespace vpkpp
PackFile.h
VPKPP_REGISTER_PACKFILE_OPEN
#define VPKPP_REGISTER_PACKFILE_OPEN(extension, function)
Definition
PackFile.h:254
vpkpp::OL
Definition
OL.h:12
vpkpp::OL::getSupportedEntryAttributes
Attribute getSupportedEntryAttributes() const override
Returns a list of supported entry attributes Mostly for GUI programs that show entries and their meta...
Definition
OL.cpp:109
vpkpp::OL::open
static std::unique_ptr< PackFile > open(const std::string &path, const EntryCallback &callback=nullptr)
Open an OL file.
Definition
OL.cpp:20
vpkpp::OL::notes
std::string notes
Definition
OL.h:32
vpkpp::OL::isCaseSensitive
constexpr bool isCaseSensitive() const override
Does the format support case-sensitive file names?
Definition
OL.h:17
vpkpp::OL::getEntryNotes
std::optional< std::string > getEntryNotes(const std::string &path) const
Definition
OL.cpp:118
vpkpp::OL::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
OL.cpp:90
vpkpp::OL::PackFileReadOnly
PackFileReadOnly(const std::string &fullFilePath_)
Definition
PackFile.cpp:755
vpkpp::OL::getNotes
const std::string & getNotes() const
Definition
OL.cpp:114
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::OL_SIGNATURE
constexpr std::string_view OL_SIGNATURE
Definition
OL.h:9
vpkpp::OL_EXTENSION
constexpr std::string_view OL_EXTENSION
Definition
OL.h:10
vpkpp::Attribute
Attribute
Definition
Attribute.h:7
include
vpkpp
format
OL.h
Generated on
for SourcePP by
1.17.0