Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
Pack.h
1/*
2Copyright (C) 2013,2018,2025,2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16#ifndef AEONGAMES_PACK_H
17#define AEONGAMES_PACK_H
18#include <string>
19#include <unordered_map>
20#include <cstdint>
21#include "Tool.h"
22#include "aeongames/Package.hpp"
23
24namespace AeonGames
25{
27 class Pack : public Tool
28 {
29 public:
38
48 int operator() ( int argc, char** argv ) override;
49 private:
50 void ProcessArgs ( int argc, char** argv );
51 bool ProcessDirectory ( const std::string& path );
52 int ExecCompress() const;
53 int ExecExtract() const;
54 int ExecDirectory() const;
55 std::unordered_map<uint32_t, PKGDirectoryEntry> mDirectory;
56 std::unordered_map<uint32_t, std::string> mStringTable;
57 Action mAction{};
58 std::string mRootPath;
59 std::string mBaseName;
60 std::string mInputPath;
61 std::string mOutputFile;
62 };
63}
64#endif
Header for the PKG file specification.
Action
Specifies the pack operation to perform.
Definition Pack.h:32
@ Compress
Compress assets into a package.
Definition Pack.h:35
@ None
No action.
Definition Pack.h:33
@ Directory
List the directory of a package.
Definition Pack.h:36
@ Extract
Extract assets from a package.
Definition Pack.h:34
~Pack()
Destructor.
Pack()
Default constructor.
int operator()(int argc, char **argv) override
Execute the pack tool.
Definition Pack.cpp:270
Abstract base class for command-line tools.
Definition Tool.h:23
<- This is here just for the literals
Definition AABB.hpp:31