Information about a single base set.
More...
#include <base_media_base.h>
|
typedef std::unordered_map< std::string, std::string > | TranslatedStrings |
|
|
std::string | name |
| The name of the base set.
|
|
TranslatedStrings | description |
| Description of the base set.
|
|
uint32 | shortname |
| Four letter short variant of the name.
|
|
uint32 | version |
| The version of this base set.
|
|
bool | fallback |
| This set is a fallback set, i.e. it should be used only as last resort.
|
|
MD5File | files [NUM_FILES] |
| All files part of this set.
|
|
uint | found_files |
| Number of the files that could be found.
|
|
uint | valid_files |
| Number of the files that could be found and are valid.
|
|
T * | next |
| The next base set in this list.
|
|
template<class T, size_t Tnum_files, bool Tsearch_in_tars>
struct BaseSet< T, Tnum_files, Tsearch_in_tars >
Information about a single base set.
- Template Parameters
-
T | the real class we're going to be |
Tnum_files | the number of files in the set |
Tsearch_in_tars | whether to search in the tars or not |
Definition at line 49 of file base_media_base.h.
◆ CheckMD5()
template<class T , size_t Tnum_files, bool Tsearch_in_tars>
Calculate and check the MD5 hash of the supplied file.
- Parameters
-
file | The file get the hash of. |
subdir | The sub directory to get the files from. |
- Returns
- #CR_MATCH if the MD5 hash matches
- #CR_MISMATCH if the MD5 does not match
- #CR_NO_FILE if the file misses
Definition at line 137 of file base_media_base.h.
◆ FillSetDetails()
template<class T , size_t Tnum_files, bool Tsearch_in_tars>
bool BaseSet< T, Tnum_files, Tsearch_in_tars >::FillSetDetails |
( |
IniFile * |
ini, |
|
|
const char * |
path, |
|
|
const char * |
full_filename, |
|
|
bool |
allow_empty_filename = true |
|
) |
| |
Read the set information from a loaded ini.
- Parameters
-
ini | the ini to read from |
path | the path to this ini file (for filenames) |
full_filename | the full filename of the loaded file (for error reporting purposes) |
allow_empty_filename | empty filenames are valid |
- Returns
- true if loading was successful.
Definition at line 39 of file base_media_func.h.
◆ GetDescription()
template<class T , size_t Tnum_files, bool Tsearch_in_tars>
const char* BaseSet< T, Tnum_files, Tsearch_in_tars >::GetDescription |
( |
const std::string & |
isocode | ) |
const |
|
inline |
Get the description for the given ISO code.
It falls back to the first two characters of the ISO code in case no match could be made with the full ISO code. If even then the matching fails the default is returned.
- Parameters
-
isocode | the isocode to search for |
- Returns
- the description
Definition at line 113 of file base_media_base.h.
◆ GetNumInvalid()
template<class T , size_t Tnum_files, bool Tsearch_in_tars>
int BaseSet< T, Tnum_files, Tsearch_in_tars >::GetNumInvalid |
( |
| ) |
const |
|
inline |
◆ GetNumMissing()
template<class T , size_t Tnum_files, bool Tsearch_in_tars>
int BaseSet< T, Tnum_files, Tsearch_in_tars >::GetNumMissing |
( |
| ) |
const |
|
inline |
Get the number of missing files.
- Returns
- the number
Definition at line 88 of file base_media_base.h.
◆ GetTextfile()
template<class T , size_t Tnum_files, bool Tsearch_in_tars>
◆ file_names
template<class T , size_t Tnum_files, bool Tsearch_in_tars>
Internal names of the files in this set.
Make sure we aren't messing things up.
Implementation.
Definition at line 59 of file base_media_base.h.
The documentation for this struct was generated from the following files: