OpenTTD Source 20260421-master-gc2fbc6fdeb
tar_type.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
9
10#ifndef TAR_TYPE_H
11#define TAR_TYPE_H
12
13#include "core/enum_type.hpp"
14#include "fileio_type.h"
15
17 std::string tar_filename;
18 size_t size;
19 size_t position;
20};
21
22using TarList = std::map<std::string, std::string, std::less<>>;
23using TarFileList = std::map<std::string, TarFileListEntry, std::less<>> ;
26
27#endif /* TAR_TYPE_H */
A sort-of mixin that implements 'at(pos)' and 'operator[](pos)' only for a specific enum class.
Type (helpers) for enums.
constexpr std::underlying_type_t< enum_type > to_underlying(enum_type e)
Implementation of std::to_underlying (from C++23).
Definition enum_type.hpp:21
EnumClassIndexContainer< std::array< TarFileList, to_underlying(Subdirectory::End)>, Subdirectory > _tar_filelist
List of files within tar files found in each subdirectory.
Definition fileio.cpp:70
EnumClassIndexContainer< std::array< TarList, to_underlying(Subdirectory::End)>, Subdirectory > _tar_list
List of tar files found in each subdirectory.
Definition fileio.cpp:68
Types for standard in/out file operations.
Subdirectory
The different kinds of subdirectories OpenTTD uses.
Definition fileio_type.h:88
@ End
End marker.
std::map< std::string, std::string, std::less<> > TarList
Map of tar file to tar directory.
Definition tar_type.h:22