Conquer Space
0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
src
engine
asset
packageindex.h
Go to the documentation of this file.
1
/* Conquer Space
2
* Copyright (C) 2021-2025 Conquer Space
3
*
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <https://www.gnu.org/licenses/>.
16
*/
17
#pragma once
18
19
#include <map>
20
#include <string>
21
22
#include "
engine/asset/asset.h
"
23
#include "
engine/asset/vfs/vfs.h
"
24
25
namespace
cqsp::asset
{
26
struct
AssetEntry
{
27
std::string
path
;
28
AssetType
type
;
29
AssetEntry
() :
path
(
""
),
type
(
AssetType
::
NONE
) {}
30
AssetEntry
(
const
std::string& _path,
AssetType
_type) :
path
(_path),
type
(_type) {}
31
};
32
36
class
PackageIndex
{
37
public
:
38
explicit
PackageIndex
(
const
IVirtualDirectoryPtr
& directory);
39
40
AssetEntry
&
operator[]
(
const
std::string& name) {
return
assets
[name]; }
41
42
private
:
43
std::string
path
;
44
bool
valid
;
45
std::map<std::string, AssetEntry>
assets
;
46
};
47
}
// namespace cqsp::asset
asset.h
cqsp::asset::PackageIndex
Definition:
packageindex.h:36
cqsp::asset::PackageIndex::assets
std::map< std::string, AssetEntry > assets
Definition:
packageindex.h:45
cqsp::asset::PackageIndex::PackageIndex
PackageIndex(const IVirtualDirectoryPtr &directory)
Definition:
packageindex.cpp:24
cqsp::asset::PackageIndex::path
std::string path
Definition:
packageindex.h:43
cqsp::asset::PackageIndex::operator[]
AssetEntry & operator[](const std::string &name)
Definition:
packageindex.h:40
cqsp::asset::PackageIndex::valid
bool valid
Definition:
packageindex.h:44
cqsp::asset
When adding assets, it is extremely crucial that you read cqsp::asset::AssetLoader::LoadResources to ...
Definition:
asset.h:29
cqsp::asset::AssetType
AssetType
Definition:
asset.h:32
cqsp::asset::NONE
@ NONE
Definition:
assetprototype.h:25
cqsp::asset::IVirtualDirectoryPtr
std::shared_ptr< IVirtualDirectory > IVirtualDirectoryPtr
Definition:
vfs.h:37
cqsp::asset::AssetEntry
Definition:
packageindex.h:26
cqsp::asset::AssetEntry::AssetEntry
AssetEntry(const std::string &_path, AssetType _type)
Definition:
packageindex.h:30
cqsp::asset::AssetEntry::AssetEntry
AssetEntry()
Definition:
packageindex.h:29
cqsp::asset::AssetEntry::path
std::string path
Definition:
packageindex.h:27
cqsp::asset::AssetEntry::type
AssetType type
Definition:
packageindex.h:28
vfs.h
Generated on Thu Nov 13 2025 07:56:54 for Conquer Space by
1.9.2