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