Ahmed Adamjee
/
SnakeVSBlock
Snake vs Block Game to be run upon K64F.
MenuClasses/Stats/SDFileSystem/FATFileSystem/FATDirHandle.h@51:387249f9b333, 2019-04-26 (annotated)
- Committer:
- AhmedPlaymaker
- Date:
- Fri Apr 26 18:30:25 2019 +0000
- Revision:
- 51:387249f9b333
- Parent:
- SDFileSystem/FATFileSystem/FATDirHandle.h@33:249cf423fb18
Sorted my game classes into folders to make it more organized
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AhmedPlaymaker | 33:249cf423fb18 | 1 | /* mbed Microcontroller Library |
AhmedPlaymaker | 33:249cf423fb18 | 2 | * Copyright (c) 2006-2012 ARM Limited |
AhmedPlaymaker | 33:249cf423fb18 | 3 | * |
AhmedPlaymaker | 33:249cf423fb18 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
AhmedPlaymaker | 33:249cf423fb18 | 5 | * of this software and associated documentation files (the "Software"), to deal |
AhmedPlaymaker | 33:249cf423fb18 | 6 | * in the Software without restriction, including without limitation the rights |
AhmedPlaymaker | 33:249cf423fb18 | 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
AhmedPlaymaker | 33:249cf423fb18 | 8 | * copies of the Software, and to permit persons to whom the Software is |
AhmedPlaymaker | 33:249cf423fb18 | 9 | * furnished to do so, subject to the following conditions: |
AhmedPlaymaker | 33:249cf423fb18 | 10 | * |
AhmedPlaymaker | 33:249cf423fb18 | 11 | * The above copyright notice and this permission notice shall be included in |
AhmedPlaymaker | 33:249cf423fb18 | 12 | * all copies or substantial portions of the Software. |
AhmedPlaymaker | 33:249cf423fb18 | 13 | * |
AhmedPlaymaker | 33:249cf423fb18 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
AhmedPlaymaker | 33:249cf423fb18 | 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
AhmedPlaymaker | 33:249cf423fb18 | 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
AhmedPlaymaker | 33:249cf423fb18 | 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
AhmedPlaymaker | 33:249cf423fb18 | 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
AhmedPlaymaker | 33:249cf423fb18 | 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
AhmedPlaymaker | 33:249cf423fb18 | 20 | * SOFTWARE. |
AhmedPlaymaker | 33:249cf423fb18 | 21 | */ |
AhmedPlaymaker | 33:249cf423fb18 | 22 | #ifndef MBED_FATDIRHANDLE_H |
AhmedPlaymaker | 33:249cf423fb18 | 23 | #define MBED_FATDIRHANDLE_H |
AhmedPlaymaker | 33:249cf423fb18 | 24 | |
AhmedPlaymaker | 33:249cf423fb18 | 25 | #include "DirHandle.h" |
AhmedPlaymaker | 33:249cf423fb18 | 26 | |
AhmedPlaymaker | 33:249cf423fb18 | 27 | using namespace mbed; |
AhmedPlaymaker | 33:249cf423fb18 | 28 | |
AhmedPlaymaker | 33:249cf423fb18 | 29 | class FATDirHandle : public DirHandle { |
AhmedPlaymaker | 33:249cf423fb18 | 30 | |
AhmedPlaymaker | 33:249cf423fb18 | 31 | public: |
AhmedPlaymaker | 33:249cf423fb18 | 32 | FATDirHandle(const FATFS_DIR &the_dir); |
AhmedPlaymaker | 33:249cf423fb18 | 33 | virtual int closedir(); |
AhmedPlaymaker | 33:249cf423fb18 | 34 | virtual struct dirent *readdir(); |
AhmedPlaymaker | 33:249cf423fb18 | 35 | virtual void rewinddir(); |
AhmedPlaymaker | 33:249cf423fb18 | 36 | virtual off_t telldir(); |
AhmedPlaymaker | 33:249cf423fb18 | 37 | virtual void seekdir(off_t location); |
AhmedPlaymaker | 33:249cf423fb18 | 38 | |
AhmedPlaymaker | 33:249cf423fb18 | 39 | virtual ssize_t read(struct dirent *ent); |
AhmedPlaymaker | 33:249cf423fb18 | 40 | virtual int close() { return closedir(); }; |
AhmedPlaymaker | 33:249cf423fb18 | 41 | virtual void seek(off_t offset) { seekdir(offset); }; |
AhmedPlaymaker | 33:249cf423fb18 | 42 | virtual off_t tell() { return telldir(); }; |
AhmedPlaymaker | 33:249cf423fb18 | 43 | virtual void rewind() { rewinddir(); }; |
AhmedPlaymaker | 33:249cf423fb18 | 44 | |
AhmedPlaymaker | 33:249cf423fb18 | 45 | private: |
AhmedPlaymaker | 33:249cf423fb18 | 46 | FATFS_DIR dir; |
AhmedPlaymaker | 33:249cf423fb18 | 47 | struct dirent cur_entry; |
AhmedPlaymaker | 33:249cf423fb18 | 48 | |
AhmedPlaymaker | 33:249cf423fb18 | 49 | }; |
AhmedPlaymaker | 33:249cf423fb18 | 50 | |
AhmedPlaymaker | 33:249cf423fb18 | 51 | #endif |