diff options
author | David Walter Seikel | 2016-03-28 22:28:34 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-03-28 22:28:34 +1000 |
commit | 7028cbe09c688437910a25623098762bf0fa592d (patch) | |
tree | 10b5af58277d9880380c2251f109325542c4e6eb /libraries/irrlicht-1.8.1/include/IFileList.h | |
parent | Move lemon to the src/others directory. (diff) | |
download | SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.zip SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.gz SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.bz2 SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.xz |
Move Irrlicht to src/others.
Diffstat (limited to 'libraries/irrlicht-1.8.1/include/IFileList.h')
-rw-r--r-- | libraries/irrlicht-1.8.1/include/IFileList.h | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/libraries/irrlicht-1.8.1/include/IFileList.h b/libraries/irrlicht-1.8.1/include/IFileList.h deleted file mode 100644 index 4c2f8ea..0000000 --- a/libraries/irrlicht-1.8.1/include/IFileList.h +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | ||
2 | // This file is part of the "Irrlicht Engine". | ||
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | ||
4 | |||
5 | #ifndef __I_FILE_LIST_H_INCLUDED__ | ||
6 | #define __I_FILE_LIST_H_INCLUDED__ | ||
7 | |||
8 | #include "IReferenceCounted.h" | ||
9 | #include "path.h" | ||
10 | |||
11 | namespace irr | ||
12 | { | ||
13 | namespace io | ||
14 | { | ||
15 | |||
16 | //! Provides a list of files and folders. | ||
17 | /** File lists usually contain a list of all files in a given folder, | ||
18 | but can also contain a complete directory structure. */ | ||
19 | class IFileList : public virtual IReferenceCounted | ||
20 | { | ||
21 | public: | ||
22 | //! Get the number of files in the filelist. | ||
23 | /** \return Amount of files and directories in the file list. */ | ||
24 | virtual u32 getFileCount() const = 0; | ||
25 | |||
26 | //! Gets the name of a file in the list, based on an index. | ||
27 | /** The path is not included in this name. Use getFullFileName for this. | ||
28 | \param index is the zero based index of the file which name should | ||
29 | be returned. The index must be less than the amount getFileCount() returns. | ||
30 | \return File name of the file. Returns 0, if an error occured. */ | ||
31 | virtual const io::path& getFileName(u32 index) const = 0; | ||
32 | |||
33 | //! Gets the full name of a file in the list including the path, based on an index. | ||
34 | /** \param index is the zero based index of the file which name should | ||
35 | be returned. The index must be less than the amount getFileCount() returns. | ||
36 | \return File name of the file. Returns 0 if an error occured. */ | ||
37 | virtual const io::path& getFullFileName(u32 index) const = 0; | ||
38 | |||
39 | //! Returns the size of a file in the file list, based on an index. | ||
40 | /** \param index is the zero based index of the file which should be returned. | ||
41 | The index must be less than the amount getFileCount() returns. | ||
42 | \return The size of the file in bytes. */ | ||
43 | virtual u32 getFileSize(u32 index) const = 0; | ||
44 | |||
45 | //! Returns the file offset of a file in the file list, based on an index. | ||
46 | /** \param index is the zero based index of the file which should be returned. | ||
47 | The index must be less than the amount getFileCount() returns. | ||
48 | \return The offset of the file in bytes. */ | ||
49 | virtual u32 getFileOffset(u32 index) const = 0; | ||
50 | |||
51 | //! Returns the ID of a file in the file list, based on an index. | ||
52 | /** This optional ID can be used to link the file list entry to information held | ||
53 | elsewhere. For example this could be an index in an IFileArchive, linking the entry | ||
54 | to its data offset, uncompressed size and CRC. | ||
55 | \param index is the zero based index of the file which should be returned. | ||
56 | The index must be less than the amount getFileCount() returns. | ||
57 | \return The ID of the file. */ | ||
58 | virtual u32 getID(u32 index) const = 0; | ||
59 | |||
60 | //! Check if the file is a directory | ||
61 | /** \param index The zero based index which will be checked. The index | ||
62 | must be less than the amount getFileCount() returns. | ||
63 | \return True if the file is a directory, else false. */ | ||
64 | virtual bool isDirectory(u32 index) const = 0; | ||
65 | |||
66 | //! Searches for a file or folder in the list | ||
67 | /** Searches for a file by name | ||
68 | \param filename The name of the file to search for. | ||
69 | \param isFolder True if you are searching for a directory path, false if you are searching for a file | ||
70 | \return Returns the index of the file in the file list, or -1 if | ||
71 | no matching name name was found. */ | ||
72 | virtual s32 findFile(const io::path& filename, bool isFolder=false) const = 0; | ||
73 | |||
74 | //! Returns the base path of the file list | ||
75 | virtual const io::path& getPath() const = 0; | ||
76 | |||
77 | //! Add as a file or folder to the list | ||
78 | /** \param fullPath The file name including path, from the root of the file list. | ||
79 | \param isDirectory True if this is a directory rather than a file. | ||
80 | \param offset The file offset inside an archive | ||
81 | \param size The size of the file in bytes. | ||
82 | \param id The ID of the file in the archive which owns it */ | ||
83 | virtual u32 addItem(const io::path& fullPath, u32 offset, u32 size, bool isDirectory, u32 id=0) = 0; | ||
84 | |||
85 | //! Sorts the file list. You should call this after adding any items to the file list | ||
86 | virtual void sort() = 0; | ||
87 | }; | ||
88 | |||
89 | } // end namespace irr | ||
90 | } // end namespace io | ||
91 | |||
92 | |||
93 | #endif | ||
94 | |||