|
OpenTTD
|
List of file information. More...
#include <fios.h>
Public Member Functions | |
| FiosItem * | Append () |
| Construct a new entry in the file list. | |
| uint | Length () const |
| Get the number of files in the list. | |
| const FiosItem * | Begin () const |
| Get a pointer to the first file information. | |
| const FiosItem * | End () const |
| Get a pointer behind the last file information. | |
| const FiosItem * | Get (uint index) const |
| Get a pointer to the indicated file information. | |
| FiosItem * | Get (uint index) |
| Get a pointer to the indicated file information. | |
| const FiosItem & | operator[] (uint index) const |
| FiosItem & | operator[] (uint index) |
| Get a reference to the indicated file information. | |
| void | Clear () |
| Remove all items from the list. | |
| void | Compact () |
| Compact the list down to the smallest block size boundary. | |
| void | BuildFileList (AbstractFileType abstract_filetype, SaveLoadOperation fop) |
| Construct a file list with the given kind of files, for the stated purpose. | |
| const FiosItem * | FindItem (const char *file) |
| Find file information of a file by its name from the file list. | |
Data Fields | |
| SmallVector< FiosItem, 32 > | files |
| The list of files. | |
|
inline |
Construct a new entry in the file list.
Definition at line 114 of file fios.h.
References SmallVector< T, S >::Append(), and files.
Referenced by FiosFileScanner::AddFile(), and FiosGetFileList().
|
inline |
Get a pointer to the first file information.
Definition at line 132 of file fios.h.
References SmallVector< T, S >::Begin(), and files.
Referenced by FiosFileScanner::AddFile(), FindItem(), and SortSaveGameList().
| void FileList::BuildFileList | ( | AbstractFileType | abstract_filetype, |
| SaveLoadOperation | fop | ||
| ) |
Construct a file list with the given kind of files, for the stated purpose.
| abstract_filetype | Kind of files to collect. |
| fop | Purpose of the collection, either SLO_LOAD or SLO_SAVE. |
Definition at line 76 of file fios.cpp.
References Clear(), FiosGetHeightmapList(), FiosGetSavegameList(), FiosGetScenarioList(), FT_HEIGHTMAP, FT_NONE, FT_SAVEGAME, FT_SCENARIO, SLO_LOAD, and SLO_SAVE.
Referenced by SaveLoadWindow::OnInvalidateData(), and ConsoleFileList::ValidateFileList().
|
inline |
Remove all items from the list.
Definition at line 179 of file fios.h.
References SmallVector< T, S >::Clear(), and files.
Referenced by BuildFileList(), FiosGetFileList(), and ConsoleFileList::InvalidateFileList().
|
inline |
Compact the list down to the smallest block size boundary.
Definition at line 185 of file fios.h.
References SmallVector< T, S >::Compact(), and files.
Referenced by FiosGetFileList().
|
inline |
Get a pointer behind the last file information.
Definition at line 141 of file fios.h.
References SmallVector< T, S >::End(), and files.
Referenced by FiosFileScanner::AddFile(), FindItem(), and SortSaveGameList().
| const FiosItem * FileList::FindItem | ( | const char * | file | ) |
Find file information of a file by its name from the file list.
| file | The filename to return information about. Can be the actual name or a numbered entry into the filename list. |
NULL if the file is not available. Definition at line 108 of file fios.cpp.
References Begin(), End(), Get(), IsInsideMM(), lastof, Length(), and seprintf().
|
inline |
Get a pointer to the indicated file information.
File information must exist.
Definition at line 150 of file fios.h.
References files, and SmallVector< T, S >::Get().
Referenced by SaveLoadWindow::DrawWidget(), FindItem(), FiosGetFileList(), SaveLoadWindow::OnClick(), and SortSaveGameList().
|
inline |
Get a pointer to the indicated file information.
File information must exist.
Definition at line 159 of file fios.h.
References files, and SmallVector< T, S >::Get().
|
inline |
Get the number of files in the list.
Definition at line 123 of file fios.h.
References files, and SmallVector< T, S >::Length().
Referenced by SaveLoadWindow::DrawWidget(), FindItem(), FiosGetFileList(), SaveLoadWindow::OnInvalidateData(), SaveLoadWindow::OnPaint(), and SortSaveGameList().
|
inline |
1.8.1.2