Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
BrpakIndex.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/platform/Result.h"
7#include "mc/platform/brstd/function_ref.h"
8
9// auto generated forward declare list
10// clang-format off
11namespace Bedrock::Resources { struct BrpakIndexEntry; }
12namespace Core { class File; }
13namespace Core { class PathView; }
14// clang-format on
15
16namespace Bedrock::Resources {
17
18class BrpakIndex {
19public:
20 // BrpakIndex inner types declare
21 // clang-format off
23 // clang-format on
24
25 // BrpakIndex inner types define
27
28public:
29 // member variables
30 // NOLINTBEGIN
33 // NOLINTEND
34
35public:
36 // prevent constructor by default
37 BrpakIndex& operator=(BrpakIndex const&);
38 BrpakIndex(BrpakIndex const&);
39 BrpakIndex();
40
41public:
42 // member functions
43 // NOLINTBEGIN
44 MCNAPI BrpakIndex(
45 ::std::map<
46 ::std::string,
49 ::std::string archivePath
50 );
51
52 MCNAPI ::Bedrock::Resources::BrpakIndexEntry const* findEntry(::std::string_view entryName) const;
53
54 MCNAPI void forEachInPrefix(
55 ::std::string_view prefix,
56 ::brstd::function_ref<void(::std::string const&, ::Bedrock::Resources::BrpakIndexEntry const&)> callback
57 ) const;
58
59 MCNAPI ::Bedrock::Result<void> readEntryData(
61 ::std::string& result,
62 ::Core::File& fileHandle,
63 bool validateCrc
64 ) const;
65 // NOLINTEND
66
67public:
68 // static functions
69 // NOLINTBEGIN
70 MCNAPI static ::Bedrock::Result<::Bedrock::Resources::BrpakIndex> buildFromFile(::Core::PathView brpakPath);
71 // NOLINTEND
72
73public:
74 // constructor thunks
75 // NOLINTBEGIN
76 MCNAPI void* $ctor(
77 ::std::map<
78 ::std::string,
81 ::std::string archivePath
82 );
83 // NOLINTEND
84};
85
86} // namespace Bedrock::Resources
MCAPI ::Bedrock::Result< void > readEntryData(::Bedrock::Resources::BrpakIndexEntry const &entry, ::std::string &result, ::Core::File &fileHandle, bool validateCrc) const
MCAPI::Bedrock::Resources::BrpakIndexEntry const * findEntry(::std::string_view entryName) const
MCAPI void * $ctor(::std::map< ::std::string, ::Bedrock::Resources::BrpakIndexEntry, ::Bedrock::Resources::BrpakIndex::CaseInsensitiveLess > index, ::std::string archivePath)
static MCAPI ::Bedrock::Result<::Bedrock::Resources::BrpakIndex > buildFromFile(::Core::PathView brpakPath)
MCAPI void forEachInPrefix(::std::string_view prefix, ::brstd::function_ref< void(::std::string const &, ::Bedrock::Resources::BrpakIndexEntry const &)> callback) const
MCAPI BrpakIndex(::std::map< ::std::string, ::Bedrock::Resources::BrpakIndexEntry, ::Bedrock::Resources::BrpakIndex::CaseInsensitiveLess > index, ::std::string archivePath)
Definition File.h:20
Definition PathView.h:19
Definition function_ref.h:60
Definition BrpakIndexEntry.h:7
Definition Alias.h:14